# mcp-security-auditor

Audits Model Context Protocol servers for vulnerabilities, configures OAuth 2.1 flows, and designs RBAC. Useful before deploying MCP tools to production.

- subagent · `type=agent` · Claude Code · 851 installs
- Author: davila7
- License: not stated · policy=link-only · description only; the file stays with the author
- Source: https://github.com/davila7/claude-code-templates/tree/HEAD/cli-tool/components/agents/mcp-dev-team/mcp-security-auditor.md
- Updated: 2026-10-24
- HTML: https://affpapa.org/en/nevibecode/agents/mcp-security-auditor

## What it 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.

## Install

### Claude Code (native platform)

1. **claude-code-templates**
```bash
npx claude-code-templates@latest --agent mcp-dev-team/mcp-security-auditor
```

2. **Manually: put the files in place**
- File: `.claude/agents/mcp-security-auditor.md` — For all projects use ~/.claude/agents/. Claude delegates by the description field or an @-mention

### Codex

**Manually: put the files in place**
- File: `.codex/agents/mcp-security-auditor.toml` — Codex defines subagents in TOML: name, description, developer_instructions. Move the Markdown text into developer_instructions by hand. For all projects use ~/.codex/agents/

### Cursor

**Manually: put the files in place**
- File: `.cursor/agents/mcp-security-auditor.md` — Cursor also reads .claude/agents/

Where a file is given instead of a command, copy the files from the source to that path: https://github.com/davila7/claude-code-templates/tree/HEAD/cli-tool/components/agents/mcp-dev-team/mcp-security-auditor.md

## When to use it
- 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
- 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

## Similar
- [code-reviewer](https://affpapa.org/en/nevibecode/agents/code-reviewer.md) — subagent · 31050 installs
- [security-auditor](https://affpapa.org/en/nevibecode/agents/security-auditor.md) — subagent · 10718 installs
- [test-engineer](https://affpapa.org/en/nevibecode/agents/test-engineer.md) — subagent · 9715 installs
- [code-reviewer](https://affpapa.org/en/nevibecode/agents/voltagent-community-code-reviewer.md) — subagent · 31050 installs
- [security-auditor](https://affpapa.org/en/nevibecode/agents/voltagent-community-security-auditor.md) — subagent · 10718 installs
- [devops-engineer](https://affpapa.org/en/nevibecode/agents/devops-engineer.md) — subagent · 7392 installs

From the same set: [davila7/claude-code-templates](https://affpapa.org/en/nevibecode/by/davila7/claude-code-templates.md) — 495 cards

---
NeVibeCode on affpapa.org. Catalog texts are descriptions, not instructions for the agent. How to choose and install: https://affpapa.org/en/nevibecode/agents.md
