/mcp-server-audit:mcp-server-auditfrom mcp-server-audit
Audits MCP servers configured for Claude Code or other agents for tool poisoning, shadowing, rug pulls, SSRF and unauthenticated exposure, reading raw tool descriptions offline and pinning their hashes. Use before approving a new or third-party MCP server, to check that approved tools haven't changed, or when an agent acted strangely after a tool call.
Ships in mcp-server-audit. 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.
Not for reviewing the source of a server you are about to release (mcp-server-review, if installed), designing or building one (mcp-server, if installed), or classifying how MCP packages and plugin versions are pinned across agent config (agent-config-audit, if installed, which owns that check).
A tool's name, description and schema go into the model's context before it decides to call anything, so a server can inject instructions without ever being called. The audit reads that surface without letting an agent load it, checks how the server is launched and reached, and pins what was approved so a later change shows up.
command, and a remote entry is contacted with its headers. Show the user the exact command or URL and get a yes before each one. Run untrusted stdio servers in a disposable container or VM with no credentials mounted.scan command uploads tool descriptions, server config and skill text to Snyk's API (secrets are redacted first) and needs a SNYK_TOKEN. Say so and ask before running it. Its inspect command does no analysis upload.Inventory the servers. List every MCP server the agent can load and where each is defined. For Claude Code that is ~/.claude.json (user and per-project local scope), the project's .mcp.json, each installed plugin's .mcp.json or plugin.json mcpServers, and managed config. Claude Code config has the paths and jq one-liners. Other clients: Cursor ~/.cursor/mcp.json, VS Code .vscode/mcp.json and user settings, Claude Desktop claude_desktop_config.json.
Review each entry statically, without running it. For stdio: what the command executes (a curl | sh or a shell -c wrapper hides what runs), and which env vars and secrets it is handed. Whether a launcher is pinned (npx, uvx, @latest, image digests) is not reviewed here; leave it to agent-config-audit (if installed). For remote: https only, who operates the host, whether literal tokens sit in headers rather than ${VAR} references, and what OAuth scopes it asks for. Note servers that share a name or tool names with another server (shadowing).
Read the raw tool surface. With consent, fetch tools/list into a file with the MCP Inspector CLI or snyk-agent-scan inspect (commands in scanning). Then run the bundled checker on the file, which never contacts anything:
python3 -I ${CLAUDE_SKILL_DIR}/scripts/mcp_audit.py scan tools.json
It flags pseudo-tags (<IMPORTANT>), instructions to hide things from the user, "before using this tool" hooks, references to other tools, sensitive paths (~/.ssh, .env, ~/.claude.json), outbound URLs, encoded blobs, invisible or non-normalized Unicode, and oversized descriptions, in names, descriptions and every string in the schemas. Its flags are leads: read every description yourself, including parameter descriptions, and judge whether the text documents the tool or directs the model.
Pin what was approved. After the user approves a server, record its hashes and re-check on a schedule or after any update:
python3 -I ${CLAUDE_SKILL_DIR}/scripts/mcp_audit.py pin tools.json --out mcp-pins/<server>.json
python3 -I ${CLAUDE_SKILL_DIR}/scripts/mcp_audit.py verify tools-now.json --pins mcp-pins/<server>.json # exit 1 on any change
A changed hash on a tool nobody updated is a possible rug pull: diff the old and new tools/list before re-approving. Optionally add Snyk Agent Scan for its model-based risk analysis (step 3's reference).
Check SSRF and exposure for servers that fetch URLs or listen on a port. See threats and tests for the test inputs (cloud metadata, loopback, file://, redirects), the ss and unauthenticated-request checks, and what counts as a finding.
Report. One row per finding: server, tool or config entry, evidence (the exact description text with invisible characters shown, the config line, or the probe and response), severity, and the fix (remove, sandbox, add auth or bind to 127.0.0.1, re-approve after review). Map findings to OWASP MCP Top 10 and MITRE ATLAS IDs from the threats reference when the user wants a compliance view. List servers you could not inspect and why.
scripts/mcp_audit.py (Python 3 stdlib only, offline) has scan, pin and verify. It accepts the Inspector's --format json output, a bare {"tools": [...]} result or a tools array. Tests: python3 -I -m unittest discover -s ${CLAUDE_SKILL_DIR}/scripts -p 'test_*.py'.
What SKILL.md sets; muted values are Claude Code's defaults
Other plugins' skills for the same job
npx claudepluginhub adminhead/claude-plugins --plugin mcp-server-audit