/jfrog:jfrog-mcp-managementfrom JFrog
Installs, lists, and removes MCP servers through the JFrog Agent Guard governed catalog. Use when adding, enabling, or configuring MCPs for a project.
Ships in JFrog. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
Read when SKILL.md points to them; scripts run unread.
Install, list, and remove MCP servers. When Agent Guard is on (see Step 0), do that only through the Agent Guard — ignore other install commands from an MCP's docs.
On a non-zero Agent Guard exit, classify stderr per
key-rules
— do not treat a bare 404 as “MCP missing.” If Agent Guard is enabled, a
hard stop means: do not fall back to the usual MCP install routes that skip
the approved catalog and Agent Guard as the MCP proxy.
Before editing a shell startup file (~/.bashrc, ~/.zshrc, config.fish),
read persisting-env-vars and show the user
the exact line and file; write it only after they confirm.
In code examples below, <skill_path> refers to this skill's directory and is
resolved automatically by the agent. If the agent does not resolve it, determine
the path by locating this SKILL.md file and using its parent directory.
Node.js 18+ on PATH — node runs the Step 0 check, npx runs
@jfrog/agent-guard. On an older runtime the Step 0 check exits with
Unknown: requires Node.js 18 or newer.
Always double-quote every interpolated value in shell commands.
<REGISTRY_URL>, <SERVER_ID>, <JFROG_PROJECT_KEY>, <MCP_NAME>,
<spec.packageName>, and any other substituted value must be wrapped in
"..." when passed on a command line. Unquoted values let shell
metacharacters (;, |, $(), etc.) execute before npx runs.
Before anything else, run this check and WAIT for its exit code. Do not narrate it. Do not reuse a result from an earlier turn in this session.
node "<skill_path>/scripts/jfrog-agent-guard-check.mjs"
Request network access for this command. Run it exactly as shown, with no arguments — never pass a server ID, an MCP name, or a URL. It asks the AI Governance server (see below) whether Agent Guard is on.
If the first run fails with a network error, timeout, or other spurious issue
(sandbox, DNS, HTTP 5xx), run the same command again with network access and use
that second exit code. In a sandboxed harness (e.g. Cursor, Codex) such a
failure is often the sandbox's network allowlist, not a real outage — check your
harness-<agent>.md reference for a sandbox/allowlist fix. Do not retry when the
reason is missing credentials or missing jf config.
Interpret the exit code:
This organization uses Agent Guard. Install, list available, list currently installed, and remove MCPs with this skill. No other approved path for those.
This organization does not use Agent Guard. Honor that. Do not mention Agent
Guard or this check unless asked. Do not tell the user to contact an admin or
enable a registry. A NotSetUp: line (no AI Governance server is saved, e.g.
/jfrog-init never ran) gets the same handling.
Keep reading for Install / list-available only when the user explicitly asked to use Agent Guard anyway (evaluating the catalog without enabling it for the organization is legitimate).
This selection is not relevant for List → Currently installed and Remove, which touch local config only — handle those normally, with no server selection.
The AmbiguousServer: line means more than one AI Governance server is saved
and none of them is the default, so the check cannot tell which one to ask.
This is NOT a disabled or unknown result — the user picks the server. Do this:
node "<skill_path>/scripts/jfrog-ai-governance-config.mjs" list.serverId with its jpdUrl, and ask: "Which of
these is your AI Governance server?"<SERVER_ID>, with
node "<skill_path>/scripts/jfrog-ai-governance-config.mjs" set "<SERVER_ID>".
If that command fails, ask the user to run /jfrog-init to repair their
AI Governance setup, and stop.Wait for the user's selection before continuing; the gate stays ambiguous until they choose.
The check did not reach a definitive platform answer (bad credentials, timeout, HTTP error, network/DNS). Treat it like Exit 2 for Install and List → Available to install (ignore those sections; keep serving the user). List → Currently installed and Remove still proceed. (Exit 3 is handled above, not here.)
Mention once — as a side note while continuing — what failed and that the user
can use the jfrog-init command to fix any local configuration issues. Do not
ask them to decide, do not repeat it, and do not stop to fix it.
The AI Governance server is the JFrog Platform server (a jf CLI server ID)
that governs the user's AI assets: its AI Catalog lists the skills, plugins
and MCP servers they may use, and Agent Guard, where the organization has
turned it on, enforces that. The AI Governance project is the JFrog project
on that server that scopes the AI Catalog: which skills, plugins and MCP
servers the user sees and may install. Both are saved in setup.json in
the JFrog CLI home directory, separately from the jf CLI default server;
the AI Governance server can be the same server as that default or a
different one.
The user chooses both in /jfrog-init; another skill saves one only when it
is missing or unclear and the user answers that skill's question.
Read and change the file only through jfrog-ai-governance-config.mjs.
In this skill, Step 0 asks the AI Governance server whether Agent Guard is on, and that answer decides whether the Install and List → Available to install sections apply. When they do, every Agent Guard command and every MCP entry they write use the AI Governance server and project (see Pre-flight).
Harness config (resolve once, up front). Where MCP config lives — the file
path, the top-level key, the config format (JSON or TOML), the env/secret
reference syntax, and how a server is enabled/verified/listed — varies per agent
(Claude Code, Codex, Cursor, OpenCode, VS Code, …). Those values are NOT
hard-coded in this skill. Read
references/harness-common.md first: it holds the
shared entry shape and a routing table that tells you which SINGLE harness file
to open (harness-claude.md, harness-codex.md, harness-cursor.md,
harness-opencode.md, harness-vscode.md, …).
Read common + exactly one harness file — do NOT open the others. Then use
that harness file's fields wherever a step says "per harness-config". Adding a
new agent is a new harness-<name>.md file, with no change to this workflow.
Never hard-code one harness's .mcp.json / mcpServers / claude mcp list
values into your actions.
Read the base ../jfrog/SKILL.md first — it owns the
shared guards this skill reuses (does not repeat): the
environment check (run it before the first
jf call and export JFROG_CLI_USER_AGENT so these calls show in usage
telemetry).
Read references/agent-guard-common.md for the
canonical invocation (npx --yes --registry "<REGISTRY_URL>" @jfrog/agent-guard),
the <REGISTRY_URL> substitution (the npm registry the @jfrog/agent-guard
package comes from), and how to get <SERVER_ID> and <JFROG_PROJECT_KEY>
from setup.json. Removal and List → Currently installed read only local
config, so they skip this.
Route the request, then jump to the matching section:
| User intent | Section |
|---|---|
| add / install / set up / enable / configure an MCP | Install |
| list / show / what can I install / allowed / approved / available / catalog / what's set up / connected in the context of MCPs | List |
| remove / uninstall / delete / disconnect / turn off an MCP | Remove |
If Step 0 was exit 2 (or unknown treated as exit 2), ignore this section. Continue serving the user without Agent Guard.
Did the user name a specific MCP package? ("add foo-mcp", "install
@scope/bar"). If NOT — they said "yes", "add an MCP", "what can I install" —
your FIRST action is to show the catalog (run List → Available to
install) as a numbered table and wait for them to pick.
NEVER ask "which package would you like?" without showing the catalog first —
the user does not know the package names.
Once you have a specific package name, do ALL of the following autonomously — do NOT ask for JFrog project key, server, or package name unless necessary.
Server ID and JFrog project key — get <SERVER_ID> and
<JFROG_PROJECT_KEY> per Pre-flight in
references/agent-guard-common.md. Pass
--server "<SERVER_ID>" in every Agent Guard command and every entry you
write — also when existing MCP entries have no --server or another one;
never copy theirs (why: Pre-flight). NEVER guess or assume default for the
project key.
Target config file
.mcp.json, Cursor .cursor/mcp.json), but VS Code, Codex, and OpenCode
default to the user-level file (VS Code mcp.json, Codex
~/.codex/config.toml, OpenCode ~/.config/opencode/opencode.json) and treat
their project file (.vscode/mcp.json, trusted .codex/config.toml, project
opencode.json) as the opt-in scope. Follow the "Config files" row in the
harness file, not a fixed default here.
Create the target file if missing, using that harness's top-level key (e.g.
{ "mcpServers": {} }, or { "servers": {} } for VS Code)..vscode/mcp.json on VS Code
(project opencode.json on OpenCode, trusted .codex/config.toml on Codex).
Respect any per-file note in the reference (e.g. Claude Code user scope is
~/.claude.json, NOT projects.<path>.mcpServers).Step 2 needs a specific MCP name. If the user did NOT name one, go to List → Available to install first, then come back.
Once you have a name, run a SINGLE command — no Fetch/WebFetch, no custom curl/Python, no direct JFrog API calls:
npx --yes \
--registry "<REGISTRY_URL>" \
@jfrog/agent-guard \
--inspect \
--server "<SERVER_ID>" \
--project "<JFROG_PROJECT_KEY>" \
--mcp "<MCP_NAME>"
(never omit --registry; URL in agent-guard-common)
--server is never omitted — per the Step 1 rule, even when existing
entries lack it. Same rule applies to --login and the config entry below.
From the output JSON, extract (keep BOTH required AND optional):
spec.packageName — exact package name for the config.spec.mcpServerType.local.bootParams.environmentVariables[]; for remote MCPs
spec.mcpServerType.remote.endpoints[].headers[] (via mcpInput.mcpInputDetails).
Each carries name, description, isRequired, isSecret.routing — an OPTIONAL top-level field, never nested inside another
object. Read routing.target and routing.url, and keep both for the route
resolution below: they are two of its three conditions, never the route
itself. Anything other than "gateway" in target — absent field,
absent object included — is the Agent Guard route on its own.
Never treat the mere presence of the object as an answer — read target.
The agent guard is the only source of truth for this block: never validate
its shape here, and never enumerate the cases it covers. Both the absent and
the non-gateway cases are normal and mean nothing is wrong: never ask about
them, and never work out the route any other way.Resolve the route ONCE, here. Steps 3, 4, 4a and 5 all read this single
answer and never re-derive it from routing.target alone. The Gateway
route is taken only when ALL THREE hold:
routing.target is "gateway";routing.url is non-empty;Conditions 1 and 2 are --inspect's answer and are never second-guessed;
condition 3 is only whether this harness can express it. Any one missing →
Agent Guard route: the stdio entry, with Steps 3, 4, 4a and 5 running
exactly as they do today — inputs planned, collected and exported like any
other Agent Guard install.
Test them in any order: condition 3 is a property of your harness file, not of
the --inspect output, so it holds or fails the same whether you read it
before or after. A "gateway" target with a non-empty url on a harness
whose file defines no Gateway entry shape therefore fails the gate — write the
ordinary npx --yes ... @jfrog/agent-guard stdio entry, never a remote one.
A shape change needs a removal first. If an entry with this exact
spec.packageName already exists in the target config file — exact key match
only, never a similar, partial, or guessed name — and it is not the shape you
are about to add (one case: it runs @jfrog/agent-guard and you are adding the
Gateway entry; the other case: it carries a url and no command and you are
adding the Agent Guard entry), add nothing: tell the user that entry exists and
that they must remove it before adding again. Never edit, merge, or overwrite
it, and never remove it yourself. Every other case is unchanged.
On non-zero exit, show the error verbatim, then classify per key-rules. Do not fall back to the usual MCP install routes that skip the approved catalog and Agent Guard as the MCP proxy.
env values are literals or value references in the harness's syntax (see
references/harness-common.md). No secret is ever
entered in chat.
Gateway route (as resolved in Step 2) — skip this step entirely. The
Gateway holds the upstream credential, so no header or env input is written
into the entry and there is nothing for the user to provide.
Do NOT ask the user about optional inputs, and do NOT write an env block.
On the Agent Guard route — every case that is not the Gateway route, including
a routing.target: "gateway" this harness cannot express or an empty
routing.url — split Step 2 inputs by isRequired:
Handling: secrets (isSecret=true) MUST be a value reference, NEVER a raw
value — never take a secret in chat, echo it, or write it into config.
Non-secrets may be a literal or a reference. For the exact syntax and, on
shell-based harnesses (Claude Code, Cursor, Codex, Devin, Kiro, OpenCode), how the
user exports/persists the variable, see the harness file. On these harnesses you
MUST read references/persisting-env-vars.md
before editing a startup file. (VS Code
prompts for inputs values on first start — no shell export.)
Write exactly ONE entry — the Agent Guard entry, or your harness file's
Gateway entry shape on the Gateway route as resolved in Step 2
(routing.target: "gateway" + non-empty routing.url + that shape existing).
Write the Agent Guard entry into the target config from Step 1, following
references/harness-common.md for the shared
entry shape (type: stdio, command/args/_JF_ARGS). Use your one
harness file only for path, top-level key, value-reference syntax, and any
"Full entry shape" override (Codex/OpenCode). Do not invent a different
args/env layout. This is the Agent Guard entry — or your harness file's
Gateway entry shape, on the Gateway route as resolved in Step 2.
Config vs CLI (do not mix):
env._JF_ARGS as
project=<JFROG_PROJECT_KEY>&mcp=<spec.packageName>.--inspect / --list-available / --login): use --project
and --mcp as flags — those flags must not appear in the config
entry's args.Guardrails (identical everywhere):
--yes and --registry <URL> MUST precede @jfrog/agent-guard in args
(else npx hits the default registry → 404 / no-TTY hang)."type": "stdio" only — never "http", "sse", or a top-level "url" —
unless your harness file defines a Gateway entry shape AND Step 2's
--inspect output carried routing.target: "gateway" with a non-empty
routing.url. Then write that shape, with url copied verbatim from
routing.url. Anything else → the stdio rule applies with no exception.
Never write that shape because a URL looks like a Gateway URL, and never
build that URL yourself.
These are the same three conditions resolved in Step 2 —
restated here, never a second, looser test.--server "<SERVER_ID>" is always in args (Step 1).--project or --mcp in config args.inputs prompt) before verifying.Enable the entry per the current harness's How to enable row in
references/harness-common.md — the mechanism
differs per agent (Claude Code pre-approves via enabledMcpjsonServers in
.claude/settings.local.json; Cursor/VS Code discover the file and enable via
their MCP UI). If a pre-approval write fails, continue — the user approves on
relaunch.
Then tell the user:
inputs prompt (VS Code). Unset values cause
warnings and runtime failures. When Step 4 wrote a Gateway entry there
is nothing to export — that entry has no env and no value reference. (A
stdio Agent Guard entry always follows this instruction, whatever
routing.target said.) Tell the user
instead that they will be asked to sign in to JFrog the first time the
server is used, and go straight to the restart.Skip this step entirely when Step 4 wrote a Gateway entry: OAuth runs between the harness and the Gateway on first use, so a locally cached upstream token would be read by nothing.
Otherwise run ONLY for OAuth-style remote MCPs — --inspect showed a remote
section with type: "http" AND Step 4 wrote no static auth header into env.
Skip for local MCPs and for remote MCPs whose auth comes from a static token in
env.
--login opens the browser, runs OAuth, caches tokens in
~/.jfrog/jfrogmcp.conf.json. Agent Guard may also expose
enable_<slug>_tools until login completes; invoking it starts the same
OAuth login from the session.
In the same turn, tell the user you are about to open the browser to sign
them in to <MCP_NAME> and immediately run the command — do not wait for
confirmation or a follow-up prompt:
npx --yes \
--registry "<REGISTRY_URL>" \
@jfrog/agent-guard \
--login \
--server "<SERVER_ID>" \
--project "<JFROG_PROJECT_KEY>" \
--mcp "<spec.packageName>"
Outcomes:
expected 401, got 200 — MCP is anonymous (no auth needed); ignore
(even if the process exit is non-zero). Do not run the unmatched hard-stop.See references/key-rules-and-troubleshooting.md for key rules and troubleshooting.
Route the request first — pick which subsection to run BEFORE touching any file or shell:
| User said… | Run |
|---|---|
| "available", "what can I install", "what's in the catalog", "list MCPs", "allowed to install", "approved" without other context | Available to install — go straight to --list-available; do NOT inspect local files / IDE allowlists first. Do NOT ask whether to check the catalog. |
| "installed", "configured", "connected", "running", "what MCPs do I have" | Currently installed |
| ambiguous / both | run both in order: Currently installed first, then Available to install, as separate tables |
When Step 0 was exit 0: NEVER invent MCP integrations from outside the catalog.
The only authoritative source for what's available is --list-available against
the AI Governance server + JFrog project key. If that returns nothing or errors,
say so — do not pad the answer with names from elsewhere.
The authoritative, harness-agnostic source of installed MCPs is the config files themselves — read those first; live connection status is an optional add-on where the agent provides it.
jq invocation, NOT chained python3 -c "..." pipes. For each entry
whose command is npx and whose args include @jfrog/agent-guard, show:
display name (the entry key; but where the harness uses a slug key — e.g.
Codex — use the package from mcp= instead, per that harness's List
installed), package (mcp= in _JF_ARGS), server ID (value after
--server), scope (project / user).
Also show each entry that carries a url and no command — this skill
writes that shape too (a remote MCP Gateway entry), so a filter on
@jfrog/agent-guard alone hides installs it made. Display name and package
are both the entry key (the raw spec.packageName), server ID —, scope as
above. Such an entry carries no marker of who wrote it, so list it without
asserting whether this skill did. When its url contains /mcp-gateway/
(a remote MCP Gateway entry), show that complete url, from http to the
end — in a table too, never shortened with ... — e.g.
https://acme.jfrog.io/mcp-gateway/mcp/proj/02UkVNT1RFX2NvbS5zdXBhYmFzZS9tY3A, not
.../mcp-gateway/....claude mcp list, Cursor/VS
Code's MCP UI), use it to add live connection status per server. If none
exists, skip this — the config read above is still complete.allowedMcpServers /
deniedMcpServers in managed-settings.json).If Step 0 was exit 2 (or unknown treated as exit 2), ignore this subsection. Continue serving the user without Agent Guard. Currently installed still proceeds.
<SERVER_ID> and <JFROG_PROJECT_KEY> per Pre-flight.
--list-available does NOT require any existing MCP entry or pre-installed
Agent Guard — npx --yes --registry "<REGISTRY_URL>" @jfrog/agent-guard
fetches it on demand, so this works on a fresh machine too.npx --yes \
--registry "<REGISTRY_URL>" \
@jfrog/agent-guard \
--list-available \
--project "<JFROG_PROJECT_KEY>" \
--server "<SERVER_ID>"
On non-zero exit, classify per
key-rules.
Do not fall back to the usual MCP install routes that skip the approved catalog
and Agent Guard as the MCP proxy.
Exit 0 with only a TSV header (or --format json stdout null) is an empty
catalog — say so; do not invent names.
Output is a compact TSV — a header line, then one server per line:
name<TAB>type<TAB>version<TAB>description. Present the rows directly as a
numbered table — do NOT re-run, redirect, or parse with python3/jq. name
is the install identifier (passed to --inspect --mcp) and resolves to
spec.packageName (for remote MCPs the two are typically identical, e.g.
com.supabase/mcp).
name and the installed spec.packageName can differ, so mark a row
(installed) if EITHER matches the JSON key of ANY entry in the servers map
OR its mcp= value — still show it so the user can reinstall/update. Match
against the whole map, not only the Agent Guard rows: a remote entry carries
no mcp=, and its key is the package.See references/key-rules-and-troubleshooting.md for key rules and troubleshooting.
Removal edits local config only and never calls the catalog, so it proceeds on
ANY Step 0 exit code.
An MCP entry that runs @jfrog/agent-guard, or one that carries a url and no
command, must always be removed with these instructions, to make sure the
local config is cleaned up and the OAuth cache is cleared.
Locate the entry across both scopes first. Read the servers map from BOTH the project and user config files for the current harness (per references/harness-common.md, under that harness's top-level key), and list every exact match by name with its scope. Then:
Only after resolving scope, delete the entry from the servers map in the
matched file(s). If the harness file has a "Remove cleanup" section (e.g.
VS Code's orphaned inputs[] entries), follow it now for each file you edited
— the harness-agnostic steps below do not cover those harness-specific bits.
OAuth cache — only after every matching entry is gone. The
~/.jfrog/jfrogmcp.conf.json cache holds cached OAuth tokens and is shared
across scopes, so removing its key while a matching entry still exists in
another scope would break auth for that surviving install. This file
contains secrets — never print, echo, or surface its contents when reading or
editing it; operate on it by key only. So:
url and no command, skip this step:
that shape caches no token, so a key of that name is a different
install's.~/.jfrog/jfrogmcp.conf.json and delete, from the servers object, the key
equal to this MCP's spec.packageName (the same identifier used as the JSON
key of the config entry you removed above). If that exact key is absent, do
nothing — do NOT guess or delete a similarly-named key. Then write the file
back. Reading the KEY NAMES under servers to locate the match is allowed;
what is forbidden is printing, echoing, quoting, or summarizing any VALUE in
the file, or surfacing the surrounding entries — read the minimum needed to
locate the key and remove it. If the file is absent, skip silently.Mandatory: tell the user the exact restart action from the harness's Restart column (per references/harness-common.md) — not just "restart the agent" — so the removed entry stops loading.
references/agent-guard-common.md (opens in a new tab)references/harness-claude.md (opens in a new tab)references/harness-codex.md (opens in a new tab)references/harness-common.md (opens in a new tab)references/harness-cursor.md (opens in a new tab)references/harness-devin.md (opens in a new tab)references/harness-junie.md (opens in a new tab)references/harness-kiro.md (opens in a new tab)references/harness-opencode.md (opens in a new tab)references/harness-vscode.md (opens in a new tab)references/key-rules-and-troubleshooting.md (opens in a new tab)references/persisting-env-vars.md (opens in a new tab)references/runtime-permissions.md (opens in a new tab)scripts/jfrog-agent-guard-check.mjs (opens in a new tab)scripts/jfrog-ai-governance-config.mjs (opens in a new tab)scripts/jfrog-run-command.mjs (opens in a new tab)What SKILL.md sets; muted values are Claude Code's defaults
Three short reads, in order
8 skills in this plugin
/jfrogInteract with the JFrog Platform via the JFrog CLI, JFrog MCP server and REST/GraphQL APIs. Use this skill when the user wants to manage Artifactory repositories, upload or download artifacts, manage builds, configure permissions, manage users and groups, work with access tokens, configure JFrog CLI servers, search artifacts, manage properties, set up replication, manage JFrog Projects, run security audits or scans, look up CVE details, query exposures scan results from JFrog Advanced Security, manage release bundles and lifecycle operations, aggregate or export platform data, or perform any JFrog Platform administration task. Also use when the user mentions jf, jfrog, artifactory, xray, distribution, evidence, apptrust, onemodel, graphql, workers, mission control, curation, advanced security, exposures, sast, or any JFrog product name. Do NOT use this skill to install, add, remove, list, or manage MCP servers./jfrog-ai-catalogDiscover, search, install, update, remove, and publish agent skills and plugins hosted in the JFrog AI Catalog (Artifactory) via the JFrog CLI (`jf skills`, `jf agent plugins`) and JFrog Agent Guard. Use whenever the user asks what skills or plugins are available or installed, wants to browse/search the catalog, see versions, install/update/uninstall/delete a skill or plugin, publish/upload/release one to JFrog / Artifactory / the AI Catalog, or list the AI Catalog (skill/plugin governance) policies — allow-lists, malicious-skill checks — that apply to skills in a project. Do NOT use this skill for MCP servers (that's jfrog-mcp-management, even when the user says "policy" or "approved"), for Xray or curation "blocked by policy" package errors (that's jfrog-package-curation), or for Xray policies and watches (that's the base jfrog skill).Generated from the plugin's indexed repository (jfrog/claude-plugin) — no native marketplace selected
npx claudepluginhub p/jfrog-jfrogOther plugins' skills for the same job