← mcp-drill · GitHub · PyPI
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
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
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
| Dimension | mcp-drill | mcp-scan |
|---|---|---|
| Question | Will the server's declared contract catch a wrong result? | Can the server be tricked into leaking / executing something evil? |
| What it measures | outputSchema enforceability (corruption acceptance), error conformance (unknown method / unknown tool / missing args) | Tool description poisoning, prompt injection, credential exposure, permission scopes |
| How | Live stdio + HTTP probes, actually drives the server, validates corrupted payloads against the server's own schema | Analyzes server metadata / tool definitions, optional runtime heuristics |
| Needs LLM? | No — deterministic, reproducible | Sometimes (LLM-assisted checks) |
| Transport | stdio + Streamable HTTP (real MCP handshake) | Static analysis (no live server required) |
| When to run | CI on every PR — gate --min-output-schema / --min-error-handling | Before installing a new MCP server / in marketplace vetting |
| Output | Per-server scorecard, badge JSON, --json gate | Findings report (HIGH/MEDIUM/LOW) |
| Use together? | Yes — mcp-scan before you install; mcp-drill in CI after you install. Different risks. | |
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:
x-fastmcp-wrap-result from the Python SDK)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.
# 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
studies/pilot/run_pilot.pypip install mcp-drill[scan]