Sven Scharmentke 01245ba067 Publishing
2025-10-11 12:46:05 +02:00
2025-10-11 12:46:05 +02:00
2025-05-19 08:43:47 +02:00
2025-05-05 21:28:58 +02:00
2025-10-11 10:32:14 +02:00
2025-10-11 12:46:05 +02:00
2025-05-02 21:08:28 +02:00
2025-10-11 12:46:05 +02:00
2025-10-11 11:11:29 +02:00
2025-10-11 12:46:05 +02:00
2025-10-11 12:46:05 +02:00

MCP Server for WinDBG Crash Analysis

A Model Context Protocol server that bridges AI models with WinDBG for crash dump analysis and remote debugging.

Overview

This MCP server integrates with CDB to enable AI models to analyze Windows crash dumps and connect to remote debugging sessions using WinDBG/CDB.

What is this?

Primarily, a tool that enables AI to interact with WinDBG for both crash dump analysis and live debugging. The "magic" is giving LLMs the ability to execute debugger commands on crash dumps or remote debugging targets.

This means you can:

  • Get immediate first-level triage analysis for categorizing crash dumps
  • Perform natural language-based analysis: "Show me the call stack and explain what might be causing this access violation"
  • Auto-analyze simple cases and get insights for complex debugging scenarios
  • Connect to live debugging sessions for real-time analysis

What this is NOT: A magical solution that automatically fixes all issues. It's a simple Python wrapper around CDB that relies on the LLM's WinDBG expertise.

Quick Start

Prerequisites

Installation

pip install mcp-windbg

Configuration

Create .vscode/mcp.json in your 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"
            }
        }
    }
}

Enable "Model Context Protocol in Chat" in Copilot settings, restart VS Code, and start analyzing:

@copilot Analyze the crash dump at C:\dumps\app.dmp

Tools

  • list_windbg_dumps - List crash dump files in directories
  • open_windbg_dump - Analyze Windows crash dumps with automatic !analyze -v
  • open_windbg_remote - Connect to remote debugging sessions
  • run_windbg_cmd - Execute any WinDBG command on dumps or remote sessions
  • close_windbg_dump / close_windbg_remote - Clean up resources

Documentation

📖 Complete Documentation Wiki

Topic Description
Getting Started Quick setup and first steps
Installation Detailed installation for pip, MCP registry, and from source
Usage VS Code integration, command-line usage, and workflows
Tools Reference Complete API reference and examples
Troubleshooting Common issues and solutions

Examples

Crash Dump Analysis

"Analyze this heap address with !heap -p -a 0xABCD1234 and check for buffer overflow"
"Execute !peb and tell me if there are any environment variables that might affect this crash"
"Run .ecxr followed by k and explain the exception's root cause"

Remote Debugging

"Connect to tcp:Port=5005,Server=192.168.0.100 and show me the current thread state"
"Check for timing issues in the thread pool with !runaway and !threads"
"Show me all threads with ~*k and identify which one is causing the hang"

Blog

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

License

MIT

S
Description
Model Context Protocol for WinDbg.
Readme MIT 7.2 MiB
Languages
Python 92.9%
PowerShell 7.1%