MCP Debug Recorder
mcp-debug-recorder
mcp-debug-recorder 可以快速回答一个简单的问题:我以前修复过这个问题吗?
它将调试会话、终端命令、失败尝试和成功修复记录在本地 SQLite 数据库中,以便您的 MCP 客户端可以使用自然语言查询您自己的调试历史记录。
快速开始
npx mcp-debug-recorder默认情况下,数据存储在 ~/.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模式版本控制
数据库模式通过 PRAGMA user_version 进行版本控制。迁移会在启动时自动运行,因此升级不需要手动执行 SQL。
添加自定义数据库路径
DEBUG_RECORDER_DB=/path/to/custom.db npx mcp-debug-recorder配置
环境变量
DEBUG_RECORDER_DB:覆盖 SQLite 数据库路径PORT:覆盖 Streamable HTTP 模式的 HTTP 服务器端口LOG_LEVEL:最低结构化日志级别(debug、info、warn、error)FUZZY_THRESHOLD:覆盖重排序期间使用的 Fuse.js 阈值
可用工具
start_debug_session:开始跟踪一个新问题add_fix:记录一次失败或成功的修复尝试record_command:保存终端命令及其输出close_session:将会话标记为已解决或已放弃update_session:编辑标题、描述或标签delete_session:在明确确认后永久删除会话search_sessions:使用 FTS5 + 模糊重排序搜索历史会话find_similar_errors:询问您以前是否见过类似的错误get_session:获取完整的会话详情get_session_context:获取会话的 AI 友好摘要list_sessions:通过过滤器浏览会话get_stats:总结您的调试历史export_sessions:导出您的本地历史记录以进行备份或迁移import_sessions:导入之前导出的 JSON 有效负载
客户端设置
Claude Desktop
{
"mcpServers": {
"mcp-debug-recorder": {
"command": "npx",
"args": ["mcp-debug-recorder"]
}
}
}VS Code / GitHub Copilot
创建或更新 .vscode/mcp.json:
{
"servers": {
"mcp-debug-recorder": {
"type": "stdio",
"command": "npx",
"args": ["mcp-debug-recorder"]
}
}
}Codex CLI
codex mcp add mcp-debug-recorder -- npx mcp-debug-recorder
codex mcp listGemini CLI
gemini mcp add mcp-debug-recorder npx mcp-debug-recorder
gemini mcp listAntigravity
antigravity --add-mcp "{\"name\":\"mcp-debug-recorder\",\"command\":\"npx\",\"args\":[\"mcp-debug-recorder\"]}"实际使用示例
我以前见过这个吗?
“我遇到了
TypeError: Cannot read properties of undefined,我以前见过这个吗?”
使用当前错误文本调用 find_similar_errors,然后使用 get_session_context 检查最佳匹配项。
记录一个活跃事件
调用
start_debug_session使用
record_command添加终端命令使用
add_fix添加每次尝试的修复当标题或备注变得更清晰时,使用
update_session使用
close_session关闭会话
备份您的本地调试历史
使用
format: "json"调用export_sessions将返回的 JSON 保存到您首选的备份系统中
稍后使用
import_sessions恢复
数据存储
默认路径:
~/.mcp-debug-recorder/sessions.db使用
better-sqlite3的便携式 SQLite 存储针对大型历史记录的 FTS5 支持的搜索索引
无需外部数据库服务器
注意:
better-sqlite3使用原生插件。如果您看到绑定错误,请针对您的 Node 版本运行npm rebuild better-sqlite3。
HTTP 传输
该包还支持 Streamable HTTP:
npm run start:http有用的路由:
GET /healthGET /versionMCP 端点:
POST/GET/DELETE /mcp
开发
npm ci
npm run lint
npm test
npm run build
npm run test:e2e
npm run docs:api用于发布验证:
npm run format:check
npm run test:coverage
npm run prepublishOnly其他项目文档:
This server cannot be installed
Maintenance
Related MCP Connectors
Knowledge accumulation for AI coding agents. Records decisions, problems, and insights as context.
Shared debugging memory for AI coding agents
Shared memory for coding agents. Stop re-explaining your codebase every session.
Persistent cross-session memory shared by Codex, Claude Code, ChatGPT, and other AI agents.
Latest Blog Posts
- Who's Calling? MCP Hosts Are an Identity Blind Spot (And the Spec Knows It)By Om-Shree-0709 on .mcpAgent IdentityOAuth 2.1
- Your AI Chatbot Just Exposed Your CEO's Salary to an InternBy Om-Shree-0709 on .Agent IdentityMCP SecurityOAuth Delegation
- Why MCP Servers Need Execution Sandboxing (And Why Your Current Stack Isn't Enough)By Om-Shree-0709 on .Agentic AiPrompt InjectionWebAssembly
MCP directory API
We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/oaslananka/mcp-debug-recorder'
If you have feedback or need assistance with the MCP directory API, please join our Discord server