WindowsInstall MCP
WindowsInstall MCP
基于 MCP (Model Context Protocol) 的 Windows 批量部署管理工具,支持远程重启、PXE 重装、定时任务等功能。
功能概览
功能 | 说明 |
机器管理 | 查看、添加、修改、删除机器配置 |
WinRM 远程操作 | 通过 WinRM 重启远程 Windows 机器 |
PXE 重装 | 通过 iVentoy + WinRM 实现无人值守重装 |
定时任务 | 定时重启/重装,到时间自动执行 |
TrustedHosts 管理 | 自动管理 WinRM 信任列表 |
环境要求
Windows 10/11 或 Windows Server
Python 3.10+
PowerShell 5.1+
管理员权限AI 客户端需以管理员身份运行
WinRM 已启用(运行
winrm quickconfig或在 PowerShell 中执行以下命令):Enable-PSRemoting -Force Set-Item WSMan:\localhost\Client\TrustedHosts * -Concatenate -ForceiVentoy 已安装并在运行(PXE 重装功能依赖,默认监听
http://127.0.0.1:26000)
前置配置
1. 生成机器凭据
MCP 会通过 PowerShell Export-Clixml 自动生成 <机器名>.credential.xml 加密文件,用于 WinRM 认证。
注意:同一个 Windows 用户创建的 XML 才能读取。MCP Server 需以创建凭据的同一用户身份运行。如果换人使用这台 MCP Server,需要重新为所有机器生成凭据。
通过 MCP 对话添加机器(推荐),MCP 会自动生成凭据文件并写入 machines.json:
添加 PC-03
IP 是 172.30.8.203
MAC 是 AA-BB-CC-DD-EE-03
用户名 public
密码 123456也可以手动编辑 machines.json,但需要先生成凭据文件:
{
"PC-01": {
"ip": "172.30.8.200",
"mac": "AA-BB-CC-DD-EE-01",
"credential_file": "PC-01.credential.xml"
}
}2. MCP 客户端配置
详见 根目录 README。
功能用法
查看机器
查看所有电脑
查看 PC-01添加机器
添加 PC-03
IP 是 172.30.8.203
MAC 是 AA-BB-CC-DD-EE-03
用户名 public
密码 123456也可以一次提供多台机器的信息。
修改机器
把 PC-01 的 IP 改成 172.30.8.201
把 PC-01 的 MAC 改成 AA-BB-CC-DD-EE-02
更新 PC-01 的登录凭据,用户名 public,密码 123456删除机器
删除 PC-01
同时删除 PC-01 和 PC-02重启机器
重启 PC-01
同时重启 PC-01、PC-02、PC-03重装机器(PXE 无人值守安装)
重装 PC-01
同时重装 PC-01 和 PC-02流程:添加 MAC 到 iVentoy → 等待 60 秒自动移除 → WinRM 重启 → PXE 启动 → 无人值守安装。
定时重启
2026-08-19 02:00 重启 PC-01
2026-08-19 02:00 同时重启 PC-01 和 PC-02时间格式:YYYY-MM-DD HH:MM
定时重装
2026-08-19 03:00 重装 PC-01
2026-08-19 03:00 同时重装 PC-01、PC-02、PC-03查看/取消定时任务
查看所有定时任务
取消任务 MCP_Reboot_20260819_0200_xxxxxxxx
取消 MCP_Reboot_xxx 和 MCP_Reinstall_xxx
取消全部定时任务查看 TrustedHosts
查看 TrustedHosts项目结构
.
├── server.py # MCP Server 主程序
├── machines.json # 机器配置(本地 JSON 文件存储)
├── scheduled_tasks.json # 定时任务记录(本地 JSON 文件存储)
├── scheduled_jobs/ # 定时任务详情(本地 JSON 文件存储)
├── *.credential.xml # 认证凭据(本地加密 XML 文件)
├── mcp.json # MCP 客户端连接配置
├── requirements.txt # Python 依赖
└── README.md安全说明
凭证文件:
*.credential.xml使用 PowerShellExport-Clixml加密,仅创建者可读取敏感文件已加入
.gitignore:.credential.xml、machines.json、scheduled_tasks.json不会被提交到 Git运行用户:MCP Server 需以创建凭据的同一 Windows 用户身份运行。不同用户创建的凭据互不兼容,换人使用需重新生成所有凭据
网络暴露:iVentoy API 默认监听
127.0.0.1:26000,仅限本机访问。如需远程调用,请确认防火墙规则
License
MIT
This server cannot be installed
Maintenance
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
Related MCP Connectors
Personal assistant MCP server with search, execute, packages, jobs, secrets, and integrations.
The MCP server for Azure DevOps, bringing the power of Azure DevOps directly to your agents.
MCP server for Wan AI video generation
Latest Blog Posts
- Who's Calling? MCP Hosts Are an Identity Blind Spot (And the Spec Knows It)By Om-Shree-0709 on .mcpAgent IdentityOAuth 2.1
- Your AI Chatbot Just Exposed Your CEO's Salary to an InternBy Om-Shree-0709 on .Agent IdentityMCP SecurityOAuth Delegation
- Why MCP Servers Need Execution Sandboxing (And Why Your Current Stack Isn't Enough)By Om-Shree-0709 on .Agentic AiPrompt InjectionWebAssembly
MCP directory API
We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/kaip-c/windows-install-mcp'
If you have feedback or need assistance with the MCP directory API, please join our Discord server