/guardx:mcp-audit — MCP Configuration Audit
Audit your MCP configuration for vulnerabilities and security risks.
Trigger
User invokes /guardx:mcp-audit or asks to audit MCP configuration, check for privilege escalation vulnerabilities, detect tool description poisoning, scan for SSRF patterns, or identify rogue servers.
Steps
-
Get the MCP configuration path
- Ask: "What is the path to your MCP configuration file? (Usually ~/.claude/mcp.json or similar.)"
- If provided directly in the message, use it.
-
Confirm audit scope (optional)
- Default: run all checks (privilege model, tool descriptions, SSRF patterns, rogue servers).
- If the user wants to skip any, set
checkPrivilegeModelorcheckToolDescriptionstofalse.
-
Call
audit_mcp_configTool: audit_mcp_config Arguments: configPath: <path> checkPrivilegeModel: true # check for wildcard tool permissions checkToolDescriptions: true # check for injected keywords in descriptions -
Present privilege model findings
For each finding where a server allows all tools without an explicit allowlist:
🔓 Unrestricted Tool Access: <serverName> The server allows access to all tools with no allowlist. Recommendation: Define an explicit allowlist of trusted tools for this server. -
Present tool description poisoning findings
For each finding where tool descriptions contain adversarial keywords:
⚠️ Description Poisoning: <serverName> / <toolName> Adversarial keywords detected in tool description. Recommendation: Review and sanitize tool descriptions to remove instruction keywords. -
Present SSRF vulnerability findings
For any findings related to file:// URIs or /etc/ paths:
🚨 [CRITICAL — SSRF VULNERABILITY] Server: <serverName> Environment variable: <varName> Found: <value> Recommendation: Remove file:// URIs and absolute paths from environment variables. -
Present rogue server findings
For any findings where server names or commands match suspicious patterns:
⚠️ Rogue Server Detected: <serverName> Command: <command> Recommendation: Verify server authenticity and source before enabling. -
Overall risk summary
critical→ 🚨 CRITICAL — SSRF or file access vulnerability detectedhigh→ ⚠️ HIGH RISK — privilege model or tool poisoning issuesmedium→ ⚠️ MEDIUM RISK — suspicious server detectedlow→ ℹ️ LOW RISKpass→ ✅ PASS — no MCP security issues detected
-
Show recommendations Present the recommendations array with concrete remediation steps.
Attack Vectors Detected
| Finding Type | Attack Vector | Impact |
|---|---|---|
| Privilege Model | Server allows "tools": "*" | Attacker can call any MCP tool |
| Tool Description Poison | Tool descriptions contain "ignore", "override", "bypass" keywords | Attacker embeds hidden instructions in tool metadata |
| SSRF Pattern | Environment variables contain file:// or /etc/ paths | Server-Side Request Forgery, local file access |
| Rogue Server | Server name or command contains "malicious", "backdoor", "trojan" | Attacker-controlled MCP server |
Notes
- This audit scans the static MCP configuration file — no runtime analysis.
- The audit complements
/guardx:mcp-securitywhich tests tool poisoning dynamically via prompt injection. - After remediation, re-run this audit to verify findings are resolved.