一个安全的模型上下文协议(MCP)服务器,使AI模型能够安全高效地与Windows命令行功能交互。
Windows 命令行 MCP 服务器提供了一个强大的、安全的桥梁,连接AI模型与Windows系统操作。它允许在严格的安全协议下执行受控命令、创建项目以及检索系统信息。
要通过Smithery自动安装Windows命令行MCP服务器:
npx -y @smithery/cli install @alxspiker/Windows-Command-Line-MCP-Server --client claude
git clone https://github.com/alxspiker/Windows-Command-Line-MCP-Server.git
cd Windows-Command-Line-MCP-Server
npm install
npm run build
--allow-all:运行扩展模式(附加预防措施)使用内置的项目创建工具安全地创建新项目:
~/AIProjects目录中创建项目要将此服务器与桌面Claude一起使用:
claude_desktop_config.json:{
"mcpServers": {
"windows-cmd": {
"command": "node",
"args": ["/path/to/dist/index.js"]
}
}
}
将/path/to/dist/index.js替换为构建的index.js文件在dist目录中的绝对路径。
默认情况下,只允许安全命令:
危险命令始终被阻止,包括:
通过指定允许的命令或使用配置标志来自定义服务器的行为。
# 使用默认安全命令运行
node dist/index.js
# 使用特定允许的命令运行
node dist/index.js dir echo npm git
# 运行扩展模式(谨慎使用)
node dist/index.js --allow-all
git checkout -b feature/amazing-feature)git commit -m '添加一些惊人的功能')git push origin feature/amazing-feature)该项目采用MIT许可证——请参阅LICENSE文件获取详细信息。
对于问题、疑问或建议,请在GitHub上打开一个问题。