Listed from the MCP registry; nobody on Odel publishes it.
Audit MCP servers for tool poisoning, rug pulls and supply-chain risk (OWASP MCP Top 10).
Runs on your machine from its package; the steps are below.

Not assessed yet.
Odel charges nothing per call. The publisher may charge for its own service.
Runs locally over stdio
This server isn't hosted β your MCP client launches it from a package registry. Use one of the commands below, or drop the config into your client (e.g. Claude Desktop).
Run
npx -y mcp-security-guard
MCP client config
{
"mcpServers": {
"mcp-security-guard": {
"command": "npx",
"args": [
"-y",
"mcp-security-guard"
]
}
}
}
MCP security scanner: find out if the MCP servers you installed are lying to your AI β tool poisoning, rug pulls, tool shadowing and prompt injection, mapped to the OWASP MCP Top 10.
MCP Security Guard is a local audit tool for Claude Code, Cursor and other MCP clients. It inspects the tool descriptions, configuration, skills and supply chain of every MCP server your AI can reach, flags hidden Unicode and leaked secrets, and pins reviewed tool definitions so silent changes (rug pulls) are caught. Nothing leaves your machine unless you opt in.
Part of the petrovicistefan MCP suite β local-first guardrails for AI coding agents (Claude Code, Cursor, Codex).
Click the button above, or use this deep link: cursor://anysphere.cursor-deeplink/mcp/install?name=mcp-security-guard&config=eyJjb21tYW5kIjoibnB4IiwiYXJncyI6WyIteSIsIm1jcC1zZWN1cml0eS1ndWFyZCJdfQ==
Or manually add to .cursor/mcp.json:
{
"mcpServers": {
"mcp-security-guard": {
"command": "npx",
"args": ["-y", "mcp-security-guard"]
}
}
}
/plugin marketplace add petrovicistefan/mcp-security-guard
/plugin install mcp-security-guard@mcp-security-guard
Then run /mcp-audit or ask Claude "are my MCP servers safe?"
claude mcp add mcp-security-guard -- npx -y mcp-security-guard
Add to your Claude Desktop config (~/Library/Application Support/Claude/claude_desktop_config.json on macOS, %APPDATA%\Claude\claude_desktop_config.json on Windows):
{
"mcpServers": {
"mcp-security-guard": {
"command": "npx",
"args": ["-y", "mcp-security-guard"]
}
}
}
Click the button above, or manually add to .vscode/mcp.json:
{
"mcpServers": {
"mcp-security-guard": {
"command": "npx",
"args": ["-y", "mcp-security-guard"]
}
}
}
npx -y mcp-security-guard audit --project-only
β Star this repository to support the project and stay updated! β Give a star
Your code is covered by other tools. This one checks the MCP servers that inject text into your AI's context.
MCP Security Guard audits every MCP server Claude (and other AI clients) can reach: servers you configured, servers that plugins bring, and servers from Claude Desktop and other clients on your machine.
As of October 2026. Corrections welcome.
| Feature | MCP Security Guard | snyk/agent-scan | cisco-ai-defense/mcp-scanner | riseandignite/mcp-shield |
|---|---|---|---|---|
| Claude Code native plugin | β | β | β | β |
| Runtime hooks (pre/post tool-use) | β | β | β | β |
| Rug-pull pinning (SHA-256) | β Tools, skills, CLAUDE.md | Limited | β | β |
| OWASP MCP Top 10 mapping | β Every finding | β | β | β |
| SARIF output | β GitHub Action | β | β | β |
| CycloneDX BOM export | β Agent inventory | β | β | β |
| Fully local (zero network) | β Default | Varies | Varies | Varies |
| Supply-chain checks | β OSV, npm, PyPI | Varies | Varies | Varies |
| Tool poisoning detection | β 26/27 attacks | Varies | Varies | Varies |
| License | MIT | Apache 2.0 | MIT | MIT |
Our differentiators:
/mcp-audit slash command and runtime protectionProtect your local AI setup.
# Scan before installing a new server
npx mcp-security-guard scan server-config.json --confirm-launch
# Pin your reviewed servers
npx mcp-security-guard pin
# Check everything is still safe
npx mcp-security-guard audit
Block risky MCP servers and poisoned skills in code review.
Fail PRs that add:
Findings appear in GitHub's code scanning interface with OWASP MCP Top 10 references.
- uses: petrovicistefan/mcp-security-guard@main
with:
fail-on: high
Central security policy for your organization.
With the Team plan:
MCP Security Guard discovers servers from every place AI clients load them: user, local and project scope, servers shipped inside installed plugins, claude_desktop_config.json, Claude Desktop extensions, organization-managed managed-mcp.json, other clients on the machine (Cursor, VS Code, Windsurf), and claude.ai connectors you've used.
It scans everything a server puts into the AI's context: tools, server instructions, prompts, resources and resource templates.
| Check | What It Catches |
|---|---|
| Tool poisoning | Instruction overrides, "don't tell the user", <IMPORTANT> tags, directives to read secrets (~/.ssh, .env), conversation harvesting, exfiltration via URLs/parameters/Markdown images, HTML comments, encoded payloads |
| Full-schema poisoning | Same checks on parameter names, descriptions, defaults, enums, required, plus non-schema text in type |
| Hidden text | Zero-width, bidi-control and Unicode-tag characters, ANSI terminal escapes, homoglyph tool names |
| Tool shadowing | Server descriptions referencing another server's tools, tool-name collisions between servers |
| Rug pulls | Tool definitions or launch commands that changed after you pinned them (SHA-256 per tool). Skills, commands, subagents, CLAUDE.md and hooks of a plugin that changed after pinning (plugins changing files under the same version are flagged high). Re-checked automatically at every session start |
| Capabilities & score | Per-tool classification (execute, delete, write, egress), unauthenticated remote write access, 0β100 score and AβF grade per server, recommended permission rules |
| Supply chain | OSV vulnerabilities and malicious versions, typosquats, missing or brand-new packages, install scripts, publisher changes (opt-in network check) |
| Runtime | Hooks on every MCP call: ask before credentials are sent, warn on injected instructions or credentials in outputs, content-free audit log |
| Policy | .mcp-security.json approved/blocked servers and hosts, enforced in audits, CI and at session start |
| Toxic flows | Servers holding all three legs of the "lethal trifecta" (untrusted input, private data, egress capability), on their own or together. A posture note (low or info), not a defect |
| Agent context | Skills and their scripts, slash commands, subagents, rules, CLAUDE.md and plugin hooks: instruction overrides, "don't tell the user", invisible text, HTML comments addressed to the model, directives to read credential files, commands that upload credentials, download-and-run, encoded execution, infostealer scripts, pre-approved unrestricted Bash |
| Configuration | Plaintext secrets in env/headers/args/URLs, plain-HTTP remotes, unpinned npx/uvx packages, privileged or unpinned Docker images, pipe-to-shell launches, duplicate names across scopes |
Everything runs locally. Nothing is sent anywhere unless you opt in.
Every finding is tagged with its OWASP MCP Top 10 id, in reports and in SARIF.
| ID | Risk | Coverage |
|---|---|---|
| MCP01 | Token Mismanagement & Secret Exposure | β Plaintext secrets in env, headers, args and URLs. At runtime, asks before a credential is sent to an MCP server and warns when one comes back |
| MCP02 | Privilege Escalation via Scope Creep | β
Capability inventory (execute, delete, write, egress), ready-to-paste permissions.ask rules, privileged or broadly mounted containers |
| MCP03 | Tool Poisoning | β 26/27 published techniques detected, including full-schema poisoning, shadowing and name collisions, plus rug-pull pinning |
| MCP04 | Supply Chain Attacks | β Unpinned packages, images and git sources; OSV vulnerabilities and malicious versions; typosquats; new packages; install scripts; publisher changes |
| MCP05 | Command Injection & Execution | β
Flags tools that can execute commands; adversarial_test finds injectable parameters in servers you own |
| MCP06 | Prompt Injection via Contextual Payloads | β In tool metadata and, at runtime, in tool outputs (English patterns) |
| MCP07 | Insufficient AuthN/AuthZ | β Plain-HTTP remotes; remote servers exposing write or exec tools without authentication; OAuth detection |
| MCP08 | Lack of Audit and Telemetry | β
Local, content-free audit log of every MCP call, with query_audit_log |
| MCP09 | Shadow MCP Servers | β Discovery across user, project, local, plugin and Claude Desktop configs; approved-server policy enforced in audits, CI and at session start |
| MCP10 | Context Injection & Over-Sharing | β Conversation and system-prompt harvesting, Markdown-image exfiltration, credentials in outputs, network-egress inventory |
What a local tool cannot do (planned for hosted Team plan): org-wide discovery and audit aggregation, OAuth scope review.
Try a synthetic offline comparison with no dependencies, account, or API key needed:
git clone https://github.com/petrovicistefan/mcp-security-guard.git
cd mcp-security-guard
node scripts/offline-demo.mjs
The demo checks two saved tool descriptions: one produces instruction-override and sensitive-path findings; the clean counterpart produces no findings. Run the scans yourself and generate an HTML report.
| Tool | Network | Launches | Description |
|---|---|---|---|
list_mcp_servers | β | β | Lists every MCP server configured for this project (user, local and project scope in Claude Code, plus Claude Desktop) with its transport. Read-only; launches nothing. |
audit_mcp_config | β | β | Static audit of MCP server configuration: plaintext secrets in env/headers/args/URLs, plain-HTTP remote servers, unpinned npx/uvx packages, unpinned or privileged Docker containers, pipe-to-shell launch commands, and duplicate server names. Read-only; launches nothing. |
audit_server_tools | β | β Confirm | Connects to selected MCP servers, lists their tools, and checks every name, description and schema for tool poisoning, cross-server tool shadowing, and rug pulls. Never calls the scanned tools. Requires confirm_launch: true. |
pin_tools | β | β Confirm | Records a SHA-256 hash of every tool definition in ~/.claude/mcp-security/pins.json for rug-pull detection. Pin only after reviewing an audit. Requires confirm_launch: true. |
audit_agent_context | β | β | Scans CLAUDE.md, skills, slash commands, subagents, rules and plugin hooks for instruction overrides, requests to hide things from users, invisible text, credential exfiltration, and encoded execution. Read-only; launches nothing. |
pin_context | β | β | Records SHA-256 of every skill, command, subagent, rule, CLAUDE.md and plugin hook config in ~/.claude/mcp-security/context-pins.json for rug-pull detection in plugins. Pin only after reviewing an audit. |
analyze_tool_definitions | β | β | Offline analysis of tool definitions you provide (e.g., tools/list output from a server you're developing). Useful in CI or before publishing. Never connects to anything. |
check_supply_chain | β Confirm | β | For npx/uvx servers, checks packages on npm/PyPI and OSV database: vulnerabilities, malicious versions, typosquats, install scripts, deprecation, publisher changes. Sends package names and versions only. Requires confirm_network: true. |
apply_fixes | Conditional | Conditional | Fixes findings in project files: adds permissions.ask rules (needs confirm_launch), pins unpinned packages (needs confirm_network), or replaces literal secrets with ${VAR} references. Dry run by default; backs up files before writing. |
security_dashboard | β | Conditional | Opens interactive dashboard with scores, grades, findings by severity, OWASP MCP Top 10 breakdown, and pin buttons. scan="config" is read-only; scan="full" requires confirm_launch: true. MCP App hosts render it inline. |
generate_policy | β | β | Returns a .mcp-security.json policy that approves exactly the currently configured servers. Commit it to flag shadow servers in CI and audits. Read-only; does not write the file. |
team_status | β Confirm | β | Syncs organization policy from team backend and shows org name, role, policy version, and fleet reporting status. Requires team API key and confirm_network: true. |
request_approval | β Confirm | β | Creates an approval request for a blocked server or plugin when the team policy requires it. Admin decides via CLI. Requires confirm_network: true. |
team_report | β Confirm | β | Shows what a fleet report would send (server/plugin names, versions, transports; never paths, args, env, secrets). With confirm_send: true, sends it if admin enabled fleet visibility. |
export_bom | β | β | Agent bill of materials: inventory of MCP servers, plugins, skills, commands, subagents, CLAUDE.md and hooks with SHA-256, pin status, scores and OWASP evidence. CycloneDX 1.6 JSON or Markdown summary. Static; launches nothing. |
query_audit_log | β | β | Summarizes the local runtime audit log: MCP tool calls per server/tool, and calls where credentials were sent/returned or outputs contained injected instructions. Log stores hashes and sizes only, never arguments or outputs. |
adversarial_test | β | β Confirm | Calls tools with command-injection and path-traversal payloads to find vulnerable parameters. Only for servers you own/operate. Requires i_own_this_server: true and confirm_launch: true. Destructive tools skipped by default. |
Ask your AI agent in Claude Code or Cursor:
.mcp.json for plaintext secrets and unpinned npx packages."Fail pull requests that add risky MCP servers to .mcp.json, and show findings in GitHub code scanning:
name: MCP security
on: [pull_request]
permissions:
contents: read
security-events: write
jobs:
audit:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: petrovicistefan/mcp-security-guard@main
id: mcp
with:
fail-on: high # critical | high | medium | low | info | none
- uses: github/codeql-action/upload-sarif@v3
if: always()
with:
sarif_file: ${{ steps.mcp.outputs.sarif-file }}
To also fail PRs that add poisoned skills, commands or CLAUDE.md, set context: true (second SARIF file in context-sarif-file).
Command line:
# Audit project-level MCP servers
npx mcp-security-guard audit --project-only --format sarif --output mcp.sarif
# For MCP server authors: analyze a saved tools/list result
npx mcp-security-guard analyze-tools tools.json --name my-server
# Scan skills, commands, subagents and CLAUDE.md
npx mcp-security-guard audit-context --project-only --fail-on high
# Pin what you've reviewed
npx mcp-security-guard pin-context
# Scan a server before installing it
npx mcp-security-guard scan server-config.json --confirm-launch
# Test your own server for command injection (calls tools)
npx mcp-security-guard adversarial my-server.mcp.json --server my-server --i-own-this-server --confirm-launch
# Fix what the audit found
npx mcp-security-guard fix --pin-versions # npx pkg β pkg@x.y.z
npx mcp-security-guard fix --env-refs --write # secrets β ${VAR} references
npx mcp-security-guard fix --permissions --confirm-launch --write
# Generate a team policy from current configuration
npx mcp-security-guard policy-init && git add .mcp-security.json
Output formats: --format markdown|json|sarif|html (HTML is a self-contained report file).
Exit codes: 0 clean, 1 findings at or above --fail-on, 2 usage error.
security_dashboard is an MCP App that hosts supporting MCP Apps (Claude Desktop, claude.ai, VS Code Copilot) render inline.
Shows every server with its score and grade, findings filterable by severity and server, OWASP MCP Top 10 breakdown, recommended permission rules, and Full scan and Pin buttons.
To use in Claude Desktop:
{
"mcpServers": {
"mcp-security-guard": {
"command": "node",
"args": ["/path/to/mcp-security-guard/plugin/dist/index.mjs"]
}
}
}
Ask Claude to "open the MCP security dashboard".
Develop locally: npm run dashboard:dev -- /path/to/project
| Hook | What It Does | Setting |
|---|---|---|
PreToolUse on mcp__* | Asks for confirmation when arguments contain credentials | MCP_SECURITY_SECRET_GUARD=ask (default), deny, or off |
PostToolUse on mcp__* | Warns when output contains injected instructions, hidden characters, exfiltration markup, or credentials | Always on |
| Audit log | ~/.claude/mcp-security/audit.jsonl: server, tool, time, input hash and sizes. Never arguments or outputs. Rotates at 10 MB | MCP_SECURITY_AUDIT_LOG=off to disable |
Hooks add ~40ms per MCP call.
Session-start check re-verifies pinned servers and stays silent unless something changed:
MCP_SECURITY_SESSION_CHECK=full (default): compare configs and re-list toolsMCP_SECURITY_SESSION_CHECK=config: compare configs only, launch nothingMCP_SECURITY_SESSION_CHECK=off: disableTeam keys are issued by hand for now: write to me.
With a team API key (MCP_SECURITY_API_KEY or plugin key setting), you get:
allowedPlugins, blockedPlugins) enforced in audits, CI, and at session startteam request, team approve, Slack-compatible webhook alerts/v1/team/dashboard: fleet, approvals, policy, keys, settingsteam compliance writes Markdown report with OWASP MCP Top 10 controls, evidence, violations, and pending approvalsAdmin actions are CLI only (not MCP tools), so injected text cannot trigger them.
mcp-security-guard team status
mcp-security-guard team report --dry-run
mcp-security-guard team request plugin some-plugin --note "for docs site"
mcp-security-guard team approvals --status pending # admin
mcp-security-guard team approve apr_β¦ --note ok # admin
mcp-security-guard team policy-push policy.json # admin
mcp-security-guard team keys create ana # admin
mcp-security-guard team settings --fleet on --webhook https://hooks.slack.com/β¦ --email alerts@acme.example
Everything above stays free. Free plugin is fully functional. See PRIVACY.md for what is sent.
Measured: detects 26/27 attacks from a corpus of publicly documented techniques, with 0 false positives on 13 hard benign samples and on 17 real servers (83 tools).
Techniques covered: tool poisoning and <IMPORTANT> tags (Invariant Labs), line jumping and ANSI escape deception (Trail of Bits), full-schema poisoning (CyberArk), tool shadowing, name collisions, zero-width/Unicode-tag/bidi smuggling, homoglyph names, base64 payloads, HTML comments, exfiltration via URLs/parameters/Markdown images.
See bench/RESULTS.md for full methodology and results.
npm install
npm run build # bundles to plugin/dist/ (committed, so plugin runs without npm install)
npm test
npm run bench # false-positive gate on real servers (network; Docker images optional)
test/fixtures/poisoned-server.mjs is a deliberately malicious server used by the end-to-end test.
Small, reproducible contributions are welcome: benign regression samples, synthetic detection cases, client configuration tests, and clearer examples.
See CONTRIBUTING.md for guidelines.
Contribution guide Β· Open tasks Β· Report a false positive
Trust model:
MIT License
Copyright (c) 2026 Stefan Petrovici
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
See LICENSE for the complete license text.
Remote servers that require OAuth (most hosted MCP servers) cannot be scanned at the tool level: the scanner cannot reuse Claude Code's tokens. Their configuration is still audited.
Part of the petrovicistefan MCP suite β local-first guardrails for AI coding agents.
| Server | Purpose | Link |
|---|---|---|
| π MCP API Guardian | OpenAPI contract checks and breaking-change detection | GitHub |
| π° MCP Cost Optimizer | LLM cost analysis and model-switch savings estimates | GitHub |
| ποΈ MCP Database Doctor | PostgreSQL migration linting, query analysis and EXPLAIN review | GitHub |
| π¦ MCP Dependency Doctor | Read-only npm dependency audit and health | GitHub |
| π MCP SEO Auditor | On-page SEO audits and bounded crawling | GitHub |
| πͺ MCP Marketplace | Browse and install the full suite | GitHub |
I'm Stefan Petrovici: passionate about IT, a husband and a father. I built MCP Security Guard on my own. I'm looking for a job.
I build web applications end to endβfrontend, backend, APIs and deploymentβand I'm happy to work on anything else that needs building. This repository shows how I work: tests, CI, careful documentation and attention to security.
I also build WordPress and WooCommerce plugins, available at pluginsforstores.com.
If your team is hiring, write to me at hello@petrovicistefan.ro.
Found this useful? Star this repository!
A GitHub star helps other developers discover the project and lets you save it for later. Thanks for supporting open source!
MCP Security Guard is not affiliated with Anthropic, Snyk, Cisco, or any other security vendor mentioned in this document.