PowerShell Exec
About
Enables real-time execution of PowerShell scripts through a lightweight Python server, bridging AI tools with PowerShell functionality for data analysis, Windows task automation, and module interaction.
Details
- Author
- dfinke
- Repository
- dfinke/mcp-powershell-exec
- GitHub stars
- 29
- Downloads
- 509
- License
- MIT License
- Categories
- Productivity, Design, Developer Tools, AI, Project Management
- Tags
- #integration
Jump to
- Accepts PowerShell scripts via string input
- Executes scripts securely in an MCP Server environment
- Returns execution results in real-time
Setting up with Highlight
This MCP is not yet compatible with Highlight’s one-click setup. However, you can still use it with Highlight by following these steps:
- Download and install Highlight from highlightai.com/download
- Navigate to the plugins tab and select "Add Custom Plugin"
-
Configure the plugin with the settings below
Plugin Name
PowerShell ExecCommand (node, npx, python, etc.)pyArguments-
Argument 1
drive:/yourpath/server.py
Please refer to the README for specific instructions on how to obtain API keys or other required environment variables.
-
Argument 1
- Enable "Start Automatically" if you want the plugin to start when Highlight launches
From the repository
Clone the repository and configure the server in VSCode Insiders by editing .vscode/mcp.json with the command py and args pointing to the server.py path. Then enable Agent mode in Copilot Edits and refresh the available tools.
Claude Desktop / Cursor
Paste into your MCP client config file to install this server.
{
"mcpServers": {
"powershell exec": {
"env": {},
"args": [
"drive:/yourpath/server.py"
],
"command": "py"
}
}
}
Linux
{
"env": [],
"args": [
"drive:/yourpath/server.py"
],
"command": "py"
}
Macos
{
"env": [],
"args": [
"drive:/yourpath/server.py"
],
"command": "py"
}
Windows
{
"env": [],
"args": [
"drive:/yourpath/server.py"
],
"command": "py"
}
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-timeInstallation
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:
<a href="https://youtu.be/XmYaCJ0bNsE">
</a>
Usage
Integration with GitHub Copilot in VSCode Insiders
To use this MCP server with GitHub Copilot in VSCode Insiders, follow these steps:
1. Install VSCode Insiders
- Download and install the latest version of VSCode Insiders
1. Install GitHub Copilot Extension
- Open VSCode Insiders
- Go to the Extensions marketplace
- Search for and install "GitHub Copilot"
3. 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.py file.
1. 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
Sign in to leave a review
Use Google, GitHub, or an email account so ratings stay tied to real people.
No reviews posted yet.





