MCP PowerShell Exec Server
MCP Server for executing PowerShell scripts
Overview
MCP PowerShell Exec Server is a lightweight server designed to accept and execute PowerShell scripts, enabling AI assistants to interact with PowerShell seamlessly.
To use the server, clone the repository, set it up, and integrate it with GitHub Copilot in VSCode Insiders by configuring the server settings in the .vscode/mcp.json file.
- Accepts PowerShell scripts as string inputs. - Executes scripts securely in an MCP Server environment. - Returns execution results in real-time.
- Automating system administration tasks using PowerShell scripts.
- Enhancing AI assistants with the ability to execute PowerShell commands.
- Integrating with development environments for real-time script execution.
Add to your AI client
Use these steps to connect MCP PowerShell Exec Server in Cursor, Claude, VS Code, and other MCP-compatible apps. The same JSON appears in the Use with menu above for one-click copy.
Cursor
Add this to your .cursor/mcp.json file in your project root, then restart Cursor.
.cursor/mcp.json
{
"mcpServers": {
"mcp-powershell-exec-dfinke": {
"command": "npx",
"args": [
"-y",
"@modelcontextprotocol/server-mcp-powershell-exec-dfinke"
]
}
}
}Claude Desktop
Add this server entry to the mcpServers object in your Claude Desktop config, then restart the app.
~/Library/Application Support/Claude/claude_desktop_config.json (macOS) or %APPDATA%\Claude\claude_desktop_config.json (Windows)
{
"mcpServers": {
"mcp-powershell-exec-dfinke": {
"command": "npx",
"args": [
"-y",
"@modelcontextprotocol/server-mcp-powershell-exec-dfinke"
]
}
}
}Claude Code
Add this to your project's .mcp.json file. Claude Code will detect it automatically.
.mcp.json (project root)
{
"mcpServers": {
"mcp-powershell-exec-dfinke": {
"command": "npx",
"args": [
"-y",
"@modelcontextprotocol/server-mcp-powershell-exec-dfinke"
]
}
}
}VS Code (Copilot)
Add this to your .vscode/mcp.json file. Requires the GitHub Copilot extension with MCP support enabled.
.vscode/mcp.json
{
"servers": {
"mcp-powershell-exec-dfinke": {
"type": "stdio",
"command": "npx",
"args": [
"-y",
"@modelcontextprotocol/server-mcp-powershell-exec-dfinke"
]
}
}
}Windsurf
Add this to your Windsurf MCP config file, then restart Windsurf.
~/.codeium/windsurf/mcp_config.json
{
"mcpServers": {
"mcp-powershell-exec-dfinke": {
"command": "npx",
"args": [
"-y",
"@modelcontextprotocol/server-mcp-powershell-exec-dfinke"
]
}
}
}Cline
Open Cline settings, navigate to MCP Servers, and add this server configuration.
Cline MCP Settings (via UI)
{
"mcpServers": {
"mcp-powershell-exec-dfinke": {
"command": "npx",
"args": [
"-y",
"@modelcontextprotocol/server-mcp-powershell-exec-dfinke"
]
}
}
}FAQ
What are the system requirements?
Python 3.10 or higher and PowerShell 5.1 are required for optimal performance.
Is there a license for this project?
Yes, it is licensed under the MIT License.