Windbg MCP Rsのロゴ

Windbg MCP Rs

コミュニティ
kanren3

A WinDbg plugin that turns the current debugging session into an MCP server for command docs, debugger actions, and AI-assisted analysis.

公開者kanren3
リポジトリwindbg-mcp-rs
言語Rust
フォーク
9
スター
57
利用可能なツール
0
通信方式stdio
ライセンスMIT
リンク
  • ツールをAIワークフローに接続

    Windbg MCP Rsは、対応するAIクライアントやAIエージェントから利用できるMCP機能を提供します。

  • 0個の利用可能なツール

    呼び出し可能なアクションを以下で確認できます。サーバーから提供されている場合は、名前や説明も表示されます。

  • コピーして使える設定

    セットアップ用の設定例を使って、お好みのMCPクライアントにこのサーバーを設定できます。

  • オープンソースの注目度

    リンク先のリポジトリには57件のスターと9件のフォークがあります。

windbg-mcp-rs

windbg-mcp-rs is a pure WinDbg extension DLL that exposes the current debugging session as an MCP server.

  • Read official WinDbg command documentation extracted from docs/debugger.chm
  • Execute WinDbg commands through dbgeng
  • Interrupt a running target from MCP
  • Alternative — windbg-mcp (headless, stdio): a sibling project that drives cdb.exe/kd.exe as subprocesses. No WinDbg GUI required, multi-session, auto-detects installed Windows Debugging Tools.

Screenshots

WinDbg MCP plugin screenshot 1

WinDbg MCP plugin screenshot 2

Quick Start

1. Install the released extension

One-liner (recommended):

powershell
irm https://raw.githubusercontent.com/kanren3/windbg-mcp-rs/master/scripts/install.ps1 | iex

This downloads the latest release from GitHub and installs to all discovered WinDbg locations.
Run as Administrator to install to SDK debugger paths.

2. Build the DLL (developers)

powershell
# x64 (default)
cargo build --release --target x86_64-pc-windows-msvc

# x86 / 32-bit WinDbg
rustup target add i686-pc-windows-msvc
cargo build --release --target i686-pc-windows-msvc

# ARM64
rustup target add aarch64-pc-windows-msvc
cargo build --release --target aarch64-pc-windows-msvc

Release tags publish one architecture-specific archive for every supported WinDbg engine:

WinDbg architectureRust targetRelease suffixStore DLL destination
x86i686-pc-windows-msvcwindows-x86.zipEngineExtensions32\windbg_mcp_rs.dll
x64x86_64-pc-windows-msvcwindows-x64.zipEngineExtensions\windbg_mcp_rs.dll
ARM64aarch64-pc-windows-msvcwindows-arm64.zipEngineExtensions\windbg_mcp_rs.dll

The checked-in gallery manifest remains architecture-neutral (Architecture="Any"). The installer generates Store-only absolute entries for the architectures actually installed. Store gallery package validation requires the loaded DLL file name to match the binary component name, so Store DLLs are always named windbg_mcp_rs.dll; architecture is selected by the manifest entry and destination directory. Installation is filtered by host architecture before copying files. On x64 Windows, the installer publishes x86 and x64 entries because WinDbg can use the x86 engine for x86 targets. On ARM64 Windows, the installer publishes only the ARM64 entry by default. Extra SDK directories for non-native architectures are ignored unless they are part of that host architecture set.

3. Install a local build

Install from local build:

powershell
.\scripts\install.ps1 -LocalPath .\target

-LocalPath accepts either a flat directory containing windbg_mcp_rs.dll or a build root containing <RustTarget>\release\windbg_mcp_rs.dll. The installer reads each DLL's PE machine, rejects mismatched or duplicate candidates, discovers Store packages through Get-AppxPackage before falling back to WindowsApps, and returns a nonzero exit code if any required architecture fails. Validate without changing installation files with:

powershell
.\scripts\install.ps1 -LocalPath .\target -DryRun

Manual install:

text
# SDK Debuggers
copy target\<RustTarget>\release\windbg_mcp_rs.dll     <matching-windbg>\winext\
copy windbg_mcp_rs_GalleryManifest.xml                 <windbg>\OptionalExtensions\

# WinDbg (Store) — use install.ps1 (manual setup is complex)
# The script rewrites the manifest with absolute architecture-specific paths
# and publishes the shared gallery files.
# atomically under %LOCALAPPDATA%\DBG\ExtRepository\windbg-mcp-rs\.
# Then run:
#   .settings load %LOCALAPPDATA%\DBG\ExtRepository\windbg-mcp-rs\config.xml
#   .settings save

4. Verify

Start WinDbg and run:

text
!mcp status

The MCP server auto-starts when WinDbg reports an active debugging session.
Endpoint: the first available endpoint from http://127.0.0.1:50051/mcp through http://127.0.0.1:50070/mcp.

5. Connect your MCP client

Run !mcp status and point your client to the reported endpoint. For a single instance this is usually:

text
http://127.0.0.1:50051/mcp

Multi-Instance Discovery

When the default port is already in use, auto-start tries the next localhost port up to 127.0.0.1:50070. Each running WinDbg instance writes a user-local discovery file:

text
%LOCALAPPDATA%\windbg-mcp-rs\instances\instance-<pid>.json

The JSON file contains the MCP server name and URL, host WinDbg/EngHost process id, host architecture, host process path, start timestamp, and a best-effort current_target snapshot for discovery prioritization. In schema 1, mcp_server_name and mcp_server_url identify the MCP endpoint, host_pid, host_arch, and host_process_path identify the process hosting the MCP extension, while current_target uses name for the active target image name/path, source_path for offline dump/trace source files when available, and transport/endpoint for remote transports. current_target can be null during early startup or after the debug session becomes inactive, and is refreshed after WinDbg reports an accessible session or a relevant target/session event. The snapshot is only a hint; clients must still treat registry files as candidates and confirm liveness and target identity with an MCP initialize handshake before using the endpoint. The running extension keeps a companion instance-<pid>.lock file open to mark the instance as active, and rewrites instance-<pid>.json through instance-<pid>.json.tmp followed by an atomic replace. When another instance starts, it tries to delete old instance-*.lock, instance-*.json, and instance-*.json.tmp groups; active instances remain protected by their lock file, while stale files from crashed or killed WinDbg processes are normally removed.

WinDbg Commands

Use !mcp help to list all plugin commands.

Common ones:

text
!mcp help
!mcp serve 127.0.0.1:50051
!mcp status
!mcp catalog dt
!mcp doc dt
!mcp stop

What MCP Exposes

  • Resources: a low-context guide resource and compact/full WinDbg command documentation resources
  • Tools: a compact toolset for catalog search, execution-state query, command execution, and target interrupt

Pure UI shortcut topics remain available as documentation, and command execution is exposed through a single windbg_execute_command tool.

Recommended agent flow: call windbg_search_catalog, read windbg://command/{id}, fall back to windbg://command-full/{id} only when needed, call windbg_get_execution_state, and then call windbg_execute_command.

If the debugger is running or busy, call windbg_interrupt_target explicitly and verify state again before executing the command.

Development

powershell
cargo check
cargo test

Notes

  • This project was written entirely with a Vibe Coding workflow
  • The server runs inside the WinDbg process
  • The runtime does not parse docs/debugger.chm; it uses the prebuilt static catalog in src/catalog.json
  • The transport is Streamable HTTP
  • Set your MCP client timeout as high as possible, because some WinDbg operations can take a long time to finish
  • The server now auto-starts when WinDbg reports an active debugging session. Run !mcp stop to stop it, or !mcp serve to start it again manually.
  • windbg_mcp_rs_GalleryManifest.xml enables WinDbg auto-loading when placed in OptionalExtensions\ alongside the extension DLL.
  • Use scripts\install.ps1 to automatically deploy the extension to all discovered WinDbg installations.

Alternative: windbg-mcp (headless, stdio)

Prefer a headless MCP server that runs as a separate process instead of an in-process WinDbg extension? Check out the sibling project:

  • Repo: https://github.com/kanren3/windbg-mcp
  • Transport: stdio (not Streamable HTTP)
  • Model: drives cdb.exe / kd.exe as subprocesses — no WinDbg GUI required
  • Sessions: multi-session; auto-detects installed Windows Debugging Tools

Drop it straight into your MCP client config:

json
{
  "mcpServers": {
    "windbg-mcp": {
      "command": "bun",
      "args": ["x", "windbg-mcp@latest"]
    }
  }
}

Which one should I use?

windbg-mcp-rs (this repo)windbg-mcp (alternative)
Runs asWinDbg extension DLL (in-process)Standalone process driving cdb/kd
TransportStreamable HTTPstdio
WinDbg GUIRequired (loads the extension)Not required (headless)
Multi-sessionOne extension per WinDbg instanceMultiple cdb/kd subprocesses
SetupInstall DLL into WinDbgbun x windbg-mcp@latest
Best forInteractive debugging alongside the WinDbg UIScripted / CI / agent-only workflows

Both offer overlapping command-execution and interrupt tools, but differ in lifecycle and session management (see the table above). Pick the one that fits your workflow — or run both.

Windbg MCP RsのMCPを複数のAIモデルで活用

TypingMindはワークスペース単位でMCPツールに接続します。そのため、一度Windbg MCP Rsに接続すれば、モデルごとに個別に設定することなく、TypingMind内のさまざまなAIモデルで利用できます。 このMCPは、デバイス上のTypingMind MCPコネクタを通じてローカルで動作します。

ローカルコネクタのセットアップガイド

MCPサーバーが、お使いのコンピューター上のローカルファイル、アプリ、非公開リソースにアクセスする必要がある場合は、この方法を使います。

1

MCP設定を開く

TypingMindで「設定」、「詳細設定」、「MCP」の順に進み、「コネクタを設定」を選択してください。

  1. ブラウザでTypingMindを開いてください。
  2. 設定アイコンをクリックしてください。
  3. 「詳細設定」に移動してください。
  4. 「MCP」セクションを開いてください。
  5. 「コネクタを設定」をクリックし、「このデバイス」を選択してください。
「このデバイス」が選択されたTypingMindのMCPコネクタ設定画面
2

コネクタのコマンドを実行

「このデバイス」を選択し、TypingMindからコマンドをコピーしてターミナルで実行してください。MCPの使用中は、プロセスを実行したままにしてください。

  1. TypingMindに表示されるセットアップコマンドをコピーしてください。
  2. macOSではターミナルを、WindowsではWindows Terminalを開いてください。
  3. コマンドを貼り付けて実行してください。
  4. ターミナルで続行の確認を求められた場合は、パッケージのインストールを承認してください。
  5. MCPツールの使用中は、ターミナルウィンドウを開いたまま、プロセスの実行を継続してください。
3

Windbg MCP Rsをサーバーとして追加

コネクタのステータスが「準備完了」になったら、「サーバーを編集」をクリックし、MCPサーバーの設定を貼り付けてください。

  1. コネクタのステータスが「準備完了」になるまでお待ちください。
  2. 「サーバーを編集」をクリックしてください。
  3. Windbg MCP RsのMCPサーバー設定を貼り付けてください。
  4. サーバー一覧を保存してください。
  5. コネクタが引き続き使用可能か確認するには、更新してください。
稼働中のサーバーと「サーバーを編集」ボタンが表示されたTypingMindのMCP設定画面
{
  "mcpServers": {
    "windbg-mcp-rs": {
      "command": "npx",
      "args": [
        "-y",
        "<mcp-server-package>"
      ]
    }
  }
}
4

複数のモデルで同じ接続を使用

サーバー一覧を保存し、「プラグイン」を開いてWindbg MCP RsのMCPツールを有効にしてください。その後、TypingMindで対応するAIモデルを選択し、チャットでツールを使うか、AIエージェントに割り当ててください。

  1. TypingMindの「プラグイン」ページを開いてください。
  2. Windbg MCP RsのMCPツールを有効にしてください。
  3. チャットを開始し、使用するAIモデルを選択してください。
  4. MCPツールをチャットで使うか、AIエージェントに割り当ててください。
  5. MCPに再接続することなく、必要に応じて別のAIモデルに切り替えられます。
選択したAIモデルと有効なMCPツールを使用したTypingMindのチャット
Windbg MCP Rsを使ってこのタスクを手伝ってもらえますか?
Windbg MCP Rs
はい、読みました。
Windbg MCP Rsで調べた結果をお伝えします。

よくある質問

Windbg MCP Rs MCPサーバーは何に使いますか?

Windbg MCP Rsは、対応するAIクライアントを外部ツールやコンテキストに接続するためのMCPサーバーです。TypingMindでは、このMCPサーバーを一度追加するだけで、AIワークスペース内でそのツールを利用できるようになります。

TypingMindでWindbg MCP Rs MCPを複数のAIモデルと併用できますか?

はい。TypingMindはワークスペース単位でMCPツールに接続するため、モデルごとにMCPサーバーを設定する必要はありません。Claude、ChatGPT、Geminiや、TypingMindで設定したその他のAIモデルでWindbg MCP Rsを利用できます。

TypingMindでWindbg MCP Rs MCPを使うメリットは何ですか?

TypingMindは、複数のAIモデル、プロンプト、プラグイン、AIエージェント、APIキー、MCPツールを1つのワークスペースにまとめられる、LLMチャット向けの優れたフロントエンドです。Windbg MCP Rsを接続すると、TypingMindでチャットのワークフローを整理しながら、お好みのモデルでそのMCPツールを利用できます。

Windbg MCP Rs MCPをTypingMindに接続するにはどうすればよいですか?

Windbg MCP RsはTypingMindのローカルMCPコネクタ経由で動作します。MCPサーバーがコンピューター上のローカルファイル、デスクトップアプリ、コマンドラインツール、プライベートリソースにアクセスする必要がある場合に最適です。

TypingMindでWindbg MCP Rs MCPのどのようなツールを利用できますか?

Windbg MCP RsはMCP機能を提供しています。TypingMindのプラグインページで有効にすると、チャットで使用したり、AIエージェントに割り当てたりできます。

Windbg MCP Rs MCPを使うには、APIキーをTypingMindと共有する必要がありますか?

いいえ。TypingMindはローカルファーストの設計で、モデルプロバイダー、APIキー、プロンプト、MCP設定をご自身で管理できます。Windbg MCP Rsで認証が必要な場合は、接続の作成時に、そのMCPサーバーに必要なヘッダー、OAuth設定、またはローカル設定を追加してください。

関連するMCPサーバー

すべて見る

今すぐ自分専用のAIワークスペースを作成

ニュースレターに登録すると、新機能や今後のプレゼント企画のお知らせが届きます👇