Webhook Crash Lab MCP README

The full upstream README, mirrored for reference. Install config, tool schemas, adoption signals and our own overview live on the Webhook Crash Lab MCP listing page.

webhook-crash-lab-mcp

CI npm downloads Krrishkumar125/webhook-crash-lab-mcp MCP server

Coding agents write webhook handlers that work for one test event and break in production on retries, duplicates and forged signatures. This package gives them a loop: run webhook-crash-lab → read each failure with concrete suggestions and the lines to change → fix → re-run.

It ships three things:

WhatWhere
MCP serverwebhook-crash-lab-mcp (stdio, official MCP TypeScript SDK)src/
Claude Code pluginskill + MCP server config.claude-plugin/, skills/, .mcp.json
Codex / any-agent skillsame skill in the open Agent Skills format, plus an AGENTS.md snippet.agents/skills/, docs/AGENTS-snippet.md

Tools

ToolInputReturns
run_crash_labconfigPath, cwd?, scenarios?, reportPath?, handlerPaths?, scan?ok, counts, failures[] in fix order (failed checks, suggestions[], why, fix), notTested[], nextSteps[], scannedFiles[]
run_demomode: "broken" | "fixed"same shape, against the built-in demo app (no config needed)
explain_reportreportPath or report (JSON from webhook-crash-lab run --json), provider?, handlerPaths?same shape, e.g. for a CI report
list_scenariosnoneevery scenario with what / why / fix

Every result comes back as text for the model and structuredContent (with an outputSchema) for clients. Errors such as a missing or invalid config come back as isError results, not crashes.

Suggestions

Each failure carries suggestions[] built from what this run observed, not only the scenario's general hint:

Run showedkindSuggestion
a correctly signed event rejected with 4xxraw-bodyverify over the raw body before any JSON parser, same secret as the config
sequential duplicates deduplicated, parallel copies all appliedcheck-then-insertreplace the read then write with one unique insert of event.id
every duplicate appliedno-deduperecord event.id with a unique constraint in the business transaction
failed write answered 2xxack-after-failurereturn 5xx so the provider retries
failed write answered 5xx but the retry was skippedclaim-before-writesave the event id in the same transaction as the write
forged or unsigned event accepted, or a stale onesignature-not-enforced, timestamp-not-checkedverify first, timingSafeEqual, timestamp tolerance
bad signature or bad JSON answered 500verify-throws, json-parse-throwscatch and answer 400
an older event overwrote newer statestale-event-appliedtrack the last applied created or version per object

run_crash_lab also searches the project (or handlerPaths) for files that look like webhook handlers and attaches the lines that probably need the change, for example app.use(express.json()) for raw-body or a findUnique before a create for check-then-insert. This is pattern matching, not program analysis: treat the locations as places to look first. scannedFiles lists what was searched, and scan: false turns it off. Examples follow the config's provider (Stripe, GitHub, Razorpay or Standard Webhooks).

Compared with

webhook-crash-lab-mcpwebhook-crash-lab CLIwebhook-chaosStripe CLI (stripe trigger)eslint-plugin-webhook-safety
Called by a coding agent as a tool✅ MCPthrough the shellthrough the shellthrough the shellthrough ESLint
Duplicate, parallel and late deliveries✅✅✅❌ one event per trigger❌ static only
Checks business state, not just status✅✅see its docs❌❌
Suggestions tied to this run's results✅ with likely code locationsgeneral fix hint per scenariosee its docs❌✅ per lint finding
Real provider events❌ synthetic signed events❌ synthetic signed eventsrecorded Shopify and Stripe events✅ real test mode eventsn/a

Use the Stripe CLI to see a real event once, and this to make sure the handler survives the second, third and parallel copy.

60-second start

Install in VS Code Install in Cursor

Claude Code

Terminal
claude mcp add webhook-crash-lab -- npx -y webhook-crash-lab-mcp@0.3.0
# or the full plugin (MCP server + skill):
#   /plugin marketplace add Krrishkumar125/webhook-crash-lab-mcp
#   /plugin install webhook-crash-lab@webhook-crash-lab

Codex

sh
codex mcp add webhook-crash-lab -- npx -y webhook-crash-lab-mcp@0.3.0
mkdir -p .agents/skills && cp -r node_modules/webhook-crash-lab-mcp/.agents/skills/webhook-crash-lab .agents/skills/

Cursor / other MCP clients

config.json
{
  "mcpServers": {
    "webhook-crash-lab": { "command": "npx", "args": ["-y", "webhook-crash-lab-mcp@0.3.0"] }
  }
}

The examples pin the version so npx never silently runs a newer release. To update, check the latest with npm view webhook-crash-lab-mcp version, read the releases, then change @0.3.0 to the new version in your MCP config and restart the client.

Then ask: "Run the webhook crash lab demo", or "Make my Stripe webhook pass webhook-crash-lab". Paste docs/AGENTS-snippet.md into AGENTS.md / CLAUDE.md to make it a standing rule.

Safety

The code scan only reads source files inside cwd (skipping node_modules, build output and dot folders) and never changes them.

run_crash_lab imports your crash-lab config (.mjs/.js/.cjs, or .ts/.mts/.cts via the bundled jiti) (it is code, like any config file) and sends requests to its target. Point configs at a local server and a test database and secret only. The skill tells agents never to use production URLs or live secrets.

Related

Sibling packages

Other tools by the same author:

License

MIT © Krrish Kumar