From cf178b574914d60c4ea53d16b918deefc089851d Mon Sep 17 00:00:00 2001 From: yanivt Date: Mon, 13 Jul 2026 14:43:55 +0300 Subject: [PATCH 1/6] test: route jfrog MCP through local agent-guard + login-rule hook Co-authored-by: Cursor --- .gitignore | 1 + marketplace.json | 2 +- plugin/.claude-plugin/plugin.json | 2 +- plugin/.mcp.json | 7 ++-- plugin/hooks/hooks.json | 5 +++ plugin/scripts/inject-jfrog-login-rule.mjs | 40 ++++++++++++++++++++++ 6 files changed, 53 insertions(+), 4 deletions(-) create mode 100644 .gitignore create mode 100644 plugin/scripts/inject-jfrog-login-rule.mjs diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..9f11b75 --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +.idea/ diff --git a/marketplace.json b/marketplace.json index c97bf2c..f0d821e 100644 --- a/marketplace.json +++ b/marketplace.json @@ -9,7 +9,7 @@ { "name": "jfrog", "description": "JFrog Platform integration with MCP, security skills, and supply-chain best practices", - "version": "1.0.7", + "version": "1.1.0", "source": "plugin", "categories": [ "security", diff --git a/plugin/.claude-plugin/plugin.json b/plugin/.claude-plugin/plugin.json index 783b67c..01ee137 100644 --- a/plugin/.claude-plugin/plugin.json +++ b/plugin/.claude-plugin/plugin.json @@ -1,7 +1,7 @@ { "name": "jfrog", "description": "JFrog Platform integration with MCP, security skills, and supply-chain best practices", - "version": "1.0.7", + "version": "1.1.0", "author": { "name": "JFrog", "url": "https://jfrog.com" }, "hooks": "hooks/hooks.json" } diff --git a/plugin/.mcp.json b/plugin/.mcp.json index d7b7ef3..848f06d 100644 --- a/plugin/.mcp.json +++ b/plugin/.mcp.json @@ -1,8 +1,11 @@ { "mcpServers": { "jfrog": { - "type": "http", - "url": "${JFROG_URL}/mcp" + "type": "stdio", + "command": "/Users/yanivt/Jfrog/agent-guard/agent-guard/agent-guard", + "env": { + "_JF_ARGS": "mcp=jfrog-mcp" + } } } } diff --git a/plugin/hooks/hooks.json b/plugin/hooks/hooks.json index bbb6692..7fe1262 100644 --- a/plugin/hooks/hooks.json +++ b/plugin/hooks/hooks.json @@ -7,6 +7,11 @@ "type": "command", "command": "node \"${CLAUDE_PLUGIN_ROOT}/scripts/inject-instructions.mjs\"", "timeout": 7 + }, + { + "type": "command", + "command": "node \"${CLAUDE_PLUGIN_ROOT}/scripts/inject-jfrog-login-rule.mjs\"", + "timeout": 7 } ] } diff --git a/plugin/scripts/inject-jfrog-login-rule.mjs b/plugin/scripts/inject-jfrog-login-rule.mjs new file mode 100644 index 0000000..19cc5d8 --- /dev/null +++ b/plugin/scripts/inject-jfrog-login-rule.mjs @@ -0,0 +1,40 @@ +#!/usr/bin/env node +// Copyright (c) JFrog Ltd. 2026 +// Licensed under the Apache License, Version 2.0 +// https://www.apache.org/licenses/LICENSE-2.0 + +// The built-in JFrog MCP is proxied by Agent Guard; +// when unauthenticated it exposes a single `enable_jfrog_tools` tool and hides +// its real tools. +import process from "node:process"; + +const rule = [ + "# JFrog MCP tools (Agent Guard)", + "", + "The built-in JFrog MCP (`plugin:jfrog:jfrog`) is proxied by JFrog Agent Guard.", + "When its real tools are not yet available it exposes a single", + "`enable_jfrog_tools` tool.", + "", + "For ANY JFrog / Artifactory / Xray / builds / projects request:", + "- If an `enable_jfrog_tools` tool is available, call it FIRST. It opens the browser", + " for a one-time authorization and then the real JFrog tools appear in the same", + " session. This is also how you sign in / log in / connect to JFrog.", + "- Prefer it over the `jf` CLI when tools are missing: the empty tool list beforehand", + ' means "call `enable_jfrog_tools`", not "the MCP is broken" — so don\'t jump straight', + " to the CLI just because the only tool you see is `enable_jfrog_tools`.", + "- Don't use the client's built-in MCP authentication for this server — it is a no-op", + " here and won't open the browser; call the tool itself.", + "- The `jf` CLI and the JFrog skill remain the fallback (the skill's Tier 2/3). Use", + " them if `enable_jfrog_tools` fails, if the JFrog MCP still can't connect after it", + " succeeds, if the user explicitly asks for CLI setup, or for anything the MCP tools", + " don't cover.", +].join("\n"); + +process.stdout.write( + JSON.stringify({ + hookSpecificOutput: { + hookEventName: "SessionStart", + additionalContext: rule, + }, + }), +); From 167bbc3caa971f87b15a27c4d4e38f412ce9f817 Mon Sep 17 00:00:00 2001 From: yanivt Date: Wed, 15 Jul 2026 12:13:51 +0300 Subject: [PATCH 2/6] add jfrog mcp with agent guard --- README.md | 13 +++++++ plugin/.mcp.json | 8 ++++- plugin/hooks/hooks.json | 5 --- plugin/scripts/inject-jfrog-login-rule.mjs | 40 ---------------------- 4 files changed, 20 insertions(+), 46 deletions(-) delete mode 100644 plugin/scripts/inject-jfrog-login-rule.mjs diff --git a/README.md b/README.md index 74ad9c8..f2c0573 100644 --- a/README.md +++ b/README.md @@ -126,6 +126,19 @@ When an MCP server requires a sensitive configuration, the agent cannot set the See the [JFrog MCP Registry troubleshooting guide](https://docs.jfrog.com/ai-ml/docs/mcp-registry-troubleshooting). +### The `jfrog` MCP server shows "Stopped" + +VS Code starts MCP servers on demand, so the `jfrog` server often shows **Stopped** until something needs it. This is expected — but if the tools aren't showing up, start it manually first: open the **MCP: List Servers** command (or the MCP view), select **jfrog**, and choose **Start Server**. Once it's running you'll see the `enable_jfrog_tools` tool (or the real JFrog tools once authenticated). + +### JFrog MCP tools don't appear after signing in + +The JFrog MCP is proxied by Agent Guard. Until you're authenticated it exposes a single `enable_jfrog_tools` tool; calling it opens the browser for a one-time authorization and then the real JFrog tools are added to the session. In VS Code / Copilot Chat two extra steps are sometimes needed before the agent can use them: + +- **Enable the tools in the tool picker.** Open the 🛠 **Configure Tools** panel and enable the `jfrog-mcp` server's tools — newly added tools are not selected automatically. +- **Open a new chat.** A chat's tool set is fixed when it starts, so the tools that appeared after login only take effect in a new chat. + +If the agent keeps falling back to the `jf` CLI even though the JFrog tools are present, it usually means the tools aren't selected in the picker — enable them and start a new chat. An empty or login-only tool list means "call `enable_jfrog_tools`", not that the MCP is broken. + --- ## Support diff --git a/plugin/.mcp.json b/plugin/.mcp.json index 848f06d..47a2879 100644 --- a/plugin/.mcp.json +++ b/plugin/.mcp.json @@ -2,7 +2,13 @@ "mcpServers": { "jfrog": { "type": "stdio", - "command": "/Users/yanivt/Jfrog/agent-guard/agent-guard/agent-guard", + "command": "npx", + "args": [ + "--yes", + "--registry", + "https://releases.jfrog.io/artifactory/api/npm/coding-agents-npm/", + "@jfrog/agent-guard" + ], "env": { "_JF_ARGS": "mcp=jfrog-mcp" } diff --git a/plugin/hooks/hooks.json b/plugin/hooks/hooks.json index 7fe1262..bbb6692 100644 --- a/plugin/hooks/hooks.json +++ b/plugin/hooks/hooks.json @@ -7,11 +7,6 @@ "type": "command", "command": "node \"${CLAUDE_PLUGIN_ROOT}/scripts/inject-instructions.mjs\"", "timeout": 7 - }, - { - "type": "command", - "command": "node \"${CLAUDE_PLUGIN_ROOT}/scripts/inject-jfrog-login-rule.mjs\"", - "timeout": 7 } ] } diff --git a/plugin/scripts/inject-jfrog-login-rule.mjs b/plugin/scripts/inject-jfrog-login-rule.mjs deleted file mode 100644 index 19cc5d8..0000000 --- a/plugin/scripts/inject-jfrog-login-rule.mjs +++ /dev/null @@ -1,40 +0,0 @@ -#!/usr/bin/env node -// Copyright (c) JFrog Ltd. 2026 -// Licensed under the Apache License, Version 2.0 -// https://www.apache.org/licenses/LICENSE-2.0 - -// The built-in JFrog MCP is proxied by Agent Guard; -// when unauthenticated it exposes a single `enable_jfrog_tools` tool and hides -// its real tools. -import process from "node:process"; - -const rule = [ - "# JFrog MCP tools (Agent Guard)", - "", - "The built-in JFrog MCP (`plugin:jfrog:jfrog`) is proxied by JFrog Agent Guard.", - "When its real tools are not yet available it exposes a single", - "`enable_jfrog_tools` tool.", - "", - "For ANY JFrog / Artifactory / Xray / builds / projects request:", - "- If an `enable_jfrog_tools` tool is available, call it FIRST. It opens the browser", - " for a one-time authorization and then the real JFrog tools appear in the same", - " session. This is also how you sign in / log in / connect to JFrog.", - "- Prefer it over the `jf` CLI when tools are missing: the empty tool list beforehand", - ' means "call `enable_jfrog_tools`", not "the MCP is broken" — so don\'t jump straight', - " to the CLI just because the only tool you see is `enable_jfrog_tools`.", - "- Don't use the client's built-in MCP authentication for this server — it is a no-op", - " here and won't open the browser; call the tool itself.", - "- The `jf` CLI and the JFrog skill remain the fallback (the skill's Tier 2/3). Use", - " them if `enable_jfrog_tools` fails, if the JFrog MCP still can't connect after it", - " succeeds, if the user explicitly asks for CLI setup, or for anything the MCP tools", - " don't cover.", -].join("\n"); - -process.stdout.write( - JSON.stringify({ - hookSpecificOutput: { - hookEventName: "SessionStart", - additionalContext: rule, - }, - }), -); From cc27481fa2f0ba3a38cce8071977c3b2f14f2978 Mon Sep 17 00:00:00 2001 From: yanivt Date: Wed, 15 Jul 2026 12:15:13 +0300 Subject: [PATCH 3/6] change version --- marketplace.json | 2 +- plugin/.claude-plugin/plugin.json | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/marketplace.json b/marketplace.json index f0d821e..9eb5acf 100644 --- a/marketplace.json +++ b/marketplace.json @@ -9,7 +9,7 @@ { "name": "jfrog", "description": "JFrog Platform integration with MCP, security skills, and supply-chain best practices", - "version": "1.1.0", + "version": "1.0.8", "source": "plugin", "categories": [ "security", diff --git a/plugin/.claude-plugin/plugin.json b/plugin/.claude-plugin/plugin.json index 01ee137..b98c24f 100644 --- a/plugin/.claude-plugin/plugin.json +++ b/plugin/.claude-plugin/plugin.json @@ -1,7 +1,7 @@ { "name": "jfrog", "description": "JFrog Platform integration with MCP, security skills, and supply-chain best practices", - "version": "1.1.0", + "version": "1.0.8", "author": { "name": "JFrog", "url": "https://jfrog.com" }, "hooks": "hooks/hooks.json" } From 829c34fba84edc28e52e1fa8f38579457dda45bf Mon Sep 17 00:00:00 2001 From: yanivt Date: Wed, 15 Jul 2026 12:30:01 +0300 Subject: [PATCH 4/6] remove gitignore --- .gitignore | 1 - 1 file changed, 1 deletion(-) delete mode 100644 .gitignore diff --git a/.gitignore b/.gitignore deleted file mode 100644 index 9f11b75..0000000 --- a/.gitignore +++ /dev/null @@ -1 +0,0 @@ -.idea/ From 2367ade8b30c9c9b6e56d203712e4e77f82cd2a4 Mon Sep 17 00:00:00 2001 From: Matan Eden <57892946+MatanEden1@users.noreply.github.com> Date: Sun, 19 Jul 2026 14:12:09 +0300 Subject: [PATCH 5/6] AX-1746: Update version --- marketplace.json | 2 +- plugin/.claude-plugin/plugin.json | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/marketplace.json b/marketplace.json index 9eb5acf..70113ab 100644 --- a/marketplace.json +++ b/marketplace.json @@ -9,7 +9,7 @@ { "name": "jfrog", "description": "JFrog Platform integration with MCP, security skills, and supply-chain best practices", - "version": "1.0.8", + "version": "1.0.9", "source": "plugin", "categories": [ "security", diff --git a/plugin/.claude-plugin/plugin.json b/plugin/.claude-plugin/plugin.json index b98c24f..fb8905d 100644 --- a/plugin/.claude-plugin/plugin.json +++ b/plugin/.claude-plugin/plugin.json @@ -1,7 +1,7 @@ { "name": "jfrog", "description": "JFrog Platform integration with MCP, security skills, and supply-chain best practices", - "version": "1.0.8", + "version": "1.0.9", "author": { "name": "JFrog", "url": "https://jfrog.com" }, "hooks": "hooks/hooks.json" } From 137322a9e2263e280e70f0ab284536302331176d Mon Sep 17 00:00:00 2001 From: Matan Eden <57892946+MatanEden1@users.noreply.github.com> Date: Sun, 19 Jul 2026 14:15:06 +0300 Subject: [PATCH 6/6] Remove stale JFROG_PLATFORM_URL references from README JFROG_PLATFORM_URL is no longer used; .mcp.json now uses the stdio agent-guard. Revert the two README changes from #38 that referenced it. Co-Authored-By: Claude Opus 4.8 (1M context) --- README.md | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index 4dc602e..f2c0573 100644 --- a/README.md +++ b/README.md @@ -15,7 +15,7 @@ The JFrog plugin provides the following capabilities, grouped by component: | Component | Feature | Description | | --- | --- | --- | -| **MCP** | JFrog MCP server | Remote JFrog MCP server auto-attached to every session via `.mcp.json` at `https://${JFROG_PLATFORM_URL}/mcp` (OAuth, no API keys). | +| **MCP** | JFrog MCP server | Remote JFrog MCP server auto-attached to every session via `.mcp.json` at `${JFROG_URL}/mcp` (OAuth, no API keys). | | **Hook** | Agent Guard | Copilot manage MCPs through the JFrog Agent Guard. Through it you can discover, install, configure, update, and remove MCP servers from the JFrog AI Catalog approved for your project, and authenticate to remote HTTP MCPs via OAuth, API key, or bearer token. | --- @@ -83,8 +83,7 @@ VS Code opens, prompts you to install the plugin, and asks you to **Trust** the | Variable | Description | | --- | --- | -| `JFROG_PLATFORM_URL` | Your JFrog platform **host only**, without the scheme and without a trailing `/`, e.g. `mycompany.jfrog.io`. The MCP server URL is built as `https://${JFROG_PLATFORM_URL}/mcp`, so do **not** include `https://` here. | -| `JFROG_URL` | Your full JFrog platform URL, including the scheme, e.g. `https://mycompany.jfrog.io` (no trailing `/`). Used for authentication and Agent Guard. | +| `JFROG_URL` | Your JFrog platform URL, e.g. `https://mycompany.jfrog.io` (no trailing `/`) | | `JFROG_ACCESS_TOKEN` | Your JFrog access token | ### 2. Configure the JFrog CLI