PowerShell MCP Server

by gunjanjp

466 downloads Not rated yet
GitHub

About

A Model Context Protocol (MCP) server that enables Claude and other LLM applications to execute PowerShell commands, scripts, and perform system operations on Windows systems.

Explore

- 🔧 PowerShell Execution: Execute commands, run scripts, and create new PowerShell files
- 🖥️ System Monitoring: Get system info, monitor processes, check services and disk space
- 📁 File Operations: List directories, get file info, and search files with pattern matching
- ⚙️ Simple Setup: One-command installation with automatic Claude Desktop configuration
- 🛡️ Secure: Safe execution with proper error handling and session management

- Safe Execution: Uses -ExecutionPolicy Bypass and -NoProfile for security
- Input Validation: All inputs validated with Zod schemas
- Session Management: PowerShell sessions properly disposed after use
- Error Handling: Comprehensive error handling prevents system issues
- Logging: All operations logged to stderr (not interfering with JSON-RPC)

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:

  1. Download and install Highlight from highlightai.com/download
  2. Navigate to the plugins tab and select "Add Custom Plugin"
  3. Configure the plugin with the settings below
    Plugin Name PowerShell MCP Server
    Command (node, npx, python, etc.)

    Please refer to the README for specific instructions on how to obtain API keys or other required environment variables.

  4. Enable "Start Automatically" if you want the plugin to start when Highlight launches

From the repository

📋 Prerequisites

- Windows 10/11 or Windows Server 2016+
- Node.js 18.0.0 or higher
- PowerShell 5.1+ or PowerShell Core 7+
- Claude Desktop application

Option 1: Safe Automated Setup (Recommended)

```bash

execute-powershell

Execute PowerShell commands with optional working directory

execute-powershell-script

Run PowerShell script files with parameters

create-powershell-script

Create new PowerShell scripts

get-system-info

Comprehensive Windows system information

get-process-list

Running processes with CPU/memory usage (sortable/filterable)

get-service-status

Windows services status with filtering

check-disk-space

Disk space usage for all or specific drives

list-directory

Enhanced directory listing with filtering

get-file-info

Detailed file and directory metadata

search-files

Recursive file search with pattern matching

- execute-powershell - Execute PowerShell commands with optional working directory
- execute-powershell-script - Run PowerShell script files with parameters
- create-powershell-script - Create new PowerShell scripts

- get-system-info - Comprehensive Windows system information
- get-process-list - Running processes with CPU/memory usage (sortable/filterable)
- get-service-status - Windows services status with filtering
- check-disk-space - Disk space usage for all or specific drives

- list-directory - Enhanced directory listing with filtering
- get-file-info - Detailed file and directory metadata
- search-files - Recursive file search with pattern matching

Claude Desktop / Cursor

Paste into your MCP client config file to install this server.

{
    "mcpServers": {
        "powershell mcp server": {
            "powershell-mcp": {
                "command": "node",
                "args": [
                    "recovery.js",
                    "status",
                    "#",
                    "Check",
                    "current",
                    "state"
                ]
            }
        }
    }
}

McpServers

{
    "powershell-mcp": {
        "command": "node",
        "args": [
            "recovery.js",
            "status",
            "#",
            "Check",
            "current",
            "state"
        ]
    }
}

A comprehensive Model Context Protocol (MCP) server that enables Claude and other LLM applications to execute PowerShell commands, scripts, and perform system operations on Windows systems.

🌟 Key Features

- 🔧 PowerShell Execution: Execute commands, run scripts, and create new PowerShell files
- 🖥️ System Monitoring: Get system info, monitor processes, check services and disk space
- 📁 File Operations: List directories, get file info, and search files with pattern matching
- ⚙️ Simple Setup: One-command installation with automatic Claude Desktop configuration
- 🛡️ Secure: Safe execution with proper error handling and session management

🛠️ Available Tools

PowerShell Tools

- execute-powershell - Execute PowerShell commands with optional working directory - execute-powershell-script - Run PowerShell script files with parameters - create-powershell-script - Create new PowerShell scripts

System Tools

- get-system-info - Comprehensive Windows system information - get-process-list - Running processes with CPU/memory usage (sortable/filterable) - get-service-status - Windows services status with filtering - check-disk-space - Disk space usage for all or specific drives

File Tools

- list-directory - Enhanced directory listing with filtering - get-file-info - Detailed file and directory metadata - search-files - Recursive file search with pattern matching

📋 Prerequisites

- Windows 10/11 or Windows Server 2016+
- Node.js 18.0.0 or higher
- PowerShell 5.1+ or PowerShell Core 7+
- Claude Desktop application

🚀 Quick Setup

Option 1: Safe Automated Setup (Recommended)

```bash
No reviews yet — be the first

Sign in to leave a review

Use Google, GitHub, or an email account so ratings stay tied to real people.

Email sign in

No reviews posted yet.