# MCP Failure Lab

> MCP Failure Lab is an open-source MCP server for developer tools. Deliberately faulty MCP server for testing how agent clients handle tool errors. It runs locally on your machine and is started by your AI client.

- **Kind:** MCP server
- **Pricing:** Open source
- **Platforms:** CLI, Self-hosted
- **Repository:** https://github.com/cloudlabworks/mcp-failure-lab
- **MCP Registry name:** io.github.cloudlabworks/mcp-failure-lab
- **Categories:** [developer tools](https://ai-powered.com/categories/developer-tools)
- **Listing updated:** 2026-11-23

## About

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.

## Features

- **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

## Install

### Claude Code: Add with the CLI (Terminal)

```sh
claude mcp add mcp-failure-lab -- docker run -i --rm ghcr.io/cloudlabworks/mcp-failure-lab:0.1.2
```

Add --scope user to use it in every project, or --scope project to share it in .mcp.json.

### Claude Code: Or share it with your project (.mcp.json)

```json
{
  "mcpServers": {
    "mcp-failure-lab": {
      "command": "docker",
      "args": [
        "run",
        "-i",
        "--rm",
        "ghcr.io/cloudlabworks/mcp-failure-lab:0.1.2"
      ]
    }
  }
}
```

### Claude Desktop (claude_desktop_config.json)

```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.

### Cursor (~/.cursor/mcp.json)

```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.

### VS Code (~/.copilot/mcp-config.json)

```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.

### Codex: Add with the CLI (Terminal)

```sh
codex mcp add mcp-failure-lab -- docker run -i --rm ghcr.io/cloudlabworks/mcp-failure-lab:0.1.2
```

### Codex: Or add to config.toml (~/.codex/config.toml)

```toml
[mcp_servers.mcp-failure-lab]
command = "docker"
args = ["run", "-i", "--rm", "ghcr.io/cloudlabworks/mcp-failure-lab:0.1.2"]
```

### Gemini CLI and Antigravity: Gemini CLI (~/.gemini/settings.json)

```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

### Gemini CLI and Antigravity: Antigravity (~/.gemini/config/mcp_config.json)

```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 (~/.config/devin/mcp_config.json)

```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 (cline_mcp_settings.json)

```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 (Zed settings.json)

```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 (Settings → Tools → AI Assistant → Model Context Protocol (MCP) → Add)

```json
{
  "mcpServers": {
    "mcp-failure-lab": {
      "command": "docker",
      "args": [
        "run",
        "-i",
        "--rm",
        "ghcr.io/cloudlabworks/mcp-failure-lab:0.1.2"
      ]
    }
  }
}
```

### JetBrains AI Assistant and Junie: Junie (~/.junie/mcp/mcp.json)

```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 (~/.kiro/settings/mcp.json)

```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.

### Other clients (your client's MCP settings (most use this shape))

```json
{
  "mcpServers": {
    "mcp-failure-lab": {
      "command": "docker",
      "args": [
        "run",
        "-i",
        "--rm",
        "ghcr.io/cloudlabworks/mcp-failure-lab:0.1.2"
      ]
    }
  }
}
```

## Tools

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.

## 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.

## Alternatives

- [REA](https://ai-powered.com/mcp/rea): REA is an open-source MCP server for developer tools.
- [Codebase Memory](https://ai-powered.com/mcp/codebase-memory): Codebase Memory is an open-source MCP server for knowledge and memory.
- [Serena MCP: the IDE for your agent](https://ai-powered.com/mcp/serena-mcp-the-ide-for-your-agent): Serena MCP: the IDE for your agent is an open-source MCP server for developer tools.
- [XERJ](https://ai-powered.com/mcp/xerj): XERJ is an open-source MCP server for knowledge and memory.
- [Context7](https://ai-powered.com/mcp/context7): Context7 is a freemium MCP server for developer tools.
- [Chrome DevTools MCP](https://ai-powered.com/mcp/chrome-devtools-mcp-2): Chrome DevTools MCP is an open-source MCP server for browser automation.
- [GitHub](https://ai-powered.com/mcp/github): GitHub is an open-source MCP server for developer tools.
- [Ouroboros](https://ai-powered.com/mcp/ouroboros): Ouroboros is an open-source MCP server for developer tools.

---
Source: https://ai-powered.com/mcp/mcp-failure-lab
