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: ストリーマブル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.dbbetter-sqlite3を使用したポータブルなSQLiteストレージ大規模な履歴に対応したFTS5ベースの検索インデックス
外部データベースサーバーは不要
注意:
better-sqlite3はネイティブアドオンを使用します。バインディングエラーが発生した場合は、Nodeのバージョンに合わせてnpm rebuild better-sqlite3を実行してください。
HTTPトランスポート
このパッケージはストリーマブル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