Enables programmatic execution of PowerShell commands from Python applications via a JSON-RPC interface, allowing automation of Windows tasks.
PowerShell MCP Server
A Model Context Protocol (MCP) server for automating Windows PowerShell tasks using Python. This server enables programmatic execution of PowerShell scripts, clipboard operations, and terminal output capture via a JSON-RPC interface.
Features
- Execute PowerShell Scripts: Paste and run PowerShell scripts in Windows Terminal using the clipboard.
- Clipboard Access: Retrieve the current clipboard content.
- Terminal Screenshot: Capture the output of the PowerShell terminal as an image.
Requirements
- Windows OS ( for windows only)
- Python 3.8+
- pyautogui
- pygetwindow
- pyperclip
- psutil
- Pillow
Install dependencies:
Usage
Start the server:
The server communicates via JSON-RPC over stdin/stdout.
Available Tools
execute_pwsh_script
: Execute a PowerShell script by pasting it into the terminal.get_clipboard
: Get the current clipboard content.capture_pwsh_response
: Capture a screenshot of the PowerShell terminal output.
Example Request
Basic configuration on claude desktop
- Open claude desktop
- Go to file -> settings -> developer -> edit config
Project Structure
License
MIT License
This server cannot be installed
local-only server
The server can only run on the client's local machine because it depends on local resources.
A server that enables programmatic execution of PowerShell scripts, clipboard operations, and terminal output capture via a JSON-RPC interface.
Related MCP Servers
- AsecurityAlicenseAqualityA secure shell command execution server implementing the Model Context Protocol (MCP). This server allows remote execution of whitelisted shell commands with support for stdin input.Last updated -174PythonMIT License
- AsecurityFlicenseAqualityA CLI command execution server that enables running shell commands with structured output, providing detailed execution results including stdout, stderr, exit code, and execution duration.Last updated -216TypeScript
- -securityFlicense-qualityA cross-platform shell command execution server that supports Windows, macOS, and Linux environments with PowerShell, CMD, GitBash, and Bash shells, optimized for Japanese language environments.Last updated -24JavaScript
- -securityAlicense-qualityA lightweight FastAPI server that allows remote execution of shell commands on Windows, with real-time output streaming and security features like API key authentication and rate limiting.Last updated -PythonMIT License