article
README
🚀 MCP PowerShell 执行服务器
MCP PowerShell 执行服务器是一款轻量级服务器,它允许用户输入 PowerShell 脚本字符串,执行后返回结果,让 AI 助手也能理解和操作 PowerShell。
🚀 快速开始
MCP PowerShell 执行服务器能让你轻松执行 PowerShell 脚本。以下是快速开始的步骤:
git clone https://github.com/yourusername/mcp-powershell-exec.git
cd mcp-powershell-exec
✨ 主要特性
- 接受字符串形式的 PowerShell 脚本。
- 在 MCP 服务器环境中安全执行脚本。
- 实时返回执行结果。
📦 安装指南
克隆仓库并设置服务器:
git clone https://github.com/yourusername/mcp-powershell-exec.git
cd mcp-powershell-exec
💻 使用示例
基础用法
你可以直接向服务器输入 PowerShell 脚本字符串,服务器会执行并返回结果。
与 VSCode Insiders 中的 GitHub Copilot 集成
要使用此 MCP 服务器与 VSCode Insiders 中的 GitHub Copilot 结合,请按照以下步骤操作:
- 安装 VSCode Insiders
- 下载并安装最新版本的 VSCode Insiders
- 安装 GitHub Copilot 扩展
- 打开 VSCode Insiders。
- 进入扩展市场。
- 搜索并安装 "GitHub Copilot"。
- 配置 MCP 服务器
- 打开
.vscode/mcp.json
将路径替换为您实际的{ "servers": { "powershell-integration": { "command": "py", // Python 可执行文件路径 "args": [ "drive:/yourpath/server.py" ], "env": {} } } }server.py文件位置。 - 打开
- 启用代理模式
- 打开 Copilot 聊天窗口。
- 点击 "Copilot Edits"。
- 选择 "Agent Mode"。
- 点击聊天输入中的刷新按钮以加载可用工具。
📚 详细文档
动作展示
观看视频了解 MCP PowerShell 执行服务器的实际操作: 点击观看
系统要求
- Python:版本 3.10 或更高(为获得最佳性能推荐)
- PowerShell:版本 5.1
📄 许可证
此项目在 MIT 许可证下开源 - 具体内容请查看 LICENSE 文件。
🔧 支持
如需帮助或报告问题,请在该 GitHub 仓库创建问题。
微信扫一扫