基本能力
产品定位
MCP PowerShell Exec Server 是一个用于执行 PowerShell 脚本的工具,旨在帮助开发者和 AI 助手高效地运行和管理 PowerShell 脚本。
核心功能
- 通过字符串输入接收 PowerShell 脚本
- 在 MCP Server 环境中安全执行脚本
- 实时返回执行结果
适用场景
- 开发者需要快速测试和执行 PowerShell 脚本
- AI 助手需要与 PowerShell 脚本交互
- 自动化任务和脚本管理
工具列表
- GitHub Copilot 扩展:用于与 VSCode Insiders 集成,提供 AI 辅助功能
- VSCode Insiders:提供开发环境和 Copilot 支持
常见问题解答
- 问题:如何配置 MCP Server 与 GitHub Copilot 集成?
解答:在.vscode/mcp.json
中配置服务器路径和参数。 - 问题:系统要求是什么?
解答:需要 Python 3.10 或更高版本,以及 PowerShell 5.1。
使用教程
使用依赖
- Python:版本 3.10 或更高
bash
python --version - PowerShell:版本 5.1
powershell
$PSVersionTable.PSVersion
安装教程
- 克隆仓库
powershell
git clone https://github.com/yourusername/mcp-powershell-exec.git
cd mcp-powershell-exec - 配置 VSCode Insiders 和 GitHub Copilot
- 安装 VSCode Insiders
- 安装 GitHub Copilot 扩展
- 配置
.vscode/mcp.json
文件
调试方式
- 启动 MCP Server
bash
python server.py - 在 VSCode Insiders 中启用 Agent 模式
- 打开 Copilot 聊天
- 选择 "Agent mode"
- 刷新聊天输入以加载可用工具