デバッグ
INIT
調査・計測・捕獲・修正・検証・清掃
第一版 二〇二五
MCP Server for AI Coding Agents

Arm your AGENTS.
Hunt every bug.

One MCP server. Full runtime visibility. Your agent sees the code execute, not just reads it.

$ npx debug-toolkit init
$ npx debug-toolkit demo

━━━ Step 1: debug_investigate ━━━
✓ Error type: TypeError — type
✓ Source: src/api.ts:8
>> 8 | const names = users.map(u => u.name); // BUG
✓ Suggestion: Check for null/undefined values

━━━ Step 3: debug_capture ━━━
✓ [DBG_001] users = undefined
✓ Hypothesis confirmed → CONFIRMED

━━━ Step 5: debug_verify ━━━
✓ Exit code: 0 ✓ Errors: 0 ✓ Verdict: PASSED
$
Investigate Instrument Capture Fix Verify Cleanup Investigate Instrument Capture Fix Verify Cleanup
AI agents
debug blind
When an AI agent hits a bug, it reads code and guesses a fix. You run it, paste the error back, the agent guesses again.

✗ Without debug-toolkit

8–12 conversation turns per bug

Paste error → guess fix → repeat. No runtime data, no learning, no context.

✓ With debug-toolkit

1–2 turns with full context

Investigate → instrument → capture → fix → verify → cleanup. Diagnosis saved for next time.

One debug session.
Full context.
Six steps. One loop. The agent handles everything through MCP tool calls.
01Investigate
02Instrument
03Capture
04Fix
05Verify
06Cleanup
Eight tools.
Zero config.
Everything an agent needs to go from error to verified fix.

debug_investigate

Start here. Give it an error — get classification, source code at crash site, git context, environment, and past solutions.

Entry point

debug_instrument

Add tagged logging to source files. Supports JS/TS, Python, Go, and Rust. Each marker links to a hypothesis.

Multi-language

debug_capture

Run a command and capture output. Tagged output is linked to hypotheses. Drains terminal, browser, and Tauri logs.

Runtime

debug_verify

After applying a fix, run the test command and get a clear pass/fail with exit code and error output.

Validation

debug_cleanup

Remove all instrumentation, verify files are restored, save diagnosis + causal chain to memory.

Persistence

debug_recall

Search past sessions for similar errors. Returns diagnoses ranked by relevance with staleness tracking.

Memory

debug_patterns

Detect recurring errors, hot files, regressions, and error clusters across all past sessions.

Analytics

debug_session

Lightweight view of current state: hypotheses, active instruments, recent captures.

Status
Polyglot from
day one
First-class support where it matters. Growing with every release.
Feature JS / TS Python Go Rust / Tauri
Stack trace parsing
Error classification
Code instrumentation
Source extraction
Log file tailing
Environment detection
Learns from
every session
debug-toolkit remembers what worked. Next time the same bug appears, the agent already knows the fix.

Recall

Auto-searches past diagnoses when investigating new errors. Similar errors get previous solutions and causal chains.

Staleness

Every diagnosis tagged with git SHA. Recalled diagnoses checked against current code. Stale ones are flagged.

Causal Chains

Records where the error appeared vs. where the actual bug was. Next time, go straight to the cause file.

Patterns

Recurring errors, hot files, regressions, error clusters — systemic issues detected across all sessions.

Small surface.
Big capability.
15
Files
3,451
Lines of TypeScript
4
npm dependencies
mcp.ts473
context.ts420
demo.ts398
memory.ts369
capture.ts276
proxy.ts200
index.ts204
security.ts185
session.ts162
injected.js151
instrument.ts140
cleanup.ts126
cli.ts125
hook.ts122
methodology.ts100
Locked down
by default
Path traversal protection
All file ops validated against project root
Expression validation
Blocks eval, require, exec in instrumentation
Secret redaction
Tokens, API keys, passwords auto-redacted
Localhost-only proxy
Binds to 127.0.0.1
Pre-commit hook
Blocks commits containing debug markers
Atomic writes
Temp file + rename, no corruption on crash
始動
Get Started
One command.
Done.
$ npx debug-toolkit init