
An MCP (Model Context Protocol) server that turns all pybag Windows debugger functions into native MCP tools. It lets MCP-compatible clients (Claude Desktop, Claude Code, Cowork, OpenAI Codex CLI, Cursor, and custom agents) control user-mode processes, kernel sessions, and crash dump analysis via structured JSON calls.
An MCP (Model Context Protocol) server that exposes every pybag Windows debugger function as a native MCP tool. It gives any MCP-compatible client (Claude Desktop, Claude Code, Cowork, OpenAI Codex CLI, Cursor, and custom agents) full control over user-mode processes, kernel sessions, and crash dump analysis — all through typed tool calls with structured JSON responses.
git clone https://github.com/your-username/windbg-mcp.git
cd windbg-mcp
pip install pybag mcp
Download the Windows SDK and select Debugging Tools for Windows during setup: https://developer.microsoft.com/en-us/windows/downloads/windows-sdk/
The server runs as a local stdio process. All clients below launch it the same way —
python <path-to>/windbg_mcp.py — but each has its own config format.
Edit the Claude Desktop configuration file and add the windbg-mcp entry:
Config file location:
%APPDATA%\Claude\claude_desktop_config.json~/Library/Application Support/Claude/claude_desktop_config.json{
"mcpServers": {
"windbg-mcp": {
"command": "python",
"args": ["C:\\path\\to\\windbg-mcp\\windbg_mcp.py"]
}
}
}
Restart Claude Desktop. All 55 debugger tools will appear automatically.
Run the following command once to register the server. Claude Code stores the entry in its own MCP config and makes the tools available in every subsequent session.
claude mcp add windbg-mcp python C:\path\to\windbg-mcp\windbg_mcp.py
To verify the server was registered:
claude mcp list
To remove it later:
claude mcp remove windbg-mcp
There are two ways to add WinDbg MCP to Cowork: via JSON configuration (quick) or
by installing it as a .mcpb plugin bundle (portable, shareable).
{
"windbg-mcp": {
"command": "python",
"args": ["C:\\path\\to\\windbg-mcp\\windbg_mcp.py"]
}
}
.mcpb Plugin BundleA .mcpb file is a zip archive of the plugin directory that Cowork can install
directly. This is the recommended approach when sharing the server with a team or
across machines.
Step 1 — Build the .mcpb file
From the root of the cloned repository, run:
powershell -Command "Compress-Archive -Path '.\*' -DestinationPath 'windbg-mcp.zip'; Rename-Item 'windbg-mcp.zip' 'windbg-mcp.mcpb'"
This creates windbg-mcp.mcpb in the current directory, bundling windbg_mcp.py,
manifest.json, and any other project files.
Step 2 — Install in Cowork
windbg-mcp.mcpb.manifest.json from the bundle, registers the MCP server, and
makes all tools available immediately — no manual path configuration required.The manifest.json bundled in this repo is already configured correctly:
{
"manifest_version": "0.2",
"name": "windbg-mcp",
"version": "1.0.0",
"description": "WinDbg MCP — full Windows debugger control via MCP tools",
"server": {
"type": "python",
"entry_point": "windbg_mcp.py",
"mcp_config": {
"command": "python",
"args": ["${__dirname}/windbg_mcp.py"]
}
}
}
${__dirname} is resolved at install time to the directory where Cowork unpacked
the bundle, so you do not need to hard-code any paths.
Add the server to your Codex CLI configuration file. The file is typically located at
~/.codex/config.json (Linux/macOS) or %USERPROFILE%\.codex\config.json (Windows).
{
"mcpServers": {
"windbg-mcp": {
"command": "python",
"args": ["C:\\path\\to\\windbg-mcp\\windbg_mcp.py"]
}
}
}
Once saved, start a new Codex session. The WinDbg tools will be available for the model to call.
{
"windbg-mcp": {
"command": "python",
"args": ["C:\\path\\to\\windbg-mcp\\windbg_mcp.py"]
}
}
Add the following to your ~/.continue/config.json (or the workspace-level
.continue/config.json):
{
"experimental": {
"modelContextProtocolServers": [
{
"transport": {
"type": "stdio",
"command": "python",
"args": ["C:\\path\\to\\windbg-mcp\\windbg_mcp.py"]
}
}
]
}
}
Reload the Continue extension. The 55 debugger tools will appear in the tool list.
If you are building your own agent or automation pipeline, connect to WinDbg MCP over the standard MCP stdio transport. The server speaks JSON-RPC 2.0 over stdin/stdout.
mcp SDK)import asyncio
from mcp import ClientSession, StdioServerParameters
from mcp.client.stdio import stdio_client
server_params = StdioServerParameters(
command="python",
args=[r"C:\path\to\windbg-mcp\windbg_mcp.py"],
)
async def main():
async with stdio_client(server_params) as (read, write):
async with ClientSession(read, write) as session:
await session.initialize()
# List all available tools
tools = await session.list_tools()
print([t.name for t in tools.tools])
# Load a crash dump
result = await session.call_tool(
"load_dump",
arguments={"path": r"C:\crashes\crash.dmp"},
)
print(result.content)
# Read 64 bytes at RSP
result = await session.call_tool(
"read_mem",
arguments={"addr": "0x00000000001FF000", "size": 64},
)
print(result.content)
asyncio.run(main())
@modelcontextprotocol/sdk package)import { Client } from "@modelcontextprotocol/sdk/client/index.js";
import { StdioClientTransport } from "@modelcontextprotocol/sdk/client/stdio.js";
const transport = new StdioClientTransport({
command: "python",
args: ["C:\\path\\to\\windbg-mcp\\windbg_mcp.py"],
});
const client = new Client({ name: "my-agent", version: "1.0.0" }, {});
await client.connect(transport);
// Call a tool
const result = await client.callTool({
name: "load_dump",
arguments: { path: "C:\\crashes\\crash.dmp" },
});
console.log(result.content);
await client.close();
from langchain_mcp_adapters.tools import load_mcp_tools
from mcp import ClientSession, StdioServerParameters
from mcp.client.stdio import stdio_client
server_params = StdioServerParameters(
command="python",
args=[r"C:\path\to\windbg-mcp\windbg_mcp.py"],
)
async def get_tools():
async with stdio_client(server_params) as (read, write):
async with ClientSession(read, write) as session:
await session.initialize()
return await load_mcp_tools(session)