OK

originsec/kd-mcp

Developer tools

このページは AI により自動翻訳されています。技術的な詳細は原文をご確認ください。 原文を見る

18 stars 8 forks 品質 73 トレンド 26Apache-2.0

Windowsカーネルデバッグ用MCPサーバ `kd.exe`

概要

Windowsカーネルデバッグ用のkd.exeをラップするMCP(Model Context Protocol)サーバー。 kd.exe をサブプロセスとしてスパースし、22 MCP ツールとして機能を公開します。 DbgEngのCOMのラッパーのねじれの限界なしでKDNETの接続、ブレークポイント、記憶読書、記録の点検および記号の決断を扱います。 Hyper-V VM を管理し、PowerShell Direct を介してゲスト内で KDNET を構成する、hyperv-mcp と組み合わせるように設計されています。 hyperv-mcp を使用して VM をスナップショットし、KDNET を設定し、結果の kernel attach string を kd-mcp の kernel attach に渡して、カーネルのデバッグセッションにドロップします。 - WindowsのデバッグツールがインストールされているWindows 10/11 - Python 3.10 + - KDNET上で接続されたターゲットカーネル これは、kd-mcp コンソールスクリプトをインストールし、mcp 依存を自動的にプルします。 特定のリビジョン(タグまたはコミット)をインストールするには: KD EXE 環境変数を他の場所をインストールした場合にオーバーライドします。 コンソールスクリプトなしでモジュールを直接呼び出すこともできます。 — kd を起動します.

概要(AI 翻訳)

Windowsカーネルデバッグ用のMCP(Model Context Protocol)サーバ(kd.exe) kd.exe をサブプロセスとしてスパースし、22 MCP ツールとして機能を公開します。 KDNET接続、ブレークポイント、メモリ読み取り、レジスタ検査、シンボルの取り扱い DbgEngのCOMのラッパーのねじれの限界のない決断。

hyperv-mcp と組み合わせる設計 Hyper-V VM を管理し、PowerShell を介してゲスト内で KDNET を設定 直接。 hyperv-mcp を使用して、VM をスナップショットし、KDNET を設定し、その後、渡します。 kernel_attach_string を kd-mcp の [kernel_attach] に変換し、 カーネルデバッグセッション。

お問い合わせ

要件

  • WindowsのデバッグツールがインストールされているWindows 10/11
  • Python 3.10 +
  • KDNET 上で接続されるターゲットカーネル

お問い合わせ

インストール

GitHubから直接インストールします。

[kd-mcp] コンソールスクリプトをインストールし、[mcp] 依存を自動的にプルします。

特定のリビジョン(タグまたはコミット)をインストールするには:

##kd.exeの場所

サーバのデフォルト:

[KD_EXE] にオーバーライドする:

お問い合わせ

MCP クライアントへの接続

##Claudeコード(CLI)

.mcp.json ディレクティブ

設定ごとに[KD_EXEをピン留めする必要がある場合:

このページは AI により自動翻訳されています。技術的な詳細は原文をご確認ください。

README

以下は原文 README の抜粋です。原文を見る。

kd-mcp

An MCP (Model Context Protocol) server wrapping kd.exe for Windows kernel debugging. Spawns kd.exe as a subprocess and exposes its functionality as 22 MCP tools. Handles KDNET connections, breakpoints, memory reads, register inspection, and symbol resolution without the threading limitations of DbgEng COM wrappers.

Designed to pair with hyperv-mcp, which manages Hyper-V VMs and configures KDNET inside guests via PowerShell Direct. Use hyperv-mcp to snapshot a VM and set up KDNET, then pass the resulting kernel_attach_string to kd-mcp’s kernel_attach to drop into a kernel debug session.


Requirements


Installation

Install directly from GitHub:

pip install git+https://github.com/originsec/kd-mcp.git

This installs the kd-mcp console script and pulls in the mcp dependency automatically.

To install a specific revision (tag or commit):

pip install git+https://github.com/originsec/[email protected]

kd.exe location

The server defaults to:

C:\Program Files (x86)\Windows Kits\10\Debuggers\x64\kd.exe

Override with the KD_EXE environment variable if installed elsewhere:

$env:KD_EXE = "C:\path\to\kd.exe"

Connecting to MCP clients

Claude Code (CLI)

claude mcp add kd -- kd-mcp

.mcp.json

{
  "mcpServers": {
    "kd": {
      "command": "kd-mcp"
    }
  }
}

If you need to pin KD_EXE per-config:

{
  "mcpServers": {
    "kd": {
      "command": "kd-mcp",
      "env": { "KD_EXE": "C:\\path\\to\\kd.exe" }
    }
  }
}

You can also invoke the module directly without the console script:

python -m kd_mcp

Development install

git clone https://github.com/originsec/kd-mcp.git
cd kd-mcp
pip install -e .

Available Tools (21 total)

Session

Tool Parameters Returns
kernel_attach connect_string, reset_vm?, timeout {status, kernel_version, attempts, output}
status — {connected, pid?}
detach — {status}

kernel_attach — Launches kd.exe and connects via KDNET. Auto-respawns kd.exe on connection failures until timeout expires, so it can catch the KDNET hello packet whenever the target becomes ready (e.g. after a VM reboot). Pass reset_vm with a Hyper-V VM name to hard-reset the VM 2 seconds after kd.exe starts.

connect_string format: "net:port=50000,key=a1b2.c3d4.e5f6.a7b8.c9d0"

Execution Control

Tool Parameters Returns
go timeout {status, output}
break_in timeout {status, output}
step_into — {output}
step_over — {output}
GitHub で README 全文を見る

インストール

This server does not publish a one-line install command.

Open the repository installation guide MCP 初心者?mcpskill.org のガイドから始めましょう →

設定

{ "mcpServers": { "kd": { "command": "kd-mcp" } } }