Security & quality scanner for MCP servers — get an A-F report card in 30 seconds.
Project description
🛡️ MCPatrol
Lighthouse for MCP servers. Point it at any HTTP MCP endpoint and get back a security, cost, and quality report card in 30 seconds.
Why this exists
MCP servers are exploding in production — every major AI lab now supports the protocol, and they're being deployed faster than they're being audited. Public reporting (RSAC 2026, Perplexity CTO at Ask 2026) flagged real problems:
- Tool descriptions burning 40-50% of context windows before agents do any work
- Prompt-injection through tool descriptions ("rugpull" attacks)
- Auth handled inconsistently — many servers ship with bearer-token gaps
- Error responses leaking stack traces, file paths, and env vars
MCPatrol is a free, open-source CLI that tests for all of these in one command. No infrastructure, no signup. Audit a server, get an HTML report card, fix what matters.
Install
pip install mcpatrol
Use
# Audit a remote MCP server (HTTP or SSE)
mcpatrol https://my-mcp-server.com/sse
# With auth header
mcpatrol https://my-mcp-server.com/sse --auth-header "Bearer xyz123"
# Skip the slow tests (no latency loop, no Claude scoring)
mcpatrol https://my-mcp-server.com/sse --quick --no-quality
# Generate a demo report (no network, no API calls)
mcpatrol --demo
The output is a self-contained mcpatrol-report.html that opens in your browser. Share it, screenshot it, commit it to your repo.
What it checks
| Category | Examples |
|---|---|
| Security | TLS / plain HTTP, missing auth, prompt-injection in descriptions, error disclosure (stack traces, file paths, env vars), unmarked destructive tools, schema completeness |
| Cost | Total tokens burned by tool descriptions before any work happens. Compared against published industry benchmarks (median ~4,200 tokens; heavy ~8,500). |
| Tool clarity (optional, uses Claude API) | Asks Claude Sonnet to score each tool's description on a 1-10 rubric and suggest improvements |
| Reliability | Latency (median, p95, max), success rate over 10 calls, error patterns |
Every finding includes a CWE-style category, severity, and concrete remediation.
Honest scope
MCPatrol is a starting point, not a comprehensive pentest. It catches the common, public attack classes documented in the early-2026 MCP security research. It will not catch sophisticated zero-days, server-side bugs requiring authentication you don't have, or anything that requires source-code access.
Treat it like Lighthouse for the web — a fast first pass that flags the obvious problems, not a SOC 2 audit.
Quality scoring needs your API key
The optional --with-quality mode uses Claude to score tool descriptions. It uses your Anthropic API key:
export ANTHROPIC_API_KEY=sk-ant-...
mcpatrol https://my-mcp-server.com/sse
Cost: ~$0.001 per tool. Auditing a 40-tool server runs about 4 cents. Skip with --no-quality if you'd rather pay zero.
MCPatrol never sees, transmits, or stores your API key — it goes from your env directly to Anthropic.
What's coming
- stdio (local) MCP servers via
--launch "command args" - More security probes: SSE state-confusion, race conditions, auth flow tests
- CI mode: exit non-zero if grade drops below threshold
- JSON Schema spec for the findings format (so you can build dashboards on it)
- Markdown summary output (for PR comments)
Contributing
This is a brand-new project. Open issues, suggest probes, or PR new ones — every probe should map to a real, public attack class with a citation in the docstring.
License
MIT. Use it, fork it, ship it.
Built with care, in public.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file mcpatrol-0.1.0.tar.gz.
File metadata
- Download URL: mcpatrol-0.1.0.tar.gz
- Upload date:
- Size: 26.7 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.10.2
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
957014f3678cface8e9720582437a337f2c655ddff62625a01acb3f54001d930
|
|
| MD5 |
5a6071acf99f1f48501d17876a7460ba
|
|
| BLAKE2b-256 |
21b080fa282021de4c779f6898bc8d1d0aa1ac3a86d51af2f7bd0dfe95d82de0
|
File details
Details for the file mcpatrol-0.1.0-py3-none-any.whl.
File metadata
- Download URL: mcpatrol-0.1.0-py3-none-any.whl
- Upload date:
- Size: 27.6 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.10.2
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
c7c10cf894975cd6e59812cf22f0ecb4ad9dc6df2df064ffc94e0965ff1b37ad
|
|
| MD5 |
a2b1ac1eaf733ab8a0ad55d7c3174190
|
|
| BLAKE2b-256 |
9c84d25c034550f1a8eacd1deb7465c9c1e77efe275b81245518e10dc028514e
|