MCP Chaos Rig
About
A local MCP server that breaks on demand. Test your client against auth failures, disappearing tools, flaky responses, and token expiry, all from a web UI.
Details
- Author
- typewise
- Categories
- Developer Tools, Security
Jump to
Setup
Install MCP Chaos Rig in your MCP client (Claude Desktop, Cursor, Windsurf, and others).
Repository: https://github.com/typewise/mcp-chaos-rig
Follow the installation instructions in the repository README, then restart your MCP client.
A local MCP server that breaks on demand. Test your client against auth failures, disappearing tools, flaky responses, and token expiry, all from a web UI.
You're building an MCP client. You need to test OAuth flows, token refresh, tool discovery, error handling, and session lifecycle. Production servers don't fail on command. You need a server that does.
Run a local MCP server where you control everything:
- Break authentication: force 401s and 500s mid-session, expire tokens on demand, reject refresh tokens
- Break tools: disable tools to triggertools/changed, switch schema versions live
- Break reliability: add random latency, make tool calls fail at configurable rates
- See everything: live request log shows inbound JSON-RPC calls and outbound SSE responses, with click-to-expand bodies
Control panel atlocalhost:4100/ui, MCP endpoint athttp://localhost:4100/mcp. Requires Node 20+.
npm install -g mcp-chaos-rig mcp-chaos-rig
git clone https://github.com/Typewise/mcp-chaos-rig.git cd mcp-chaos-rig npm install npm run dev
If your production environment needs to reach Chaos Rig, expose it via a tunnel (ngrok, Cloudflare Tunnel, etc.) and setBASE_URLso OAuth redirects resolve correctly:
BASE_URL=https://your-tunnel.example.dev npx mcp-chaos-rig
Auth mode starts at Bearer, so a tunnel-facing rig usually wantsAUTH_MODEtoo (none,bearer,headers,oauth). For OAuth with pre-registered credentials, seeClient registration.
All state is in-memory and resets on restart, back to whatever the environment seeds (AUTH_MODE,OAUTH_CLIENT_MODE,STATIC_*) or to the built-in defaults. Bearer starts with tokentest-token-123(valid until changed). OAuth tokens expire per TTL. Refresh tokens track ownership per client when enabled. After restart, do one refresh with ownership off to re-seed, then turn it on.
Configure auth mode, slow mode (random latency), and flaky tools (% failure rate).
Bearer, Fixed Headers and OAuth modes support fault injection: force 401 or 500 responses to test error handling. The mode starts at Bearer unlessAUTH_MODEsays otherwise.
OAuth mode adds controls for client registration, access token TTL, refresh token rejection, and refresh token ownership enforcement. OAuth endpoints are listed in a collapsible section.
Static mode reproduces authorization servers that issue credentials out of band (Google, Atlassian, most enterprise IdPs):
- registration_endpointdisappears from the well-known metadata
- POST /oauth/registerandPOST /registerreturn 404registration_not_supported
- any otherclient_idgetsinvalid_clientat/authorizeand/token
- an emptyclient_secretmakes it a public client, so the token endpoint accepts auth methodnone
- redirect URIs must match a configured one exactly, except the port on loopback hosts (RFC 8252)
The shipped default redirect URI points at a local client. Testing against a deployed client means registering that client's callback instead, or/authorizereturns 400invalid_request— the response lists the URIs that are registered, since the port relaxation only applies to loopback hosts andhttps://callbacks must match exactly.
Set the client at boot so a tunnel-facing rig starts ready:
AUTH_MODE=oauth \ OAUTH_CLIENT_MODE=static \ STATIC_CLIENT_ID=acme-client \ STATIC_CLIENT_SECRET=acme-secret \ STATIC_REDIRECT_URIS=https://platform-api.example.app/api/mcp/oauth/callback \ BASE_URL=https://your-tunnel.example.dev npx mcp-chaos-rig
AUTH_MODEis required here: it defaults tobearer, and the OAuth endpoints 404 until it isoauth(none,bearer,headers,oauth; anything else fails at startup).STATIC_REDIRECT_URISis comma-separated. An emptySTATIC_CLIENT_SECRET=boots a public client. Everything stays editable from the Server tab afterwards.
Changing theclient_iddrops the previous one, so you can test credential rotation against a live client. Set it from the API too:
curl -X POST localhost:4100/api/oauth-client -H 'Content-Type: application/json' \ -d '{"mode":"static","clientId":"acme-client","clientSecret":"acme-secret","redirectUris":["http://localhost:3000/api/mcp/oauth/callback"]}'
Toggle tools on/off. Disabling sendstools/changedto connected clients. Some tools (echo, add) support version switching.
- echo: returns your message (v2 adds format options)
- add: sums two numbers (v2 accepts an array)
- get-time: current server time as ISO 8601
- random-number: random integer in a range
- reverse: reverses a string
- typeEcho: echoes one optional parameter per JSON Schema primitive, to check a client round-trips every type
- dispute-charge: files a billing dispute, returns a JSON receipt
- list-contacts,get-contact-by-id,get-contact-by-email,search-contacts,create-contact,update-contact,delete-contact: SQLite CRUD
Three large-schema tools start disabled, for testing how a client handles wide inputs:submit-customs-declaration(all fields required),create-product-listing(25 required, 25 optional),search-properties(50 optional filters).
View and reset the SQLite database backing the contact tools. Starts with three seed records.
Live request log showing inbound requests and outbound SSE responses. Displays timestamp, source (mcp/auth/sse), method, status, JSON-RPC method, tool name, and arguments. Click any truncated body or args line to expand it. Keeps last 200 entries.
When auth mode is OAuth, the authorization endpoint shows an interactive consent page:
- npm package
- GitHub repository
- MIT License
This is a web browser that enables your coding agent, such as Claude Code, to visit websites on your behalf and assist you in identifying bugs or creating UI test cases.
Model Context Protocol server for Skycloak managed Keycloak. Manage clusters, realms, applications, SSO and users from any MCP client.
The first MCP server governed by ICA. A remote streamable HTTP server at https://mcp.aleeth.com/mcp with 37 governed tools: every call is risk-checked by Rail Guard before it runs and sealed with a signed Ed25519 receipt on a hash-chained public ledger anchored to Bitcoin. Fails closed: no receipt, no response. OAuth 2.0 with RFC 9728 discovery; anonymous requests get 401. This repository is the public interface and provenance record: a generated tool manifest with per-tool annotations, an SBOM and vulnerability scan with digested provenance, and a TRUST.md of verify-it-yourself commands. The implementation is private by design. Independent probe grade A from mcp-spec-check, re-verified 2026-07-24.
Turn any OpenAPI spec into a hosted MCP server in 30 seconds. One typed tool per endpoint, server-side auth injection, stable URL across spec updates. EU-hosted, GDPR-native.
Discover powerful AI agents, invoke them instantly, and verify every result with Ed25519 cryptographic proofs. Nine tools — five free, four billed — all protected by OAuth 2.1.
AI-safe approval plan gated Kubernetes operations through MCP with OAuth, RBAC, audit, guardrails.
A remote MCP server with GitHub OAuth authentication and built-in analytics tracking.
An MCP server with built-in GitHub OAuth support, deployable on Cloudflare Workers.
An MCP server with built-in GitHub OAuth support, designed for deployment on Cloudflare Workers.
Hosted mock-API MCP server: agents create live REST/GraphQL mock APIs, import OpenAPI/CSV/db.json, seed fake data, query and write records — free, no auth, stateless Streamable HTTP.
Sign in to leave a review
Use Google, GitHub, or an email account so ratings stay tied to real people.
No reviews posted yet.





