MCP Debug Recorder

io.github.oaslananka由 GitHub 帳號 oaslananka 發布v1.1.3更新於 Oct 24, 2026

Record debug sessions, commands, failed attempts, and successful fixes in local SQLite storage.

已驗證STDIO僅桌面知識與記憶開發者工具

概覽

AI 產生的概覽

本地優先的除錯記憶伺服器,讓助理把除錯工作階段、指令與修正記錄到 SQLite,並搜尋過往問題。

可以做什麼
建立、更新、關閉與刪除除錯工作階段,刪除需明確確認;記錄失敗或成功的修正嘗試,以及帶輸出與結束碼的終端指令並連結到工作階段。以全文檢索加模糊重排搜尋歷史,尋找相似的過往錯誤,取得完整工作階段詳情或適合 AI 使用的摘要。瀏覽與篩選工作階段,彙總除錯歷史統計。儲存、列出與移除可重複使用的搜尋預設集。將工作階段匯出為完整 JSON 備份或精簡摘要清單,並匯入經驗證的匯出資料。回傳去識別化的執行環境、資料庫結構、套件與健康狀態診斷快照。
適用情境
適合希望助理或 IDE 在本機長期保存除錯過程,並能回答某個錯誤以前是否修過這類問題的情境。較適合開發者本機的桌面 MCP 用戶端,而非共用或公開部署。
執行需求
透過 stdio 在本機執行,通常以 npx 啟動,需要 Node.js 22 或 24 LTS 以及 npm 10 以上。資料存於本機 SQLite 資料庫,預設位於使用者家目錄下;Node 版本變更後可能需要重新編譯 better-sqlite3 原生模組。選用的 Streamable HTTP 模式使用 HOST、PORT,非回送位址綁定時還需 DEBUG_RECORDER_HTTP_TOKEN 以及主機與來源允許清單。
安裝前請注意
記錄的指令、輸出與錯誤文字會保存在本機,若未啟用 DEBUG_RECORDER_REDACT_BEFORE_STORE 可能含有敏感資訊。刪除工作階段無法復原,但需明確確認。非回送位址的 HTTP 對外開放需要 DEBUG_RECORDER_REMOTE_HTTP、DEBUG_RECORDER_HTTP_TOKEN 與允許清單;該權杖是共用密鑰,所有呼叫端共用同一身分與資料,並非 OAuth,且不支援公開多使用者 HTTP。

安裝

在 SourceWeft 中

  1. 開啟 儀表板中的 MCP Debug Recorder,將其新增到工作區。
  2. 為需要使用其工具的對話啟用該服務。

Desktop only,透過 STDIO。 STDIO 服務會啟動本機處理程序,因此需要 SourceWeft 桌面主機。

其他 MCP 客戶端

參照 儲存庫 中的啟動說明。

README

debug-recorder-mcp

Local-first debug memory for MCP clients.
Record incidents, commands, failed attempts, successful fixes, diagnostics, and searchable debugging history in SQLite.

[npm version] [npm downloads] [CI] [Release] [Docs] [CodeQL] [License: MIT] [Sponsor]

Published docs · Usage · Client recipes · Security · Release flow

[Buy me a coffee]

Why this exists

Debugging knowledge usually disappears into chat windows, terminals, and commit history. debug-recorder-mcp gives MCP-enabled agents and IDEs a durable local memory so they can answer:

“Have I fixed this before?”

It stores each debugging session, error, command, attempted fix, working fix, tags, and context in a local SQLite database. Search combines SQLite FTS5 with fuzzy reranking, reusable presets, pagination metadata, related-session groups, and optional Markdown exports.

Highlights

  • Local-first storage: no external database or hosted service required.
  • MCP-native tools: stdio server for desktop MCP clients plus optional Streamable HTTP mode.
  • Search that survives messy errors: FTS5 + Fuse.js reranking for stack traces, typos, Unicode, and punctuation-heavy logs.
  • Reusable search presets: save common filters and limits for recurring incident patterns.
  • Safe operations: redaction-before-store option, explicit destructive confirmations, local HTTP host/origin/auth/body-limit hardening.
  • Diagnostics: get_diagnostics returns redacted runtime, schema, package, and health signals for support without leaking raw paths, tokens, stack traces, or command output.
  • Release-grade packaging: audit, coverage, fuzzing, package-size gates, SBOM/VEX policy, install-script approvals, provenance-ready release workflow, and MCP Registry readiness checks.

Quick start

Requires Node.js 22 LTS or 24 LTS and npm 10+.

bash
npx debug-recorder-mcp

Default database path:

text
~/.debug-recorder-mcp/sessions.db

Use a custom database path:

bash
DEBUG_RECORDER_DB=/path/to/custom.db npx debug-recorder-mcp

MCP client setup

Desktop MCP clients

json
{  "mcpServers": {    "debug-recorder-mcp": {      "command": "npx",      "args": ["debug-recorder-mcp"]    }  }}

VS Code / GitHub Copilot

Create or update .vscode/mcp.json:

json
{  "servers": {    "debug-recorder-mcp": {      "type": "stdio",      "command": "npx",      "args": ["debug-recorder-mcp"]    }  }}

More setup examples are in Client setup recipes.

Available MCP tools

ToolPurpose
start_debug_sessionStart tracking a new issue or incident.
add_fixRecord a failed or successful fix attempt.
record_commandSave a command, output, exit code, and session link.
close_sessionMark a session as resolved or abandoned.
update_sessionEdit title, description, or tags.
delete_sessionPermanently delete a session with explicit confirmation.
search_sessionsSearch history with FTS5, fuzzy reranking, pagination, related groups, and optional Markdown export.
save_search_presetStore a reusable query, filters, and limit.
list_search_presetsList saved search presets.
remove_search_presetRemove a saved search preset by name.
find_similar_errorsAsk whether a similar error has appeared before.
get_sessionFetch full details, fixes, and commands.
get_session_contextGet an AI-friendly session summary.
list_sessionsBrowse sessions with filters.
get_statsSummarize debug history.
get_diagnosticsReturn a redacted operational diagnostics snapshot.
export_sessionsExport a full JSON backup or a lightweight summary inventory.
import_sessionsImport a validated export payload.

Real usage examples

Have I seen this before?

Ask your MCP client:

I am getting TypeError: Cannot read properties of undefined. Have I seen this before?

The client can call find_similar_errors, then inspect the best match with get_session_context.

Record an active incident

  1. Call start_debug_session with the problem title and error details.
  2. Add terminal commands with record_command.
  3. Add each attempted fix with add_fix.
  4. Improve title, notes, or tags with update_session.
  5. Close the incident with close_session.

Back up or migrate history

  1. Call export_sessions with format: "json". The response is marked with format: "json" and contains the full sessions, fixes, and commands arrays.
  2. Store the returned object in your backup system.
  3. Restore later by passing that object as import_sessions.payload.

For a lightweight inventory, call export_sessions with format: "summary". Summary responses are marked with format: "summary", include aggregate stats and abbreviated session rows, and are not restore payloads.

HTTP transport

The package also supports local Streamable HTTP:

bash
npm run start:http

Useful routes:

  • GET /health
  • GET /version
  • MCP endpoint: POST /mcp

HTTP mode is local-first by default. It binds to 127.0.0.1, creates an isolated stateless MCP server/transport per request, validates Host, validates browser Origin when present, and enforces a JSON body-size limit before the MCP transport receives the request.

For deliberate non-loopback exposure, set all of these:

bash
HOST=0.0.0.0DEBUG_RECORDER_REMOTE_HTTP=trueDEBUG_RECORDER_HTTP_TOKEN=replace-with-a-long-random-tokenDEBUG_RECORDER_ALLOWED_HOSTS=debug-recorder.example.comDEBUG_RECORDER_ALLOWED_ORIGINS=https://debug-recorder.example.comnpm run start:http

Wildcard origins are rejected for remote mode. The static bearer token is private/shared-secret mode: every caller shares one identity, one authority level, and one SQLite dataset. It is suitable for loopback, an encrypted trusted network, or a private authenticating proxy, but it is not OAuth and does not provide per-user scopes or revocation.

Public multi-user HTTP is not supported by the current release. The accepted target architecture uses an external authorization server and MCP-aware gateway with protected-resource discovery, audience-bound tokens, scopes, rate limits, audit events, and subject-aware storage. See Public HTTP authorization and ADR-0006.

Configuration

VariableDescription
DEBUG_RECORDER_DBOverride the SQLite database path.
HOSTHTTP bind host. Defaults to 127.0.0.1.
PORTHTTP port. Defaults to 3000.
DEBUG_RECORDER_HTTP_TOKENPrivate/shared-secret token; required for non-loopback HTTP, not OAuth.
DEBUG_RECORDER_ALLOWED_HOSTSComma-separated HTTP Host allowlist.
DEBUG_RECORDER_ALLOWED_ORIGINSComma-separated browser Origin allowlist.
DEBUG_RECORDER_MAX_BODY_BYTESHTTP JSON body limit. Defaults to 1048576.
DEBUG_RECORDER_REMOTE_HTTPEnable non-loopback HTTP with true, 1, or yes.
DEBUG_RECORDER_REDACT_BEFORE_STOREEnable pre-store redaction with true, 1, or yes.
LOG_LEVELMinimum structured log level: debug, info, warn, or error.
FUZZY_THRESHOLDOverride the Fuse.js reranking threshold.

Boolean configuration also accepts false, 0, and no; values are case-insensitive, whitespace is ignored, and unsupported values fail fast. Diagnostics reports the resolved effective values rather than re-reading changed environment strings.

Data and privacy

  • Database: local SQLite via better-sqlite3.
  • Search index: SQLite FTS5 virtual table.
  • Default path: ~/.debug-recorder-mcp/sessions.db.
  • Redaction: optional before-store redaction plus diagnostics redaction.
  • Deletion: destructive operations require explicit confirmation.
  • Maintenance: see Storage retention and maintenance.

better-sqlite3 uses a native addon. If Node versions change and bindings fail, run npm rebuild better-sqlite3.

Docker

bash
docker build -t debug-recorder-mcp:local .docker run --rm -p 127.0.0.1:3000:3000 \  -e HOST=0.0.0.0 \  -e DEBUG_RECORDER_REMOTE_HTTP=true \  -e DEBUG_RECORDER_HTTP_TOKEN=replace-with-a-long-random-token \  -e DEBUG_RECORDER_ALLOWED_HOSTS=127.0.0.1:3000,localhost:3000 \  -e DEBUG_RECORDER_ALLOWED_ORIGINS=http://127.0.0.1:3000,http://localhost:3000 \  debug-recorder-mcp:local

The image installs with npm ci, preserves reviewed native install scripts, prunes development dependencies, and runs as the non-root node user.

Documentation

Published documentation is generated by npm run docs:site and published to GitHub Pages:

text
https://oaslananka.github.io/debug-recorder-mcp/

Important docs:

Development

bash
npm cinpm run format:checknpm run lintnpm run check:dead-codenpm run test:coveragenpm run test:fuzznpm run buildnpm run test:e2enpm run auditnpm run check:install-scriptsnpm pack --dry-runnpm run check:package-sizenpm run check:versionnpm run check:mcpnpm run check:security-policynpm run check:sbomnpm run docs:site

Full local gate:

bash
npm run ci:local

Release readiness:

bash
npm run prepublishOnlynpm run check:mcp-registry

Release and npm publishing

The normal release workflow uses Release Please, builds release assets, generates SBOM/checksums, attests the tarball, uploads GitHub Release assets, and publishes to npm with provenance.

For the first npm package creation, use the manual Initial npm Token Publish workflow with repository secret NPM_TOKEN. After the package exists and npm trusted publishing is configured, the regular Release workflow can publish through GitHub OIDC. Details are in Release flow.

License

Released under the MIT License. package.json also declares "license": "MIT", and the npm package includes LICENSE.

Funding

If this project saves you debugging time, support development here:

Funding metadata is available in both .github/FUNDING.yml and package.json.

Agent plugin and runtime configuration

This repository owns the product-level agent plugin, MCP runtime configuration, and product-specific skills for debug-recorder-mcp. The central agent-tools repository should catalog this plugin, but the manifest and workflow instructions live here so they stay synchronized with the actual MCP server package.

FilePurpose
.claude-plugin/plugin.jsonClaude Code-valid product plugin manifest.
.mcp.jsonClaude Code project-local MCP server configuration.
.codex/config.example.tomlCodex CLI MCP configuration example.
.vscode/mcp.example.jsonVS Code / GitHub Copilot workspace MCP configuration example.
opencode.example.jsoncOpenCode project MCP configuration example.
.opencode/skills/OpenCode-native mirrored skill definitions.
docs/agent-runtime-config.mdAgent runtime setup and validation notes.

Validate plugin packaging locally:

bash
claude plugin validate .

來源:README.md,提交 74abd4e

工具

0
SourceWeft 尚未在沙箱中啟動過該軟體包,因此其工具未知。

版本歷史

1
  1. v1.1.3最新Sep 16, 2026

評分

已滿足適用檢查項的 50%

該評分衡量此收錄條目的完整程度,依據註冊中心條目、端點與公開來源計算得出。它不是對伺服器本身的評價,也不表示伺服器安全或目前可用:可連通性是帶日期的檢查結果,評分也不包含安裝量或使用者評價。

  • 近 30 天內可連通25 分

    請保持端點能夠回應 MCP 握手;SourceWeft 每 30 天探測一次。

  • 已宣告認證方式10 分

    請在註冊中心條目中宣告憑證請求標頭,或保持端點能夠回應探測,以便判定其認證方式。

  • 已列出工具15 分

    請讓伺服器在無憑證時回應 tools/list,或發布可在沙箱中無憑證啟動的軟體包。

  • 描述必需15 分
  • 圖示10 分
  • 文件15 分
  • 授權條款10 分