mcp-security-auditor — Claude Code subagent: setup and overview
Audits Model Context Protocol servers for vulnerabilities, configures OAuth 2.1 flows, and designs RBAC. Useful before deploying MCP tools to production.
npx claude-code-templates@latest --agent mcp-dev-team/mcp-security-auditorWhat mcp-security-auditor does
This subagent audits MCP server implementations, targeting authorization logic and token handling. It inspects OAuth 2.1 flows with PKCE, verifies Origin headers on Streamable HTTP, and checks session isolation to prevent confused deputy exploits.
The agent uses Read, Write, Edit, and Bash tools. It annotates dangerous actions as destructive or privileged, configures permission hierarchies, and benchmarks controls against frameworks like SOC 2 Type II, HIPAA, or GDPR.
Without direct repository file access and execution rights, the agent cannot inspect JSON-RPC handlers or run penetration tests.
What it helps with
- inspect MCP servers for token handling and authentication flaws
- design granular role hierarchies with annotations for destructive operations
- audit server configurations against SOC 2, HIPAA, and GDPR baselines
- test JSON-RPC batching and Streamable HTTP endpoints for edge cases
Example prompts for the agent
- Audit our MCP server code in server.ts for authorization vulnerabilities
- Design an RBAC scheme that marks destructive operations with explicit approval workflows
- Review the OAuth 2.1 implementation and PKCE handling across this project
How to install mcp-security-auditor
1claude-code-templates
npx claude-code-templates@latest --agent mcp-dev-team/mcp-security-auditor2Manually: put the files in place
.claude/agents/mcp-security-auditor.mdFor all projects use ~/.claude/agents/. Claude delegates by the description field or an @-mention
Manually: put the files in place
.codex/agents/mcp-security-auditor.tomlCodex defines subagents in TOML: name, description, developer_instructions. Move the Markdown text into developer_instructions by hand. For all projects use ~/.codex/agents/
Manually: put the files in place
.cursor/agents/mcp-security-auditor.mdCursor also reads .claude/agents/
Step by step, with commands for each platform: Claude Code subagents: how to create one, call it and keep context clean
Questions about mcp-security-auditor
How to install mcp-security-auditor in Claude Code?
Run npx claude-code-templates@latest --agent mcp-dev-team/mcp-security-auditor or place the agent prompt into .claude/agents/mcp-security-auditor.md.
What does mcp-security-auditor do?
It assesses MCP servers for protocol-level security gaps, configures access controls, and flags risky tools. The output includes categorized findings with remediation steps.
Which built-in tools does this subagent rely on?
It requires access to Read, Write, Edit, and Bash to inspect files, edit server configurations, and run test scripts.