
用于执行PowerShell脚本的MCP服务器
概览
MCP PowerShell 执行服务器是一个轻量级服务器,接受 PowerShell 脚本作为字符串,执行它们并返回输出。使 AI 助手能够理解并使用 PowerShell。 - 通过字符串输入接受PowerShell脚本 - 在MCP服务器环境中安全执行脚本 - 实时返回执行结果 克隆仓库并搭建服务器: 观看视频,了解MCP PowerShell执行服务器的实际操作: 要在VSCode Insiders中使用该MCP服务器配合GitHub Copilot,请遵循以下步骤: 1. - 下载并安装最新版本的VSCode Insiders 1. - 打开VSCode Insiders——访问扩展市场——搜索并安装“GitHub Copilot” 3. - 打开 .vscode/mcp.json 将路径替换为你 server.py 文件的实际路径。
概述(AI 翻译)
概述
MCP PowerShell 执行服务器是一个轻量级服务器,接受 PowerShell 脚本作为字符串,执行它们并返回输出。使 AI 助手能够理解并使用 PowerShell。
特色
- 通过字符串输入接受PowerShell脚本
- 在MCP服务器环境中安全执行脚本
- 返回执行结果为实时
安装
克隆仓库并搭建服务器:
行动
观看视频,了解MCP PowerShell执行服务器的实际操作:
用途
与 VSCode Insiders 中的 GitHub Copilot 集成
要在VSCode Insiders中使用该MCP服务器配合GitHub Copilot,请遵循以下步骤:
- 安装VSCode Insiders
- 下载并安装最新版本的VSCode Insiders
- 安装GitHub Copilot扩展
- 开放VSCode Insiders
- 前往扩展市场
- 搜索并安装“GitHub Copilot”
- 配置MCP服务器
- 打开 .vscode/mcp.json
用你 server.py 文件的实际路径替换路径。
- 启用代理模式
- VSCode Insiders 中开启 Copilot 聊天
- 点击“副驾驶编辑”
- 选择“代理模式”
本页由 AI 翻译,技术细节请以原文为准。
README
MCP PowerShell Exec Server
Overview
MCP PowerShell Exec Server is a lightweight server that accepts PowerShell scripts as strings, executes them, and returns the output. Enabling AI assistants to understand and work with PowerShell.
Features
- Accepts PowerShell scripts via string input
- Executes scripts securely in an MCP Server environment
- Returns execution results in real-time
Installation
Clone the repository and set up the server:
git clone https://github.com/yourusername/mcp-powershell-exec.git
cd mcp-powershell-exec
In Action
Watch the video to see MCP PowerShell Exec Server in action:
Usage
Integration with GitHub Copilot in VSCode Insiders
To use this MCP server with GitHub Copilot in VSCode Insiders, follow these steps:
-
Install VSCode Insiders
- Download and install the latest version of VSCode Insiders
-
Install GitHub Copilot Extension
- Open VSCode Insiders
- Go to the Extensions marketplace
- Search for and install “GitHub Copilot”
-
Configure MCP Server
- Open .vscode/mcp.json
{ "servers": { "powershell-integration": { "command": "py", // Python executable "args": [ "drive:/yourpath/server.py" ], "env": {} } } }Replace the path with the actual path to your
server.pyfile. -
Enable Agent Mode
- Open Copilot chat in VSCode Insiders
- Click on “Copilot Edits”
- Choose “Agent mode”
- Click the refresh button in the chat input to load the available tools
System Requirements
- Python: Version 3.10 or higher (required for optimal performance)
- PowerShell: Version 5.1
License
This project is licensed under the MIT License - see the LICENSE file for details.
Support
For issues and questions:
- Create an issue in this GitHub repository
安装
This server does not publish a one-line install command.
Open the repository installation guide 新手?先看 mcpskill.org 教程 →