Model Context Protocol security
mcpwn
X-ray and tamper the traffic between an AI agent and its MCP servers. An intercepting man-in-the-middle proxy for the Model Context Protocol - watch every JSON-RPC message, and rewrite the tool results the server sends back to the agent. Burp Suite, but for AI agents.
⚠ Authorized testing only - use it on agents and servers you own or are explicitly authorized to assess.
One tool, six jobs
Intercept
Sit in the middle of a live MCP session: hold each JSON-RPC message and forward, drop, edit, or tamper it. The Repeater loop for AI agents.
Scan
Self-driving, agent-free scanner: paginated enumeration, content sampling, optional fuzzing, and a --fail-on CI gate emitting JSON / Markdown / SARIF.
Guard
Point it defensively and it's a firewall on the agent↔server channel: allow / warn / sanitize / block, plus rug-pull pinning and provenance tainting.
Templates
Nuclei-style attack rule-packs with CWE + severity metadata. Load one with --template <id>; new packs appear in the gallery automatically.
DVMCP
Damn-Vulnerable MCP: one intentionally-broken server per attack class, plus a CI-gradeable scoreboard that lights up the scanner and detectors.
Advisory
Turn findings into a self-contained HTML advisory and filled CVSS v3.1 + CWE GHSA-style markdown, the artifacts you drop into a write-up.
30-second quickstart
# Passive X-ray — watch all traffic, change nothing
mcpwn -v -- npx -y @modelcontextprotocol/server-filesystem /tmp # Apply JSON tamper rules to messages in flight
mcpwn -r attack.json -- node ./my-server.js # Self-driving scan — fail CI on findings at/above a severity
mcpwn scan --fuzz --findings-out ./out --fail-on high -- node ./my-server.js # Route your MCP client's servers through mcpwn (backed up, reversible)
mcpwn wrap --client claude-desktop Threat coverage
Fifteen MCP attack classes, each with a CWE, a detector/template/dvmcp server, and a fix.