MCP Security Scanner · 18 Local AST Rules · 0 Bytes Uploaded

Free MCP Config Security Scanner (mcp.json) — 18 Automated Local Checks

Audit mcp.json, .cursor/mcp.json, .vscode/mcp.json, and claude_desktop_config.json before hardcoded API keys, unpinned npx supply-chain RCE, or prompt-injection payloads reach developer laptops. Runs 100% client-side in your browser with 0 bytes uploaded.

Run Free Local Scan Download Free .vsix (156 KB) Pro Solo — $29 one-time Pro Team (10 seats) — $49
18 rules
MCP001–MCP018 exact AST checks
5 Quick Fixes
1-click IDE remediation (Cmd+.)
0 bytes
Uploaded — 100% browser execution
SARIF 2.1.0
GitHub Code Scanning + SOC 2 / DORA

Interactive mcp.json Security Scanner (18 Rules)

100% in-browser · 0 bytes sent · < 10 ms

Paste any Model Context Protocol JSON/JSONC configuration below or load the vulnerable sample to inspect line-accurate findings, CWE/SOC 2/ISO/DORA mappings, and IDE Quick Fixes. Zero network requests leave your browser.

Enforce all 72 rules in VS Code, Cursor, Windsurf & CI Download the free .vsix locally—or unlock Pro once (no subscription) for full workspace audits, stackguard-cli, SARIF 2.1.0, and SHA-256 sealed SOC 2 / ISO 27001 / DORA reports.

All 18 Real MCP Security Rules (MCP001–MCP018)

Every rule below is evaluated by the exact same TypeScript JSONC AST engine inside this browser scanner, the VS Code / Cursor / Windsurf .vsix extension, and stackguard-cli.

Rule ID Severity Risk & Compliance Mapping Quick Fix & Remediation
MCP001
Free
CRITICAL
Hardcoded secret or API key in MCP config
A secret, API key, or bearer token is hardcoded in mcp.json env or headers instead of referencing a secret input or environment variable.
CWE-798SOC 2 CC6.1ISO A.8.24DORA Art. 9(4)
1-Click IDE Quick Fix
Replace the literal value with a VS Code/Cursor secret input (${input:SECRET_NAME}) or environment variable reference (${ENV_VAR}).
MCP002
Free
HIGH
Unpinned npx package in MCP server
An MCP server launched via npx does not pin an exact package version (or uses @latest), exposing developer machines to silent supply-chain RCE.
CWE-829SOC 2 CC7.1ISO A.8.8DORA Art. 28
1-Click IDE Quick Fix
Pin an exact verified semver version (e.g. @modelcontextprotocol/server-filesystem@0.6.2).
MCP003
Free
CRITICAL
Dangerous remote shell pipe in MCP command
MCP command executes remote code via curl/wget piped to sh/bash/zsh, enabling arbitrary code execution without integrity verification.
CWE-78SOC 2 CC6.6ISO A.8.9DORA Art. 9(2)
Guided Remediation
Install the MCP server from a version-pinned package or verified local binary instead of piping remote scripts to a shell.
MCP004
Free
CRITICAL
Inline eval or dynamic shell execution in MCP args
MCP server uses eval, sh -c, bash -c, node -e, or python -c, increasing command-injection surface and bypassing static binary allowlists.
CWE-95SOC 2 CC6.1ISO A.8.28DORA Art. 9(2)
Guided Remediation
Invoke the MCP server executable directly with explicit argument arrays instead of shell wrappers or inline eval.
MCP005
Free
HIGH
Overly permissive bypass flag in MCP server args
MCP server passes dangerous flags such as --allow-all, --dangerously-skip-permissions, --yolo, --no-sandbox, or --trust-all.
CWE-250SOC 2 CC6.3ISO A.8.2DORA Art. 9(4)
Guided Remediation
Remove bypass flags and configure least-privilege tool and filesystem scopes explicitly.
MCP006
Free
HIGH
MCP server bound to 0.0.0.0 (all interfaces)
Binding a local MCP server to 0.0.0.0 exposes unauthenticated tool execution across the LAN or corporate Wi-Fi.
CWE-668SOC 2 CC6.6ISO A.8.20DORA Art. 9(3)
1-Click IDE Quick Fix
Bind local MCP servers strictly to 127.0.0.1.
MCP007
Free
CRITICAL
Sensitive host directory exposed to MCP server
MCP server arguments grant access to sensitive credential paths (~/.ssh, ~/.aws, ~/.gnupg, ~/.kube, /etc/shadow, ~/.config/gcloud).
CWE-732SOC 2 CC6.1ISO A.8.3DORA Art. 9(4)
Guided Remediation
Restrict MCP filesystem roots strictly to the active project directory.
MCP008
Pro
CRITICAL
Root (/) or full home directory (~) exposed to MCP server
Exposing the entire root filesystem (/) or user home directory (~/$HOME) lets any prompt injection read all local credentials and source code.
CWE-269SOC 2 CC6.3ISO A.8.2DORA Art. 9(4)
Guided Remediation
Scope filesystem arguments to a single workspace subdirectory (e.g. ${workspaceFolder}).
MCP009
Pro
MEDIUM
Unpinned uvx/pipx/bunx/docker package in MCP server
MCP server launched via uvx, pipx, bunx, pnpx, or docker run does not pin an exact version tag or digest.
CWE-829SOC 2 CC8.1ISO A.8.8DORA Art. 28
Guided Remediation
Pin an exact package version (pkg==1.2.3 / pkg@1.2.3) or immutable container digest (@sha256:...).
MCP010
Pro
HIGH
Cleartext HTTP remote MCP endpoint
Remote MCP SSE/HTTP server uses cleartext http:// over a non-localhost network, exposing prompts, context, and headers to interception.
CWE-319SOC 2 CC6.7ISO A.8.24DORA Art. 9(3)
1-Click IDE Quick Fix
Use https:// with valid TLS certificates for all non-localhost MCP endpoints.
MCP011
Pro
MEDIUM
Auto-install npx -y / --yes on unscoped package
Using npx -y or --yes silently downloads and executes packages on editor startup, amplifying typosquatting risk on unscoped packages.
CWE-829SOC 2 CC7.1ISO A.8.19DORA Art. 28
Guided Remediation
Prefer verified scoped packages with pinned exact versions or pre-installed local binaries.
MCP012
Pro
CRITICAL
Embedded credentials in MCP URL or database URI
A connection URI in MCP args or URL embeds a literal username and password.
CWE-522SOC 2 CC6.1ISO A.5.17DORA Art. 9(4)
Guided Remediation
Inject database or HTTP credentials via environment variables rather than literal connection strings.
MCP013
Pro
MEDIUM
TLS certificate verification disabled in MCP env
Setting NODE_TLS_REJECT_UNAUTHORIZED=0 or PYTHONHTTPSVERIFY=0 disables TLS certificate validation and enables MitM attacks.
CWE-295SOC 2 CC6.7ISO A.8.24DORA Art. 9(3)
1-Click IDE Quick Fix
Remove the override or set it to 1 and configure trusted corporate CA certificates via NODE_EXTRA_CA_CERTS.
MCP014
Pro
MEDIUM
Destructive write/drop privilege enabled on MCP server
Database or infra MCP server enables write/delete/drop flags (--allow-write, --read-write, READ_ONLY=false), widening AI blast radius.
CWE-250SOC 2 CC6.3ISO A.8.2DORA Art. 9(4)
Guided Remediation
Run database and production MCP servers in read-only mode by default and gate writes behind explicit approvals.
MCP015
Pro
MEDIUM
Excessive MCP server blast radius or wildcard tool allowlist
Wildcard auto-approval (alwaysAllow: ['*'] / allowedTools: ['*']) or >10 servers in one config dramatically expands prompt-injection impact.
CWE-269SOC 2 CC6.3ISO A.8.2DORA Art. 9(4)
Guided Remediation
Enumerate exact safe read-only tools in auto-allow lists and disable unused MCP servers.
MCP016
Pro
CRITICAL
Prompt-injection or tool-poisoning pattern in MCP config
Suspicious instruction override or covert exfiltration wording detected in MCP metadata/description/env (<IMPORTANT>, ignore previous instructions, exfiltrate).
CWE-74SOC 2 CC7.2ISO A.8.28DORA Art. 9(2)
Guided Remediation
Audit the MCP server definition immediately and remove untrusted instruction text.
MCP017
Pro
MEDIUM
Elevated privilege wrapper (sudo/doas/pkexec) in MCP command
Launching an MCP server through sudo, doas, pkexec, or runas grants root privileges to an AI-driven tool.
CWE-250SOC 2 CC6.3ISO A.8.2DORA Art. 9(4)
Guided Remediation
Run the MCP server as an unprivileged user without sudo.
MCP018
Pro
LOW
Process injection environment variable in MCP config
MCP env defines LD_PRELOAD, DYLD_INSERT_LIBRARIES, or NODE_OPTIONS=--require, which can hijack child process execution.
CWE-427SOC 2 CC6.1ISO A.8.9DORA Art. 9(2)
Guided Remediation
Remove dynamic library/preload overrides from MCP server environment definitions.

Frequently Asked Questions

Does this MCP config scanner upload my mcp.json or API keys?

No. StackGuard bundles its 18-rule MCP JSONC AST parser into scanner-bundle.js and runs entirely inside your browser. Zero bytes of your mcp.json, environment variables, or headers are ever transmitted over the network.

Which Model Context Protocol config files are supported?

StackGuard audits mcp.json, .cursor/mcp.json, .vscode/mcp.json, and claude_desktop_config.json (both mcpServers and servers schemas, including JSONC comments).

What MCP risks do rules MCP001–MCP018 catch?

They catch hardcoded API keys (MCP001), unpinned npx/uvx/docker packages (MCP002, MCP009), curl|sh pipes and inline eval (MCP003, MCP004), dangerous permission bypass flags like --allow-all (MCP005), 0.0.0.0 LAN bindings (MCP006), sensitive host mounts like ~/.ssh or / (MCP007, MCP008), cleartext HTTP endpoints (MCP010), embedded DB/HTTP credentials (MCP012), TLS overrides (MCP013), wildcard tool allowlists (MCP015), prompt-injection / tool-poisoning strings (MCP016), sudo wrappers (MCP017), and LD_PRELOAD process injection (MCP018).

How do I enforce these 18 MCP rules in VS Code, Cursor, or CI?

Install the free stackguard-0.2.0.vsix extension for real-time IDE diagnostics and 1-click Quick Fixes, or unlock StackGuard Pro ($29 Solo / $49 Team one-time via Polar.sh) to run all 72 rules in IDE and CI with SARIF 2.1.0 and SHA-256 sealed SOC 2 / ISO 27001 / DORA reports.