Skip to main content
Glama

flaredump

ci npm JSR Bun license

Flight recorder for Cloudflare Workers: capture failed requests (D1, KV, R2, and Workers AI reads) into .cfreplay.json and replay them offline in milliseconds.

Install

Bun / npm:

bunx flaredump replay ./crash.cfreplay.json
npx flaredump replay ./crash.cfreplay.json

# or install in your project / globally
bun add -d flaredump
npm i -D flaredump

JSR:

bunx jsr add @kanchingyg/flaredump
npx jsr add @kanchingyg/flaredump

Related MCP server: FlowLens MCP

Quick start

npx flaredump replay ./crash.cfreplay.json
bunx flaredump replay ./crash.cfreplay.json
npx flaredump --explain ./crash.cfreplay.json --model ollama/qwen2.5-coder:7b
npx flaredump --mcp

Worker middleware

import { withFlareDump } from "flaredump";

export default withFlareDump(async (request, env) => {
  const rows = await env.DB.prepare("SELECT 1").all();
  return Response.json(rows);
});

On throw or status >= 500, flaredump serializes the request plus binding results (secrets redacted as [REDACTED]).

MCP (Cursor, Claude Code, Kilo Code, Pi)

Add to your MCP config:

{
  "mcpServers": {
    "flaredump": {
      "command": "npx",
      "args": ["-y", "flaredump", "--mcp"]
    }
  }
}

Tool

Purpose

inspect_cf_crash

Request, stack, D1/KV trace (context-truncated for local models)

replay_cf_crash

Re-run handler with deterministic mocked bindings

export_vitest_regression

Emit a Vitest regression test (--allow-write or --dry-run)

Local models (Ollama / LM Studio)

Use --explain with any OpenAI-compatible or Ollama endpoint to summarize a capture:

npx flaredump --explain crash.cfreplay.json --model ollama/qwen2.5-coder:7b

License

MIT

Related MCP Connectors

Related MCP Servers

  • A
    license
    Not graded
    quality
    A
    maintenance
    Enables coding agents to capture and replay intermittent software failures, minimize reproductions, compare trials, search regressions, verify proposed fixes against a saved failing baseline, and retrieve investigation evidence without rerunning commands.
    39 npm
    MIT
  • F
    license
    Not graded
    quality
    A
    maintenance
    Enables coding agents to inspect recorded browser flows—including user actions, network, console, storage, DOM events, and screen recordings—for debugging, bug reporting, regression testing, and Playwright test generation.
    -
  • F
    license
    Not graded
    quality
    A
    maintenance
    Gives coding agents full browser context from recorded user flows, including actions, network, console, storage, DOM events, and screen recordings. Enables in-depth debugging, bug reporting, regression testing, and Playwright test generation without reproducing issues.
    -