Skip to main content
Glama

Tests Zero Dependencies Node.js >= 22.5 License MIT

Local dev black-box ring buffer for ANSI-stripped terminal logs, deduplicated stack traces, and redacted HTTP failure capture over MCP.

Works with Claude Code, Cursor, Windsurf, Codex CLI, and Antigravity.

Debugging a local backend or frontend with an AI coding agent usually means copying terminal stack traces and failing network payloads into chat by hand. Raw terminal output is also noisy with ANSI color codes and repeated identical errors.

flight-recorder-mcp wraps any local dev command (flight-recorder run -- npm run dev) and optionally proxies local HTTP traffic (flight-recorder proxy), storing clean logs, fingerprinted stack traces, and redacted HTTP 4xx/5xx failures in a bounded node:sqlite WAL ring buffer so an agent can inspect trace_incident on demand.

Quick start

Requires Node.js >= 22.5.0.

# Wrap your local dev command while keeping full terminal output
npx -y github:keenfolk1-lgtm/flight-recorder-mcp run --service api -- npm run dev

# Optional HTTP proxy capturing >=400 or >1500ms responses with secrets redacted
npx -y github:keenfolk1-lgtm/flight-recorder-mcp proxy --listen 4080 --target http://127.0.0.1:3000

# View deduplicated runtime errors from the CLI
npx -y github:keenfolk1-lgtm/flight-recorder-mcp errors

MCP server registration

claude mcp add flight-recorder -- npx -y github:keenfolk1-lgtm/flight-recorder-mcp serve

Or add to mcp.json:

{
  "mcpServers": {
    "flight-recorder": {
      "command": "npx",
      "args": ["-y", "github:keenfolk1-lgtm/flight-recorder-mcp", "serve"]
    }
  }
}

Related MCP server: backscroll

Example trace_incident output

When an error occurs three times and a POST /api/checkout returns HTTP 500 with Authorization: Bearer ... and {"password":"..."}:

### Latest HTTP Failures
- 500 POST /api/checkout (11ms): {"error":"db crash","secret":"[REDACTED]"}

### Recent Deduplicated Errors
- [3x] TypeError: null user id 000000
    at verifySession (src/session.mjs:14:9)

### Recent Logs
2026-11-23T10:00:01.000Z [stdout] booting dev server
2026-11-23T10:00:01.002Z [stdout] ready on port 3000

Sensitive headers (authorization, cookie, set-cookie, x-api-key, x-auth-token) and JSON fields matching password, token, secret, or apiKey are replaced with [REDACTED] before hitting SQLite.

MCP tools

Tool

Purpose

trace_incident

Returns recent HTTP failures, top deduplicated errors, and surrounding log lines together.

get_recent_errors

Lists unique error fingerprints with stack trace, occurrence count, and first/last timestamp.

get_failed_requests

Lists HTTP >= 400 or slow requests with redacted headers and truncated bodies.

tail_logs

Queries the bounded ANSI-stripped log ring buffer by service or substring.

recorder_status

Reports SQLite path and active row counts.

Limitations

HTTP capture records requests routed through flight-recorder proxy and skips successful 2xx/3xx responses under slowMs (default 1500ms) to keep the ring buffer compact. Stack grouping recognizes Node.js, Python, Go, and ERROR/FATAL prefixes; custom unstructured multi-line logs fall back to tail_logs.

License

MIT

Related tools: mcp-diet · skill-guard · blast-radius-mcp · agent-undo · vibe-to-prod

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections.

Loading tool schema changelog…

    Related MCP Connectors

    Related MCP Servers

    • A
      license
      Not graded
      quality
      D
      maintenance
      A 100% local development monitoring tool that captures browser console logs, network requests, and backend server output for analysis by AI assistants via MCP. It enables LLMs to debug applications by providing structured, real-time access to full-stack log data and persistent local storage.
      7
      MIT
    • A
      license
      A
      quality
      C
      maintenance
      Records your terminal sessions per command (PTY + OSC 133) into local SQLite, so AI agents can search, retrieve, and diff what commands actually printed. Secret redaction is applied by default to everything served over MCP.
      4
      7
      MIT
    • F
      license
      Not graded
      quality
      D
      maintenance
      A local-first MCP server that gives AI coding agents runtime visibility and AI-managed debug logging. It replaces blind print() debugging by turning runtime execution into causal chains, allowing agents to instantly locate bugs by finding missing .success events in Python and TypeScript code. Single binary with MCP, CLI, and HTTP interfaces.
      -
    • A
      license
      Not graded
      quality
      C
      maintenance
      Enables AI agents to self-report every tool call, token usage, decision, and session grade into a local SQLite store, so users can trace execution, audit reasoning, and see per-session costs in a local dashboard. Also supports proxy mode to intercept and trace MCP tool invocations for agents that cannot self-report.
      79 npm
      2
      MIT