MCP Failure Lab
Click on "Install Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@MCP Failure Lablist the planned fault injection scenarios"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
MCP Failure Lab
A chaos-engineering and resilience-testing toolkit for Model Context Protocol servers.
Goal
MCP Failure Lab helps server authors reproduce transport failures, hanging tools, malformed responses, session loss, cancellation races, and other reliability problems in a deterministic way.
The project is being built incrementally, with an emphasis on protocol correctness, reproducible tests, explicit failure semantics, and clean operational behavior.
Related MCP server: AI Fuzz Testing MCP Server
Status
Early development.
The first working milestone includes:
A TypeScript command-line application
A
servecommandAn MCP server factory
MCP communication over stdio
A discoverable
pingtoolDependency-injected time for deterministic testing
Unit coverage for the ping result
Graceful
SIGINTandSIGTERMhandlingClean, reproducible build output
Manual end-to-end verification with MCP Inspector
Scenario execution and fault injection are not implemented yet.
Architecture
Current architecture
graph LR
Host[MCP Host or Inspector] --> Transport[stdio Transport]
Transport --> Host
Transport --> Server[MCP Server]
Server --> Transport
Server --> Registration[Ping Tool Registration]
Registration --> Result[Ping Result]
CLI[CLI serve command] --> Transport
CLI --> ServerThe current implementation has four responsibilities:
CLI — parses commands and starts the server through
serve.Transport —
StdioServerTransportexchanges JSON-RPC messages over standard input and output.Server factory —
createServerconstructs and configures the MCP server without starting I/O.Ping tool — registers the first MCP capability and returns a deterministic, testable health response.
Server construction and server execution remain separate. This allows future transports and integration tests to reuse the same server configuration.
Request flow
MCP Host
→ stdio transport
→ MCP server
→ ping tool handler
→ ping result
→ MCP responseDiagnostics must never be written to stdout while the stdio transport is active because stdout carries MCP protocol messages. Operational diagnostics are written to stderr.
Planned architecture
graph TD
CLI[CLI] --> Runner[Scenario Runner]
Runner --> Proxy[Fault Injection Proxy]
Proxy --> Target[Target MCP Server]
Runner --> Assertions[Assertion Engine]
Assertions --> Reporters[Reporters]
Reporters --> ConsoleReport[Console Report]
Reporters --> JsonReport[JSON Report]
Reporters --> JunitReport[JUnit Report]Planned capabilities include:
Deterministic fault scenarios
Response delays and hanging tools
Transport interruption
Malformed MCP messages
Duplicate responses
Session loss
Cancellation testing
Timeout assertions
Reproduction metadata
Console, JSON, and JUnit reports
The architecture will evolve incrementally. New abstractions will be introduced only when supported by a concrete requirement and corresponding tests.
Requirements
Node.js 22.19.0 or newer
npm
Install for development
Clone the repository and install its dependencies:
git clone https://github.com/anilloutombam/mcp-failure-lab.git
cd mcp-failure-lab
npm installThe package has not been published to npm yet.
Usage
Display CLI help:
npm run dev -- --helpDisplay the current version:
npm run dev -- --versionStart the MCP server over stdio:
npm --silent run dev -- serveThe process waits silently for an MCP client. Press Ctrl+C to shut it down gracefully.
Inspect the MCP server
Launch the official MCP Inspector:
npx @modelcontextprotocol/inspector npm --silent run dev -- serveIn the Inspector:
Connect using the stdio transport.
Open Tools.
List the available tools.
Select
ping.Run the tool.
A successful response resembles:
{
"status": "ok",
"timestamp": "2026-07-31T16:32:47.570Z"
}Do not share or commit the temporary authentication token included in the Inspector URL.
Development commands
Format the repository:
npm run formatCheck formatting without modifying files:
npm run format:checkRun TypeScript validation:
npm run typecheckRun tests:
npm testCreate a clean production build:
npm run buildRun the compiled CLI:
npm run start -- --helpProject structure
mcp-failure-lab/
├── README.md
├── package.json
├── package-lock.json
├── tsconfig.json
├── src/
│ ├── cli.ts
│ ├── ping.ts
│ └── server.ts
└── tests/
├── unit/
│ └── ping.test.ts
├── integration/
└── e2e/Generated directories such as dist/, coverage/, and node_modules/ are not committed.
Testing strategy
The project separates tests by responsibility:
Unit tests validate isolated domain behavior.
Integration tests will validate MCP client-server communication and transports.
End-to-end tests will validate CLI-driven scenarios involving real processes.
The current ping test injects a fixed clock so its result is deterministic across machines, timezones, and test runs.
Engineering principles
Prefer small, explicit interfaces.
Keep transport logic separate from tool behavior.
Treat all protocol and scenario data as untrusted.
Handle cancellation, timeouts, process signals, and cleanup explicitly.
Avoid writing diagnostics to stdout during stdio operation.
Introduce abstractions only after a concrete requirement appears.
Add regression coverage for every bug fix.
Keep commits focused and reviewable.
Development workflow
Development happens through focused branches and pull requests:
git switch -c feat/example-changeBefore opening a pull request, run:
npm run format:check
npm run typecheck
npm test
npm run buildThe main branch should remain in a working, reviewable state.
Roadmap
Initialize the TypeScript CLI
Add the MCP server factory
Add stdio transport
Add the deterministic
pingtoolValidate the server with MCP Inspector
Add MCP client-server integration coverage
Define the scenario schema
Add the first response-delay fault
Add timeout assertions
Add structured reports
Add CI
Add Streamable HTTP support
Publish the first npm prerelease
License
MIT
This server cannot be installed
Maintenance
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
Related MCP Servers
- Alicense-qualityDmaintenanceA comprehensive reference implementation demonstrating all features of the Model Context Protocol (MCP) specification, serving as documentation, learning resource, and testing tool for MCP implementations.Last updated1MIT
- Flicense-qualityDmaintenanceA Model Context Protocol server for LLM fuzzing and testing, providing secure access to multiple AI providers through a standardized interface.Last updated
- Alicense-qualityAmaintenanceA local MCP server that breaks on demand, allowing you to test your client against auth failures, disappearing tools, flaky responses, and token expiry from a web UI.Last updated2610MIT
- Alicense-qualityDmaintenanceA toy MCP server for exploring Model Context Protocol capabilities, including resources, tools, and prompts.Last updatedApache 2.0
Related MCP Connectors
MEOK MCP Test MCP — golden-file + schema-drift + tool-failure tests for any MCP server. Drop-in
A Model Context Protocol server for Wix AI tools
A comprehensive Model Context Protocol (MCP) server that enables AI assistants to interact with yo…
Latest Blog Posts
- Who's Calling? MCP Hosts Are an Identity Blind Spot (And the Spec Knows It)By Om-Shree-0709 on .mcpAgent IdentityOAuth 2.1
- Your AI Chatbot Just Exposed Your CEO's Salary to an InternBy Om-Shree-0709 on .Agent IdentityMCP SecurityOAuth Delegation
- Why MCP Servers Need Execution Sandboxing (And Why Your Current Stack Isn't Enough)By Om-Shree-0709 on .Agentic AiPrompt InjectionWebAssembly
MCP directory API
We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/anilloutombam/mcp-failure-lab'
If you have feedback or need assistance with the MCP directory API, please join our Discord server