← mcp-drill · GitHub · PyPI

mcp-drill vs mcp-scan

Contracts vs Security — complementary, not competitors. Use both in CI.

mcp-scan asks “can this server be abused?” (prompt injection, exfiltration, tool poisoning).
mcp-drill asks “can this server be trusted when it returns a result?” — does its declared outputSchema reject a corrupted response, and does it handle bad input cleanly?

Finding in mcp-drill: 31 servers · 265 tools → only 3% enforceable (7/265) — see live scorecard

🧪 mcp-drill

Fault injection + contract scorecard. Deterministic, model-free, no LLM. Sits between client and server over stdio / Streamable HTTP, injects timeouts, malformed JSON-RPC, truncated & corrupted-but-valid outputs; scores outputSchema enforceability + error conformance.

contractsreliabilityCI gate

🔒 mcp-scan

Security scanner for MCP. Static + dynamic checks for prompt injection, malicious tool descriptions, credential leaks, permission issues. Great for pre-install vetting. (By Invariant Labs)

securitysupply chainpre-install

At a glance

Dimensionmcp-drillmcp-scan
QuestionWill the server's declared contract catch a wrong result?Can the server be tricked into leaking / executing something evil?
What it measuresoutputSchema enforceability (corruption acceptance), error conformance (unknown method / unknown tool / missing args)Tool description poisoning, prompt injection, credential exposure, permission scopes
HowLive stdio + HTTP probes, actually drives the server, validates corrupted payloads against the server's own schemaAnalyzes server metadata / tool definitions, optional runtime heuristics
Needs LLM?No — deterministic, reproducibleSometimes (LLM-assisted checks)
Transportstdio + Streamable HTTP (real MCP handshake)Static analysis (no live server required)
When to runCI on every PR — gate --min-output-schema / --min-error-handlingBefore installing a new MCP server / in marketplace vetting
OutputPer-server scorecard, badge JSON, --json gateFindings report (HIGH/MEDIUM/LOW)
Use together?Yes — mcp-scan before you install; mcp-drill in CI after you install. Different risks.

Why contracts matter (numbers)

mcp-drill scanned 31 popular MCP servers (265 tools) including Microsoft Learn, Hugging Face, Cloudflare, DeepWiki, GitHub MCP — all live, reproducible via mcp-drill scan:

This is not what mcp-scan measures. A server can be security-clean and still have vacuous contracts — your agent will silently act on garbage and neither scanner alone covers both risks.

Try it (1 command)

# score any MCP server — no LLM, no API key
pip install "mcp-drill[scan]"          # or: uvx mcp-drill scan -- ...
mcp-drill scan -- npx -y @modelcontextprotocol/server-filesystem /tmp
mcp-drill scan --url https://mcp.deepwiki.com/mcp
mcp-drill scan --json --url https://mcp.deepwiki.com/mcp > mcp-drill.json

# fault-inject in a proxy (deterministic, with seed)
mcp-drill wrap --faults timeout,truncate,corrupt -- npx -y @modelcontextprotocol/server-everything

# CI gate (GitHub Action)
# uses: TimurRakhmatullin86/mcp-drill@v0  with:
#   server: 'npx -y @modelcontextprotocol/server-filesystem /tmp'
#   min-error-handling: '0.9'   # fail if <90% probes handled cleanly

Which should I use?

Playground & docs