The full upstream README, mirrored here for reference. Install config, tool schemas, adoption signals, and an original overview live on the MCP Failure Lab listing page.
A chaos-engineering and resilience-testing toolkit for Model Context Protocol servers.

Run a real deterministic delay scenario without cloning the repository or installing the package globally:
Example output:
The exact duration may vary slightly between runs. No API key or external MCP server is required.
Display the available commands:
Start the built-in MCP server over stdio:
Or start a local Streamable HTTP endpoint:
MCP Failure Lab helps server authors reproduce delays, hanging tools, cancellation, and transport loss in a deterministic way.
It provides controlled failure behavior for testing timeout handling, cancellation cleanup, transport-loss recovery, assertions, and CI outcomes.
MCP Failure Lab runs deterministic JSON scenarios against its built-in server or a configured external HTTP or stdio MCP target from the command line.
Available now:
ping, delay, hang, and disconnect toolsNot implemented:
MCP Failure Lab is not a general-purpose proxy. External targets are exercised through the same scenario calls and expectations as the built-in server.
Pass a target configuration to execute the same scenario against a Streamable HTTP or stdio MCP server:
See the external MCP targets guide for complete HTTP and stdio configuration, verified GitHub and GitLab workflows, browser-based MCP Inspector validation, lifecycle diagnostics, credential handling, and troubleshooting.
The repository also includes a safe, read-only GitHub MCP example using the official remote server:
GitLab is available through its OAuth-capable stdio bridge:
The first connection can open a browser for GitLab authorization. See the external-target guide for GitLab prerequisites and the difference between GitLab OAuth and GitHub token authentication.
The generic adapter contract drives external-target orchestration, and the deterministic test adapter verifies its lifecycle without external I/O. See the architecture documentation for lifecycle, ownership, timeout, and observation details.
MCP Failure Lab runs deterministic scenarios through its built-in MCP client and server or through
a configured external HTTP or stdio target. A scenario invokes a tool, records the observed outcome
and duration, and evaluates the declared expectations. Built-in scenarios use ping, delay,
hang, or disconnect; external scenarios use tools exposed by their target server.
Optional observer calls run sequentially on the same MCP client connection to verify post-conditions through a separate tool path.
See the architecture documentation for diagrams, responsibilities, and implementation boundaries.
Full guides and references are available at mcplab.dev/docs.
MCP Failure Lab targets MCP 2026-07-28 and accepts the 2025-11-25 initialization flow for
compatibility. See Streamable HTTP for protocol and
session details.
Run the package directly with npx:
No global installation is required.
To install the command globally:
The serve process waits for an MCP client. Press Ctrl+C to shut it down gracefully.
Streamable HTTP listens on http://127.0.0.1:3000/mcp by default. The server validates
the request path plus Host and Origin headers. Binding another host is an explicit
choice; this mode does not provide authentication or TLS, so do not expose it to an
untrusted network. Put authentication and TLS termination in a trusted front end if
remote access is required.
Scenario files use JSON:
From a repository checkout, run the included scenario:
Generate machine-readable output:
The command exits with:
| Code | Meaning |
|---|---|
0 | All expectations passed |
1 | The scenario could not be loaded or executed |
2 | One or more assertions failed |
For result assertions, observer calls, reporting formats, and timeout behavior, see the scenario and reporting documentation.
| Tool | Behavior |
|---|---|
ping | Returns a deterministic health response |
delay | Waits for a bounded duration before returning |
hang | Remains pending until the client cancels |
disconnect | Interrupts the active transport while a request is in flight |
See the fault tools reference for arguments and behavior.
Launch the official MCP Inspector web UI against the published package:
See External MCP targets for the complete browser-testing workflow and credential guidance.
See the Future AGI example for an
independent Python-client validation of the hang fault. It is an external validation example,
not an official integration or endorsement.
Clone the repository and install its dependencies:
Run the development CLI:
Before opening a pull request, run:
See CONTRIBUTING.md for the contribution workflow.
Planned work is tracked in GitHub Issues.
Roadmap items are not part of the current implementation unless explicitly documented as available.