/ 目錄 / 演練場 / mcp-windbg
● 社群 svnscha ⚡ 即開即用

mcp-windbg

作者 svnscha · svnscha/mcp-windbg

AI-assisted Windows debugging — analyze crash dumps, live debug remote targets, and run WinDbg commands via natural language.

mcp-windbg is an MCP server that bridges AI models with WinDbg/CDB for Windows crash dump analysis and live debugging. It provides 7 tools for listing/opening/closing dumps, connecting to remote debug targets, executing WinDbg commands, and sending break signals. Supports batch processing of multiple dumps and multiple transport protocols (stdio, HTTP).

為什麼要用

核心特性

即時演示

實際使用效果

mcp-windbg.replay ▶ 就緒
0/0

安裝

選擇你的客戶端

~/Library/Application Support/Claude/claude_desktop_config.json  · Windows: %APPDATA%\Claude\claude_desktop_config.json
{
  "mcpServers": {
    "mcp-windbg": {
      "command": "TODO",
      "args": [
        "See README: https://github.com/svnscha/mcp-windbg"
      ]
    }
  }
}

開啟 Claude Desktop → Settings → Developer → Edit Config。儲存後重啟應用。

~/.cursor/mcp.json · .cursor/mcp.json
{
  "mcpServers": {
    "mcp-windbg": {
      "command": "TODO",
      "args": [
        "See README: https://github.com/svnscha/mcp-windbg"
      ]
    }
  }
}

Cursor 使用與 Claude Desktop 相同的 mcpServers 格式。專案級設定優先於全域。

VS Code → Cline → MCP Servers → Edit
{
  "mcpServers": {
    "mcp-windbg": {
      "command": "TODO",
      "args": [
        "See README: https://github.com/svnscha/mcp-windbg"
      ]
    }
  }
}

點擊 Cline 側欄中的 MCP Servers 圖示,然後選 "Edit Configuration"。

~/.codeium/windsurf/mcp_config.json
{
  "mcpServers": {
    "mcp-windbg": {
      "command": "TODO",
      "args": [
        "See README: https://github.com/svnscha/mcp-windbg"
      ]
    }
  }
}

格式與 Claude Desktop 相同。重啟 Windsurf 生效。

~/.continue/config.json
{
  "mcpServers": [
    {
      "name": "mcp-windbg",
      "command": "TODO",
      "args": [
        "See README: https://github.com/svnscha/mcp-windbg"
      ]
    }
  ]
}

Continue 使用伺服器物件陣列,而非映射。

~/.config/zed/settings.json
{
  "context_servers": {
    "mcp-windbg": {
      "command": {
        "path": "TODO",
        "args": [
          "See README: https://github.com/svnscha/mcp-windbg"
        ]
      }
    }
  }
}

加入 context_servers。Zed 儲存後熱重載。

claude mcp add mcp-windbg -- TODO 'See README: https://github.com/svnscha/mcp-windbg'

一行命令搞定。用 claude mcp list 驗證,claude mcp remove 移除。

使用場景

實戰用法: mcp-windbg

How to analyze a Windows crash dump with AI assistance

👤 Windows developers investigating application crashes ⏱ ~30 min intermediate

何時使用: You have a .dmp file from a crash and need to understand what happened.

前置條件
  • Windows with Debugging Tools/WinDbg — Install from Microsoft Store or Windows SDK
  • mcp-windbg installed — pip install mcp-windbg
步驟
  1. Open the dump
    Open the crash dump at C:\dumps\app_crash.dmp. Run !analyze -v and explain what caused the crash.✓ 已複製
    → Detailed crash analysis with exception type, faulting module, and call stack
  2. Investigate the call stack
    Show me the full call stack of the faulting thread. What was the application doing when it crashed?✓ 已複製
    → Annotated call stack with function descriptions
  3. Check for patterns
    Run !locks and !heap -s. Is there a deadlock or heap corruption?✓ 已複製
    → Lock/heap analysis results with interpretation

結果: Root cause of the crash identified with a clear explanation.

注意事項
  • Missing symbol files — Set up a symbol path: .sympath SRV*c:\symbols*https://msdl.microsoft.com/download/symbols
搭配使用: filesystem

Batch analyze multiple crash dumps to find patterns

👤 Support engineers investigating recurring crashes ⏱ ~45 min intermediate

何時使用: You have multiple crash dumps from the same application and need to find common patterns.

前置條件
  • mcp-windbg and WinDbg installed — pip install mcp-windbg
步驟
  1. List available dumps
    List all crash dump files in C:\dumps\. How many are there and when were they created?✓ 已複製
    → List of dumps with timestamps
  2. Analyze and compare
    Open each dump, run !analyze -v, and give me a summary comparing the crash reasons. Are they the same bug or different issues?✓ 已複製
    → Comparison table showing crash type, module, and stack similarity

結果: Pattern analysis across multiple crashes to prioritize fixes.

注意事項
  • Large dumps take time to analyze — Start with minidumps if available — they're faster to open
搭配使用: filesystem

組合

與其他 MCP 搭配,撬動十倍槓桿

mcp-windbg + filesystem

Export crash analysis reports to files for bug tracking

Analyze all dumps in C:\dumps\ and write a summary report to C:\reports\crash-analysis.md.✓ 已複製

工具

此 MCP 暴露的能力

工具輸入參數何時呼叫成本
list_windbg_dumps directory: str Discover crash dump files in a directory 0
open_windbg_dump dump_path: str Open and analyze a crash dump 0
close_windbg_dump session_id: str Close a dump analysis session 0
open_windbg_remote connection_string: str Connect to a remote debug target 0
run_windbg_cmd session_id: str, command: str Execute any WinDbg command in a session 0
send_ctrl_break session_id: str Break into a running debug target 0

成本與限制

運行它的成本

API 配額
N/A — fully local
每次呼叫 Token 數
300–3000 tokens per command output
費用
Free — WinDbg is free from Microsoft
提示
Use targeted WinDbg commands (!analyze -v, k) instead of verbose outputs to reduce tokens.

安全

權限、密鑰、影響範圍

憑證儲存: N/A for local dumps. Remote debugging may require authentication.
資料出站: Local analysis only. Symbol downloads go to Microsoft's symbol server.

故障排查

常見錯誤與修復

WinDbg/CDB not found

Install Debugging Tools for Windows from the Windows SDK or WinDbg from Microsoft Store.

驗證: where cdb
Symbols not loading

Configure symbol path: run_windbg_cmd with '.sympath SRV*c:\symbols*https://msdl.microsoft.com/download/symbols' then '.reload'

驗證: Run 'lm' to check loaded modules
Dump file corrupted or incomplete

The dump may be a minidump missing key data. Request a full dump from the application or use procdump to capture a new one.

驗證: Check dump file size — minidumps are typically <100MB

替代方案

mcp-windbg 對比其他方案

替代方案何時用它替代權衡
cheatengine-mcp-bridgeYou need live memory analysis of running processes rather than crash dump analysisLive process manipulation vs post-mortem analysis

更多

資源

📖 閱讀 GitHub 上的官方 README

🐙 查看未解決的 issue

🔍 瀏覽全部 400+ MCP 伺服器和 Skills