loading…
Search for a command to run...
loading…
Record debug sessions, commands, failed attempts, and successful fixes in local SQLite storage.
Record debug sessions, commands, failed attempts, and successful fixes in local SQLite storage.
npm version License npm downloads LobeHub Glama
mcp-debug-recorder answers a simple question fast: have I fixed this before?
It records debug sessions, terminal commands, failed attempts, and successful fixes in a local SQLite database so your MCP client can query your own debugging history in natural language.
npx mcp-debug-recorder
By default, data is stored at ~/.mcp-debug-recorder/sessions.db.
src/
├── db.ts - openDb(), createTestDb(), versioned MIGRATIONS[]
├── store.ts - Store class with dependency-injected SQLite access
├── search.ts - FTS5 + Fuse.js hybrid search
├── tools/ - MCP tool handlers grouped by session/search/admin concerns
├── types.ts - Zod schemas and TypeScript types
├── mcp.ts - MCP server wiring + tool registration
├── server-http.ts - Streamable HTTP transport
├── logging.ts - Structured logging with secret redaction
└── version.ts - Package version helper
The database schema is versioned via PRAGMA user_version. Migrations run automatically on startup, so upgrading does not require manual SQL.
DEBUG_RECORDER_DB=/path/to/custom.db npx mcp-debug-recorder
DEBUG_RECORDER_DB: override the SQLite database pathPORT: override the HTTP server port for Streamable HTTP modeLOG_LEVEL: minimum structured log level (debug, info, warn, error)FUZZY_THRESHOLD: override the Fuse.js threshold used during rerankingstart_debug_session: start tracking a new issueadd_fix: record a failed or successful fix attemptrecord_command: save a terminal command and its outputclose_session: mark a session as resolved or abandonedupdate_session: edit title, description, or tagsdelete_session: permanently delete a session with explicit confirmationsearch_sessions: search historical sessions with FTS5 + fuzzy rerankingfind_similar_errors: ask whether you have seen a similar error beforeget_session: fetch full session detailsget_session_context: fetch an AI-friendly summary of a sessionlist_sessions: browse sessions with filtersget_stats: summarize your debug historyexport_sessions: export your local history for backup or migrationimport_sessions: import a previously exported JSON payload{
"mcpServers": {
"mcp-debug-recorder": {
"command": "npx",
"args": ["mcp-debug-recorder"]
}
}
}
Create or update .vscode/mcp.json:
{
"servers": {
"mcp-debug-recorder": {
"type": "stdio",
"command": "npx",
"args": ["mcp-debug-recorder"]
}
}
}
codex mcp add mcp-debug-recorder -- npx mcp-debug-recorder
codex mcp list
gemini mcp add mcp-debug-recorder npx mcp-debug-recorder
gemini mcp list
antigravity --add-mcp "{\"name\":\"mcp-debug-recorder\",\"command\":\"npx\",\"args\":[\"mcp-debug-recorder\"]}"
"I'm getting
TypeError: Cannot read properties of undefined, have I seen this before?"
Call find_similar_errors with the current error text, then inspect the best match with get_session_context.
start_debug_sessionrecord_commandadd_fixupdate_session when the title or notes become clearerclose_sessionexport_sessions with format: "json"import_sessions~/.mcp-debug-recorder/sessions.dbbetter-sqlite3Note:
better-sqlite3uses a native addon. If you see binding errors, runnpm rebuild better-sqlite3for your Node version.
The package also supports Streamable HTTP:
npm run start:http
Useful routes:
GET /healthGET /versionPOST/GET/DELETE /mcpnpm ci
npm run lint
npm test
npm run build
npm run test:e2e
npm run docs:api
For release verification:
npm run format:check
npm run test:coverage
npm run prepublishOnly
Additional project docs:
Добавь это в claude_desktop_config.json и перезапусти Claude Desktop.
{
"mcpServers": {
"mcp-debug-recorder": {
"command": "npx",
"args": []
}
}
}