Skip to main content

MCP Server for WinDbg Crash Analysis

CI Docs PyPI License: MIT Platform: Windows Python 3.10+

A Model Context Protocol server that bridges AI models with WinDbg for crash dump analysis, user-mode remote debugging, and kernel debugging.

Overview

This server drives the Windows debuggers - CDB for user mode (dumps and -remote) and KD for kernel targets (-k) - so you can debug in natural language: "Show me the call stack and explain this access violation" or "Open a kernel session and tell me which driver bugchecked."

It is not a magical auto-fix. It is a Python wrapper around cdb.exe / kd.exe that lets an LLM run real debugger commands and reason about the output.

Features

  • Crash dump analysis - open a .dmp/.mdmp/.hdmp and get automated triage (!analyze -v, stacks, modules, threads) in a single call.
  • User-mode remote debugging - attach to a live cdb/WinDbg debug server (-remote) over TCP, a named pipe, or COM, and break in on demand.
  • Kernel debugging - attach to a kernel target (-k, driven by kd.exe) over KDNET, a named pipe, or serial; the server waits for the target and breaks in for you.
  • Run any WinDbg/KD command - drive an open session with arbitrary commands (kb, !process 0 0, !heap, lm, ...) described in natural language.
  • Session ids - every open returns a session id; several sessions (dumps, remote, kernel) can be open at once and are addressed independently.
  • Resilient live sessions - per-call timeouts, and a slow live command that outruns its timeout is broken into with CTRL+BREAK and the session resynchronized instead of wedging.
  • Multi-dump triage - discover and compare many dumps across a directory.
  • Text filter hooks - a --filter-script can redact PII/secrets from tool arguments and output before they leave the machine.
  • stdio or HTTP - run locally over stdio, or as a streamable-HTTP service you drive from another machine.

Use cases

You have You want to Guide
A .dmp from a crash Root-cause it: exception, faulting frame, why it happened Analyze a crash dump
A live user-mode process (via cdb -server) Break in and inspect a hang or live state Debug a remote target
A KD-enabled machine or VM Debug drivers, bugchecks, and boot-time issues Debug a kernel target
A folder full of dumps Triage the batch and find the common signature Triage multiple dumps
A debugging host, but you work elsewhere Drive it over HTTP from another machine Debug from another machine
Dumps with secrets or PII Scrub tool output before it leaves the box Redact sensitive data

Tools

Every open_* tool returns an opaque session_id (e.g. cdb-1a2b3c4d); pass it to the matching run_*, close_*, send_ctrl_break, and wait_for_break calls. User-mode targets (dumps and -remote) run under cdb.exe; kernel targets run under kd.exe.

Tool Purpose
list_dumps List crash dump files in a directory
open_cdb_dump Open and triage a crash dump
open_cdb_remote Attach to a user-mode remote debug server (-remote)
open_kd_session Attach to a kernel target (-k, KDNET / named pipe / serial)
run_cdb_command Run a command on a user-mode session
run_kd_command Run a command on a kernel session
close_cdb_session Close a user-mode session
close_kd_session Close a kernel session (resumes the target machine)
send_ctrl_break Break into a running live session
wait_for_break Wait for a target you resumed with g to stop again

Parameters, timeouts, and the built-in triage prompts are in the tools reference.

Quick start

Prerequisites

[!TIP] In enterprise environments, MCP server usage might be restricted by organizational policies. Check with your IT team about AI tool usage and ensure you have the necessary permissions before proceeding.

Claude Code - install the plugin. This is the shortest path: no pip install, no MCP config to edit. It brings the ten tools, four skills (analyze-dump, debug-remote, kernel-debug, windbg-doctor) and a crash-analyst agent that investigates a dump on its own and reports back.

/plugin marketplace add svnscha/mcp-windbg
/plugin install mcp-windbg-uvx@mcp-windbg

The plugin launches the server with uv's uvx, which fetches the pinned version from PyPI on first use. See the plugin README for symbols setup and how to run it without uv.

Any other client - install the package

pip install mcp-windbg

Configure your client. The two most common setups are below; see the client configuration guide for Claude Desktop, Copilot CLI, Autohand Code, HTTP, and from-source.

Claude Code - if you did not use the plugin above, register the server directly:

claude mcp add mcp-windbg -s user -e _NT_SYMBOL_PATH="SRV*C:\Symbols*https://msdl.microsoft.com/download/symbols" -- python -m mcp_windbg

VS Code (GitHub Copilot) - press F1 and select MCP: Open User Configuration to enable it in every workspace:

{
    "servers": {
        "mcp_windbg": {
            "type": "stdio",
            "command": "python",
            "args": ["-m", "mcp_windbg"],
            "env": {
                "_NT_SYMBOL_PATH": "SRV*C:\\Symbols*https://msdl.microsoft.com/download/symbols"
            }
        }
    }
}

Restart your client, then start debugging:

Analyze the crash dump at C:\dumps\app.dmp
Connect to tcp:Port=5005,Server=192.168.0.100 and show me the current thread state
Open a kernel session on net:port=50000,key=1.2.3.4, run !analyze -v, and tell me which driver bugchecked

Server options (--cdb-path, --kd-path, --symbols-path, --filter-script, --transport, ...) are documented in the command-line reference.

Documentation

svnscha.github.io/mcp-windbg

Topic Description
Getting started Setup and your first crash dump analysis
Analyze a crash dump Root-cause an exception: faulting frame, why it happened
Debug a remote target Break into a live user-mode process and inspect a hang
Debug a kernel target Drivers, bugchecks, and boot-time issues over KDNET or a pipe
Triage multiple dumps Scan a folder and find the common signature
Debug from another machine Run the server over HTTP and drive it remotely
Redact sensitive data Scrub secrets from tool output before it leaves the box
Reference Tools, prompts, CLI options, and client configuration
Troubleshooting Common issues and solutions
Development Run from a local checkout and point a client at the dev build

Blog

Read about the development journey: The Future of Crash Analysis: AI Meets WinDbg

License

MIT

Metadata

Release files for mcp-windbg 1.2.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for mcp-windbg 1.2.0
File Size Uploaded
mcp_windbg-1.2.0.tar.gz 57.8 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for mcp-windbg 1.2.0
File Interpreter ABI Platform
mcp_windbg-1.2.0-py3-none-any.whl Python 3 none any Details

Total release size: 121.0 kB

Release files / mcp_windbg-1.2.0.tar.gz

Download URL mcp_windbg-1.2.0.tar.gz
Size 57.8 kB
Tags Source
SHA-256 checksum
How to use checksums
963b749dc5fc9581fbdc1ae671e71b3220b0caf8a8101c0c58dd5650eac0b358
BLAKE2b-256 checksum
How to use checksums
ebcc8d989f8abb00ebf53562b66d8139b7ab26c0747fbe37b02b64b2902d8574
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via uv/0.12.6 {"installer":{"name":"uv","version":"0.12.6","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

Release files / mcp_windbg-1.2.0-py3-none-any.whl

Download URL mcp_windbg-1.2.0-py3-none-any.whl
Size 63.3 kB
Tags Python 3
SHA-256 checksum
How to use checksums
f37b00e3886f371681826df371c0e5cf1671e7b3691b7ed6e6bc458121fd15e6
BLAKE2b-256 checksum
How to use checksums
f95426fe293d0d22a6a704a21be7ae34f89fd13ee4560a096e6b6a264cb4d7b6
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via uv/0.12.6 {"installer":{"name":"uv","version":"0.12.6","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

Release history Release notifications | RSS feed

1.4.0

2 release files

1.3.1

2 release files

1.3.0

2 release files

1.2.2

2 release files

1.2.1

2 release files

This release

1.2.0 This release

2 release files

1.1.0

2 release files

1.0.1

2 release files

1.0.0

2 release files

0.13.0

2 release files

0.12.2

2 release files

0.12.1

2 release files

0.12.0

2 release files

0.10.0

2 release files

0.2.5

2 release files

0.2.3

2 release files

0.2.1

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page