MCP PowerShell Exec Server

A lightweight MCP server that executes PowerShell scripts delivered as strings and returns real-time results.
  • python

56

GitHub Stars

python

Language

6 months ago

First Indexed

2 months ago

Catalog Refreshed

Documentation & install

Readme and setup notes from the catalogue, plus a client-ready config you can copy for your MCP host.

Installation

Add the following to your MCP client configuration file.

Configuration

View docs
{
  "mcpServers": {
    "dfinke-mcp-powershell-exec": {
      "command": "py",
      "args": [
        "drive:/yourpath/server.py"
      ]
    }
  }
}

MCP PowerShell Exec Server is a lightweight MCP server that accepts PowerShell scripts as strings, executes them, and returns the output. It enables AI assistants and other clients to run PowerShell code inside a controlled MCP environment while receiving results in real time.

How to use

You can send PowerShell scripts as plain strings to the MCP server and receive the execution results immediately. This setup is useful when your client or automation needs to dynamically run PowerShell commands and capture their outputs, errors, and side effects for further processing.

How to install

Prerequisites: you need Python 3.10 or higher and PowerShell 5.1 or higher.

Clone the project repository and navigate into it to set up and run the server. Run these commands exactly as shown:

git clone https://github.com/yourusername/mcp-powershell-exec.git
cd mcp-powershell-exec

Start the MCP PowerShell Exec Server (example path)

py drive:/yourpath/server.py

Configuration and notes

The server is configured to run as a local process using a standard Python interpreter. The example configuration shows how a client can start the server as a stdio MCP backend. Use the placeholder path drive:/yourpath/server.py to point to your actual server script.

Troubleshooting

If the server fails to start, verify that Python 3.10+ is installed and that drive:/yourpath/server.py is accessible. Ensure PowerShell 5.1 or newer is available on the host if you are testing PowerShell execution locally. Check for permissions issues that might block the Python process from reading the server script.

Built by
VeilStrat
AI signals for GTM teams
© 2026 VeilStrat. All rights reserved.All systems operational