mcp-win-debugger
This server does not currently have a deployable release on Glama. Follow the repository's setup instructions to install and configure it for your MCP client, including any required credentials and local dependencies.
mcp-win-debugger
An MCP server that gives AI agents native Windows debugging superpowers via CDB (Console Debugger).
The Problem
The default debugging loop for native code is painfully slow:
add print statement → recompile → relaunch → reproduce bug → close app → read logs → repeatEach iteration takes minutes. For large C++ projects, a single recompile can take 10+ minutes.
Related MCP server: DumpAnalysisMCP
The Solution
This MCP server lets an AI agent debug your process directly — set breakpoints, inspect memory, read variables, step through code, and even modify state at runtime. No recompilation needed.
attach to process → set breakpoint → inspect callstack → read locals → follow pointers → find bugEach operation takes milliseconds. The agent navigates the program's live state exactly like you would in Visual Studio, but driven by AI that can cross-reference the source code with what it sees in memory.
Example: Agent Finds an Off-By-One Bug
Consider this C code with a subtle bug — get_last_player returns &players[count] instead of &players[count-1]:
typedef struct {
Player* players;
int count;
int capacity;
} GameState;
// BUG: off-by-one — accesses players[count] instead of players[count-1]
Player* get_last_player(GameState* game) {
return &game->players[game->count]; // should be count - 1
}
void apply_poison(GameState* game) {
Player* last = get_last_player(game); // reads garbage when count == 0
damage_player(last, 5);
}The agent launches the program, sets breakpoints, and investigates:
# | Agent Action | MCP Tool | What the Agent Sees | Conclusion |
1 | Launch with symbols |
| Process started in 0.25s | Ready to debug |
2 | Load only our PDB |
|
| Symbols loaded in 0.01s |
3 | Break on suspect function |
|
| Breakpoint set |
4 | Run the program |
| Breakpoint hit instantly | Called from |
5 | Who called this? |
|
| Normal call from main |
6 | What's the game state? |
|
| 3 players exist, looks OK |
7 | What does it return? |
|
| Returned bad pointer! |
8 | Continue to second call |
| Hit BP in | Second call site |
9 | Step into, inspect |
|
| BUG: |
Root cause found in ~1 second of debug time. No print statements. No recompilation. The agent read the source, set targeted breakpoints, and followed the data to the bug — the same way you would in Visual Studio, but without the manual clicking.
Quick Start
Prerequisites
Windows with Windows SDK Debugging Tools installed (provides
cdb.exe)Python 3.12+
No third-party dependencies — the server uses only the Python standard library.
Install
git clone https://github.com/RandyGaul/mcp-win-debugger.gitConfigure Claude Code
Add to your project's .mcp.json (create it in your project root if it doesn't exist):
{
"mcpServers": {
"windbg": {
"command": "python",
"args": ["C:/path/to/mcp-win-debugger/src/server.py"]
}
}
}Replace C:/path/to/mcp-win-debugger with the actual path where you cloned the repo.
Usage
Tell Claude to debug your program:
"Launch
D:/build/myapp.exewith symbols fromD:/build/and investigate why the player health goes negative"
The agent will:
Launch your executable under the debugger
Load only YOUR symbols (fast — skips all dependency PDBs)
Set breakpoints on relevant functions
Run the program, inspect state at breakpoints
Follow pointer chains, read structs, check array bounds
Identify the root cause
Tools (39)
Session Management
Tool | Description |
| Launch an executable under the debugger |
| Attach to a running process by PID |
| Open a crash dump (.dmp) for post-mortem analysis |
| End the debug session |
Execution Control
Tool | Description |
| Continue execution (F5) |
| Step into next instruction (F11) |
| Step over next instruction (F10) |
| Step out of current function (Shift+F11) |
| Break into running process (Ctrl+Break) |
Breakpoints
Tool | Description |
| Set a code breakpoint on a function or address |
| Set a hardware watchpoint on a memory address |
| List all breakpoints |
| Delete a breakpoint by ID |
| Enable a disabled breakpoint |
| Disable without deleting |
Inspection
Tool | Description |
| Get call stack (current or all threads) |
| Show local variables in current scope |
| Evaluate a C++ expression |
| Show struct/class layout or instance |
| Recursively expand nested structs |
| Read raw memory (bytes, words, qwords, ascii) |
| Follow a pointer and show target |
| Show vtable + fields of a C++ object |
Modification
Tool | Description |
| Write values to memory |
| Set a local or global variable |
| Set a CPU register |
Navigation
Tool | Description |
| List all threads |
| Switch to a different thread |
| Switch to a different stack frame |
Symbols
Tool | Description |
| List loaded modules |
| Set symbol search path (with optional cache) |
| Force reload symbols |
| Load symbols for ONE specific module (fast) |
| Search for symbols by wildcard pattern |
| Toggle verbose symbol diagnostics |
Analysis
Tool | Description |
| Run |
| Show current exception details |
| Configure which exceptions break vs. are ignored |
Escape Hatch
Tool | Description |
| Run any raw CDB/WinDbg command |
Guided Workflows (MCP Prompts)
The server includes three guided workflows that agents can follow:
live_debug— Step-by-step investigation of a live processcrash_triage— Systematic crash dump analysismemory_corruption— Finding memory corruption with data breakpoints
Performance
The server is optimized for speed:
No symbols by default — empty
-y ""prevents slow symbol server lookups-snul— disables unqualified symbol loading (massive speedup for large projects).symopt+0x100—SYMOPT_NO_UNQUALIFIED_LOADSat runtimeException noise suppressed —
sxd *; sxe av; sxi eh; sxi ch(only access violations break)Selective symbol loading —
load_symbols_for('mymodule')loads one PDB, not everything
Operation | Time |
Launch small binary | ~0.3s |
Load one module's symbols | ~0.01s |
Callstack | <1ms |
Step over | <1ms |
Read memory | <1ms |
Evaluate expression | <1ms |
Building Test Fixtures
cd tests/fixtures
cmake -B build
cmake --build buildRunning Tests
pytest tests/ -vTests share a single CDB session per module for speed (~2.5 min total).
Architecture
Claude Code ←→ MCP (stdio/JSON-RPC) ←→ Python server ←→ cdb.exe (subprocess)
↕
background reader thread
(readline from stdout pipe)
↕
echo marker detection
(deterministic command completion)The server manages cdb.exe as a subprocess with:
Background reader thread — reads stdout line-by-line (avoids Windows pipe buffering deadlocks)
Echo marker protocol — sends
.echo __MARKER__after each command for reliable completion detectionatexit cleanup — kills orphaned cdb processes on server exit
License
This is free and unencumbered software released into the public domain. See UNLICENSE for details.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
This server cannot be deployed
Maintenance
Related MCP Connectors
Connect ChatGPT, Claude, Cursor or VS Code to your Windows PC: files, terminal, browser, apps.
Live browser debugging for AI assistants — DOM, console, network via MCP.
Shared debugging memory for AI coding agents
Agent Replay Debugger MCP — record every agent step + deterministic replay. Step-debugger for
Related MCP Servers
- AlicenseNot gradedqualityBmaintenanceEnables AI assistants to analyze binaries, debug processes, and inspect kernel state using Ghidra, x64dbg, WinDbg, and ILSpyCmd.15Apache 2.0
- AlicenseNot gradedqualityDmaintenanceEnables AI agents to analyze Windows crash dumps by providing structured data on exceptions, threads, modules, and source context, with safe patch, build, and test execution.5MIT
- AlicenseBqualityDmaintenanceEnables AI agents to debug C/C++ programs with GDB or LLDB, supporting breakpoints, stepping, variable inspection, and function calls.20MIT
- FlicenseNot gradedqualityDmaintenanceEnables AI clients to inspect live memory of a running C++ process on Windows using cdb.exe, providing tools to evaluate expressions, retrieve map entries, and enumerate containers without modifying target code.-