MCP Failure Lab
Deliberately faulty MCP server for testing how agent clients handle tool errors
MCP Failure Lab is an open-source MCP server for developer tools. It runs locally on your machine and is started by your AI client.
- Pricing
- Open source
- Platforms
- CLI, Self-hosted
- Runs
- Locally
- Version
- 0.1.2
- Listing updated
Similar MCP servers
Install
You install MCP servers on a computer. Send yourself the link.
Add with the CLI
Run in a terminal
claude mcp add mcp-failure-lab -- docker run -i --rm ghcr.io/cloudlabworks/mcp-failure-lab:0.1.2Add --scope user to use it in every project, or --scope project to share it in .mcp.json.
Or share it with your project
Add to .mcp.json
{
"mcpServers": {
"mcp-failure-lab": {
"command": "docker",
"args": [
"run",
"-i",
"--rm",
"ghcr.io/cloudlabworks/mcp-failure-lab:0.1.2"
]
}
}
}Add to claude_desktop_config.json
{
"mcpServers": {
"mcp-failure-lab": {
"command": "docker",
"args": [
"run",
"-i",
"--rm",
"ghcr.io/cloudlabworks/mcp-failure-lab:0.1.2"
]
}
}
}Settings → Developer → Edit Config, then quit and reopen Claude Desktop.
Add to ~/.cursor/mcp.json
{
"mcpServers": {
"mcp-failure-lab": {
"command": "docker",
"args": [
"run",
"-i",
"--rm",
"ghcr.io/cloudlabworks/mcp-failure-lab:0.1.2"
]
}
}
}Use .cursor/mcp.json in a project to share it with the project.
Add to ~/.copilot/mcp-config.json
{
"mcpServers": {
"mcp-failure-lab": {
"type": "stdio",
"command": "docker",
"args": [
"run",
"-i",
"--rm",
"ghcr.io/cloudlabworks/mcp-failure-lab:0.1.2"
]
}
}
}Or put the same entry in .mcp.json at your workspace root to share it.
Add with the CLI
Run in a terminal
codex mcp add mcp-failure-lab -- docker run -i --rm ghcr.io/cloudlabworks/mcp-failure-lab:0.1.2Or add to config.toml
Add to ~/.codex/config.toml
[mcp_servers.mcp-failure-lab]
command = "docker"
args = ["run", "-i", "--rm", "ghcr.io/cloudlabworks/mcp-failure-lab:0.1.2"]Add to your client's MCP settings (most use this shape)
{
"mcpServers": {
"mcp-failure-lab": {
"command": "docker",
"args": [
"run",
"-i",
"--rm",
"ghcr.io/cloudlabworks/mcp-failure-lab:0.1.2"
]
}
}
}Gemini CLI and Antigravity
Gemini CLI
Add to ~/.gemini/settings.json
{ "mcpServers": { "mcp-failure-lab": { "command": "docker", "args": [ "run", "-i", "--rm", "ghcr.io/cloudlabworks/mcp-failure-lab:0.1.2" ] } } }Or run: gemini mcp add -s user mcp-failure-lab docker -- run -i --rm ghcr.io/cloudlabworks/mcp-failure-lab:0.1.2
Antigravity
Add to ~/.gemini/config/mcp_config.json
{ "mcpServers": { "mcp-failure-lab": { "command": "docker", "args": [ "run", "-i", "--rm", "ghcr.io/cloudlabworks/mcp-failure-lab:0.1.2" ] } } }Use .agents/mcp_config.json to add it to one workspace only.
Devin Desktop (formerly Windsurf)
Add to ~/.config/devin/mcp_config.json
{ "mcpServers": { "mcp-failure-lab": { "command": "docker", "args": [ "run", "-i", "--rm", "ghcr.io/cloudlabworks/mcp-failure-lab:0.1.2" ] } } }On Windows the file is %APPDATA%\devin\mcp_config.json. Use .devin/mcp_config.json to share it with a project.
Cline
Add to cline_mcp_settings.json
{ "mcpServers": { "mcp-failure-lab": { "command": "docker", "args": [ "run", "-i", "--rm", "ghcr.io/cloudlabworks/mcp-failure-lab:0.1.2" ] } } }Open it from the MCP Servers icon → Configure → Configure MCP Servers.
Zed
Add to Zed settings.json
{ "context_servers": { "mcp-failure-lab": { "command": "docker", "args": [ "run", "-i", "--rm", "ghcr.io/cloudlabworks/mcp-failure-lab:0.1.2" ] } } }Open it with zed: open settings file. Merge context_servers into the settings you already have.
JetBrains AI Assistant and Junie
AI Assistant
Add to Settings → Tools → AI Assistant → Model Context Protocol (MCP) → Add
{ "mcpServers": { "mcp-failure-lab": { "command": "docker", "args": [ "run", "-i", "--rm", "ghcr.io/cloudlabworks/mcp-failure-lab:0.1.2" ] } } }Junie
Add to ~/.junie/mcp/mcp.json
{ "mcpServers": { "mcp-failure-lab": { "command": "docker", "args": [ "run", "-i", "--rm", "ghcr.io/cloudlabworks/mcp-failure-lab:0.1.2" ] } } }Use .junie/mcp/mcp.json to share it with a project.
Kiro
Add to ~/.kiro/settings/mcp.json
{ "mcpServers": { "mcp-failure-lab": { "command": "docker", "args": [ "run", "-i", "--rm", "ghcr.io/cloudlabworks/mcp-failure-lab:0.1.2" ] } } }Use .kiro/settings/mcp.json to add it to one workspace only.
Using several servers? Build one config file with the MCP config generator.
Configuration
LAB_SCENARIOFault to inject: healthy, tool-error, transient-error, delay, malformed, or disconnectLAB_DELAY_MSDelay in milliseconds for the delay scenario (0 to 10000)LAB_FAILURESFailing calls before success for the transient-error scenario (0 to 10)
About MCP Failure Lab
MCP Failure Lab exposes one tool, lab_probe, and makes it misbehave on purpose so you can see what your client or agent loop does. A LAB_SCENARIO setting picks the fault: healthy, tool-error, transient-error, delay, malformed or disconnect. The delay and the number of failing calls before success are tunable (up to 10000 ms and 10 failures).
It ships as a Docker image that runs over stdio with no network, no credentials and no file-writing tools. A bounded reference client prints JSON results and OpenAI-message-shaped traces from seven deterministic runs, with no language model involved. The README suggests feeding a trace into the author's separate Agent Trace Clinic, which should flag tool_loop, retry_storm and unhandled_tool_error.
Scope is narrow by design. It corrupts result shape, not JSON framing; bad IDs, HTTP failures and authentication faults are not implemented. It does not claim MCP conformance certification, and integrations with other clients are unverified.
Tools this server provides (1)
Taken from the project documentation; the running server may differ.
From the tool list in its README, going by the names, 1 name doesn't say.
From the server's own tool labels and tool names; not verified by us.
- lab_probe
- The single tool whose behaviour is altered by the selected fault scenario.
What it does
- Six fault modes
- Healthy, tool-error, transient-error, delay, malformed and disconnect scenarios.
- Tunable faults
- Set the delay in milliseconds and how many calls fail before success.
- Locked-down container
- Runs read-only with no network and dropped capabilities.
- Reference client
- A bounded harness that retries only explicit tool errors, at most five times.
- Signed releases
- Release images and tarballs carry Sigstore build provenance.
Good for
- Check that an agent stops after a bounded number of retries
- Test how a client reports a mid-response disconnect
- Verify timeout handling with a slow tool
- Produce failing traces for debugging tools
Pricing
Open source
MIT-licensed
MCP Failure Lab FAQ
How do I run MCP Failure Lab?
Use the published image with docker run -i and set LAB_SCENARIO to the fault you want.
What is the licence?
The README says MIT.
Does MCP Failure Lab send telemetry?
No. The README says there is no telemetry or remote reporting.
Does MCP Failure Lab support HTTP transport?
Not yet; this first release is stdio only.
Is MCP Failure Lab free?
Yes. MCP Failure Lab is open source, so you can use and self-host it for free.
How do I add MCP Failure Lab to Claude Code?
Run this command in your terminal: claude mcp add mcp-failure-lab -- docker run -i --rm ghcr.io/cloudlabworks/mcp-failure-lab:0.1.2
What are the best alternatives to MCP Failure Lab?
The closest alternatives to MCP Failure Lab are REA, Codebase Memory, Serena MCP: the IDE for your agent, XERJ and Context7.
Where this comes from
- Description: written from the project's README.
- Install steps: from the official MCP Registry entry.



