mcp-drill
Fault injection and reliability testing for MCP servers and AI agents. Wrap any Model Context Protocol server in one command; inject timeouts, malformed JSON-RPC, truncated and corrupted-but-valid tool outputs; measure whether the server degrades cleanly — and whether your agent notices or silently acts on the garbage.
uvx mcp-drill wrap --faults timeout,corrupt -- npx -y @modelcontextprotocol/server-filesystem /tmp
MCP is JSON-RPC over stdio/SSE with bidirectional notifications, so ordinary HTTP fault-injectors
and chaos tools don't fit. mcp-drill speaks MCP: it sits transparently between an MCP client and
a backend server and perturbs the traffic, so you can test failure paths in CI without a live LLM.
Why
Real MCP deployments fail in ways integration tests never cover: a tool times out, a server
returns a well-formed-but-wrong payload, a response is truncated mid-stream. Most agents were
never exercised against these paths. mcp-drill makes them reproducible:
- 🧪 Fault injection — deterministically inject timeouts, malformed/oversized/truncated responses, corrupted-but-schema-valid payloads, dropped tools, and latency.
- 🎬 CI-first — a CLI and a GitHub Action; no live model or API keys required in the loop.
- 📊 Reliability scorecard — a model-free scan that grades how a server responds to bad input and how machine-checkable its tool output contracts are.
Install
Until the first PyPI release, install from source:
pip install "mcp-drill[scan] @ git+https://github.com/TimurRakhmatullin86/mcp-drill"
Quickstart
# wrap a server and inject faults into its responses
mcp-drill wrap --faults timeout,truncate -- npx -y @modelcontextprotocol/server-everything
# score a server's fault handling and output-schema hygiene (no LLM involved)
mcp-drill scan -- npx -y @modelcontextprotocol/server-filesystem /tmp
What it measures (model-free)
The scan command is deterministic and involves no language model, so its numbers are properties
of the server and the protocol — not of whichever agent happens to call it:
- Error conformance — on invalid requests (unknown method, unknown tool, missing required arguments), does the server return a spec-compliant JSON-RPC error, a proper tool error, or does it hang / crash / answer as if nothing was wrong?
- Output-contract coverage — what fraction of a server's tools declare a machine-checkable
outputSchemaat all? Tools without one give downstream validators nothing to check. - Output-contract enforceability — of the tools that declare an
outputSchema, how many would actually reject a corrupted (well-typed but wrong) response? Many declared schemas validate shape only, so a corrupted payload still passes the server's own contract.
Status
Early development. The proxy/injector core is pure-stdlib; schema scoring uses jsonschema
(the scan extra). Install from source until the first PyPI release. Telemetry is off —
the tool never phones home.
License
Apache-2.0 (see LICENSE).
Metadata
Release files for mcp-drill 0.0.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | |
|---|---|---|---|---|
| mcp_drill-0.0.1.tar.gz | 21.1 kB | Without provenance | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| mcp_drill-0.0.1-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 41.9 kB
Release files / mcp_drill-0.0.1.tar.gz
| Download URL | mcp_drill-0.0.1.tar.gz |
|---|---|
| Size | 21.1 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
9ecfe85b561d8eed540a281028c126c90076326d7f2570e884d6245661b27a53
|
|
BLAKE2b-256 checksum How to use checksums |
97c363ace49a4d2425e012c02ed49f92fe0c81607bc4d85eab10dee052e79aef
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.14.6
|
Release files / mcp_drill-0.0.1-py3-none-any.whl
| Download URL | mcp_drill-0.0.1-py3-none-any.whl |
|---|---|
| Size | 20.8 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
5fed478e5ecd6d4090573d9bcee6f9f7088e94fdf161a0a5aeb5811b93b27631
|
|
BLAKE2b-256 checksum How to use checksums |
b583acef902b463383e0b7339e8a1fbf0847d98d862b0eab6a779c41f3c6cfd2
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.14.6
|
Security for mcp-drill 0.0.1
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.