WinTerm MCP 服务是一个模型上下文协议服务器,它提供了对 Windows 终端的程序化访问能力。借助该服务器,AI 模型能够通过一组标准化工具与 Windows 命令行接口进行交互,为 Windows 环境下的自动化操作和智能交互提供了便利。
WinTerm MCP 服务专为 Windows 命令行交互设计,可让 AI 模型与 Windows 终端进行交互。下面为你介绍其使用步骤。
git clone https://github.com/capecoma/winterm-mcp.git
cd winterm-mcp
npm install
npm run build
%APPDATA%/Claude/claude_desktop_config.json 中:{
"mcpServers": {
"github.com/capecoma/winterm-mcp": {
"command": "node",
"args": ["path/to/build/index.js"],
"disabled": false,
"autoApprove": []
}
}
}
⚠️ 重要提示
请将 "path/to/build/index.js" 替换为您实际构建的 index.js 文件路径。
write_to_terminal向终端写入文本或命令。
{
"command": "echo Hello, World!"
}
read_terminal_output从终端输出中读取指定数量的行。
{
"linesOfOutput": 5
}
send_control_character向终端发送控制字符(例如 Ctrl+C)。
{
"letter": "C"
}
带有自动重建功能的开发:
npm run dev
本项目采用 MIT License 许可协议,详情请参阅 LICENSE 文件。