A Model Context Protocol server providing tools to analyze Windows crash dumps using WinDBG/CDB.
This MCP server integrates with CDB to enable AI models to analyze Windows crash dumps.
This means, that this is:
k
and explain what might be causing this access violation"!peb
and tell me if there are any environment variables that might affect this crash"dx -r2
on this object and explain its state" (equivalent to dx -r2 ((MyClass*)0x12345678)
)!heap -p -a 0xABCD1234
and check for buffer overflow".ecxr
followed by k
and explain the exception's root cause"!runaway
and !threads
"db/dw/dd
to identify corruption patterns"I've written about the whole journey in blog.
git clone https://github.com/svnscha/mcp-windbg.git
cd mcp-windbg
python -m venv .venv
.\.venv\Scripts\activate
pip install -e .
pip install -e ".[test]"
To integrate this MCP server with Visual Studio Code:
.vscode/mcp.json
file in your workspace with the following configuration:{
"servers": {
"mcp_server_windbg": {
"type": "stdio",
"command": "${workspaceFolder}/.venv/Scripts/python",
"args": [
"-m",
"mcp_server_windbg"
],
"env": {
"_NT_SYMBOL_PATH": "SRV*C:\\Symbols*https://msdl.microsoft.com/download/symbols"
}
},
}
}
Alternatively, edit your user settings to enable it globally (independent of workspace). Once added and with Model Context Protocol in Chat feature enabled, the tools from this model context protocol server are available in Agent mode.
That's how it should look like:
If integrated through Copilot, you don't need this. The IDE will auto-start the MCP.
Start the server using the module command:
python -m mcp_server_windbg
python -m mcp_server_windbg [options]
Available options:
--cdb-path CDB_PATH
: Custom path to cdb.exe--symbols-path SYMBOLS_PATH
: Custom symbols path--timeout TIMEOUT
: Command timeout in seconds (default: 30)--verbose
: Enable verbose output"--cdb-path": "C:\\path\\to\\cdb.exe"
to the args
array"--symbols-path"
to the argsOnce the server is configured in VS Code:
This server provides the following tools:
open_windbg_dump
: Analyze a Windows crash dump file using common WinDBG commandsrun_windbg_cmd
: Execute a specific WinDBG command on the loaded crash dumplist_windbg_dumps
: List Windows crash dump (.dmp) files in the specified directory.close_windbg_dump
: Unload a crash dump and release resourcesTo run the tests:
pytest
If you get a "CDB executable not found" error, make sure:
--cdb-path
optionFor proper crash analysis, set up your symbol path:
--symbols-path
parameter, or_NT_SYMBOL_PATH
environment variableSRV*C:\Symbols*https://msdl.microsoft.com/download/symbols
MIT
{ "mcpServers": { "mcp-windbg": { "command": "python", "args": [ "-m", "mcp_server_windbg" ] } } }
Related projects feature coming soon
Will recommend related projects based on sub-categories