
Hyper-V VM 管理和来宾执行的 MCP 服务器
概览
一个用于Hyper-V VM管理和来宾执行的MCP(模式上下文协议)服务器. VM生命周期,检查点管理,内核调试设置(KDNET/KDCOM)等19个工具,并通过PowerShell Direct(不需要WinRM)发布来宾文件传输/命令执行. 被设计成与 kd- mcp 配对,它将 kd.exe 包起来用于内核调试. hyperv confit kdnet返回一个内核 attach string 您可以直接传递到 kd- mcp 的内核 attach 工具—— 端到端的 VM快照 KDNET 配置 内核附加在一个工作流程中. - Windows 10/11 Pro 或 Entertainment with Hyper-V 启用 - Python 3.10+ - 服务器运行过程(作为管理员运行)或用户账户必须是本地组的成员 这可以安装高频-mcp控制台脚本并自动拉入mcp依赖. 安装特定修改(立方或承诺): hyperv confition kdnet,hyperv confition kdcom,和所有hyperv guest-XX工具通过PowerShell Direct连接到VM来宾,需要本地管理员的证明.
概述(AI 翻译)
一个用于Hyper-V VM管理和来宾执行的MCP(模式上下文协议)服务器. 曝光用于 VM 生命周期、 检查站管理、 内核调试设置的 19个工具 (KDNET/KDCOM),通过 PowerShell Direct 的来宾文件传输/命令执行 (无需WinRM).
设计为与 kd- mcp 对齐, 包接
kd.exe内核调试。 [[T1] 返回 akernel_attach_string您可以直接通过 kd- mcp 的工具 [T3] 。 从端到端的VM快照 KDNET配置 内核附加在一个工作流程中.
– – . . .
□ 要求
- Windows 10/11 Pro或具有超V功能的企业
- 第3.10号线+
- 运行服务器的进程必须提升(以管理员身份运行)或 用户账户必须是 Hyper-V 管理员 本地组的成员
– – . . .
□ 安装
从 GitHub 直接安装 :
安装 hyperv-mcp 控制台脚本并拉入 [[T5] 依赖
自动。
安装特定修改(立方或承诺):
QQ 设置来宾证书
[[T6]、[T7]和所有[T8]工具 通过 PowerShell Direct 连接 VM 来宾,并需要本地管理员证书。 把它们设为Env vars:
本页由 AI 翻译,技术细节请以原文为准。
README
以下为原文 README 节选,完整内容请查看原文。
hyperv-mcp
An MCP (Model Context Protocol) server for Hyper-V VM management and guest execution. Exposes 19 tools for VM lifecycle, checkpoint management, kernel debug setup (KDNET/KDCOM), and guest file transfer/command execution via PowerShell Direct (no WinRM required).
Designed to pair with kd-mcp, which wraps
kd.exefor kernel debugging.hyperv_configure_kdnetreturns akernel_attach_stringyou can pass directly to kd-mcp’skernel_attachtool — end-to-end VM snapshot → KDNET config → kernel attach in one workflow.
Requirements
- Windows 10/11 Pro or Enterprise with Hyper-V enabled
- Python 3.10+
- The process running the server must be elevated (run as Administrator) or the user account must be a member of the Hyper-V Administrators local group
Installation
Install directly from GitHub:
pip install git+https://github.com/originsec/hyperv-mcp.git
This installs the hyperv-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]
Set guest credentials
hyperv_configure_kdnet, hyperv_configure_kdcom, and all hyperv_guest_* tools
connect to VM guests via PowerShell Direct and need local admin credentials.
Set them once as env vars:
$env:HYPERV_GUEST_USERNAME = "Administrator"
$env:HYPERV_GUEST_PASSWORD = "your_guest_password"
The hyperv_victim_* tools use a separate unprivileged account for EoP testing:
$env:HYPERV_GUEST_VICTIM_USERNAME = "victim"
$env:HYPERV_GUEST_VICTIM_PASSWORD = "your_victim_password"
Connecting to MCP clients
Claude Code (CLI)
claude mcp add hyperv -- hyperv-mcp
.mcp.json
{
"mcpServers": {
"hyperv": {
"command": "hyperv-mcp"
}
}
}
If you need to pin guest credentials per-config:
{
"mcpServers": {
"hyperv": {
"command": "hyperv-mcp",
"env": {
"HYPERV_GUEST_USERNAME": "Administrator",
"HYPERV_GUEST_PASSWORD": "your_guest_password"
}
}
}
}
You can also invoke the module directly without the console script:
python -m hyperv_mcp
Development install
git clone https://github.com/originsec/hyperv-mcp.git
cd hyperv-mcp
pip install -e .
Available Tools (19 total)
VM Lifecycle
| Tool | Parameters | Returns |
|---|---|---|
hyperv_list_vms |
— | [{name, state, status, memory_mb, cpu_count, uptime_seconds}] |
hyperv_get_vm_info |
vm_name |
{name, state, generation, com_ports, network_adapters, hard_drives, ...} |
hyperv_start_vm |
vm_name |
{status, vm_name, state} |
hyperv_stop_vm |
vm_name, method |
{status, vm_name, method, state} |
hyperv_reset_vm |
vm_name |
{status, vm_name, state} |
安装
This server does not publish a one-line install command.
Open the repository installation guide 新手?先看 mcpskill.org 教程 →配置
{
"mcpServers": {
"hyperv": {
"command": "hyperv-mcp"
}
}
}