PowerShell MCP Server

PowerShell MCP Server

powershell-mcp•bygunjanjp

A Model Context Protocol server that lets LLM applications execute PowerShell commands, run scripts, and perform Windows system and file operations.

License: MIT License•Runtime: Awaiting documentation review•Category: developer tools

WHAT IT DOES

  • •Executes PowerShell commands with an optional working directory, runs existing script files with parameters, and creates new PowerShell scripts.
  • •Provides Windows system monitoring tools for system information, process lists with CPU and memory usage, service status, and disk space.
  • •Offers file tools for listing directories, retrieving file and directory metadata, and recursively searching files with pattern matching.
  • •Validates inputs with Zod schemas and disposes PowerShell sessions after use to manage execution safely.

BEST FOR

  • •Asking an LLM assistant to run PowerShell tasks such as retrieving the current date or creating a backup script.
  • •Inspecting a Windows machine's processes by CPU usage and its disk space usage through an assistant.
  • •Locating files on disk, such as searching a user directory for all .txt files or listing a Downloads folder.

ABOUT POWERSHELL-MCP

PowerShell MCP Server is cataloged as an MCP server attributed to gunjanjp. A Model Context Protocol server that lets LLM applications execute PowerShell commands, run scripts, and perform Windows system and file operations. It is categorized under developer tools. See the capability inspector for recorded interfaces and their independent review status; consult upstream documentation for the current interface.

HOW TO INSTALL

Installation configuration is not reviewed. No executable setup is offered for this entry; inspect the source repository before proceeding.

LICENSE

Catalog license label: MIT License. Check the source repository's current license and terms before using, modifying or distributing this software.

Capability inspector

Capability definitions are not reviewed. Unreviewed imports are not exposed as trusted interfaces.

Tools (0)

No reviewed records to display. This does not establish that upstream lacks this capability.

Resources (0)

No reviewed records to display. This does not establish that upstream lacks this capability.

Prompts (0)

No reviewed records to display. This does not establish that upstream lacks this capability.

NEWSLETTER - COMING LATER

Newsletter subscriptions are not open yet

Email delivery is not connected. This page does not collect email addresses or create subscriptions.

Browse the registry for current listings instead.

Community Reviews

Coming later

Reviews for PowerShell MCP Server are not available yet

Review publishing and storage are not connected. This page does not collect or publish ratings or comments, including after sign-in.

FREQUENTLY ASKED QUESTIONS

What are the prerequisites for running this server?

It requires Windows 10/11 or Windows Server 2016+, Node.js 18.0.0 or higher, PowerShell 5.1+ or PowerShell Core 7+, and the Claude Desktop application.

How does the server handle configuration changes to Claude Desktop?

Setup creates backups before configuration changes and provides recovery commands to check status, scan for backups, restore, or merge configurations.

Upstream README

View this exact version on GitHub

README.md · 652f7fb591e2 · Fetched 2026-11-13 11:14:15 UTC

Original upstream text, without AI rewriting. Scripts, forms and unsafe links are filtered for safety.

Showing the last retrieved documentation snapshot; check the source for current changes.

PowerShell MCP Server

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

# Clone and setup with configuration management
git clone https://github.com/gunjanjp/powershell-mcp.git
cd powershell-mcp
complete-setup.bat

Option 2: Configuration Recovery (If you had existing settings)

# If previous setup overwrote your existing configuration
node recovery.js status      # Check current state
node recovery.js scan        # Find backup configurations
node recovery.js restore 1   # Restore from backup
# OR
node recovery.js merge 1     # Merge backup with current config

Option 3: Manual Setup

# Clone the repository
git clone https://github.com/gunjanjp/powershell-mcp.git
cd powershell-mcp

# Install dependencies
npm install

# Safely add to existing configuration
node recovery.js add-powershell

# Restart Claude Desktop

📖 Usage Examples

Ask Claude:

  • "Execute PowerShell: Get-Date"
  • "Check my system information"
  • "Show me the top 10 processes by CPU usage"
  • "What's my disk space usage?"
  • "List files in my Downloads folder"
  • "Search for all .txt files in C:\Users"
  • "Create a PowerShell script to backup my Documents folder"

🔧 Commands

Server Commands

# Start the server
npm start

# Test components
npm test

# Run diagnostics
node diagnose.bat

# Start server directly  
node src/server.js

Configuration Management

# Check configuration status
node recovery.js status

# Find backup configurations
node recovery.js scan

# Safely add PowerShell server
node recovery.js add-powershell

# Restore from backup
node recovery.js restore <number>

# Merge configurations
node recovery.js merge <number>

# Show backup contents
node recovery.js show <number>

Quick Setup Commands

# Complete setup with safety checks
complete-setup.bat

# Test server only
run-test.bat

📁 Project Structure

powershell-mcp/
├── src/
│   ├── server.js           # Main MCP server (with stderr logging fix)
│   ├── tools/              # Tool implementations
│   │   ├── powershell-tools.js
│   │   ├── system-tools.js
│   │   └── file-tools.js
│   └── utils/              # Utility modules
│       └── system-utils.js
├── examples/               # Example PowerShell scripts
├── scripts/               # Setup utilities
├── test/                  # Test files
├── claude_desktop_config.json  # Claude Desktop configuration
├── setup.bat             # Automated setup script
├── diagnose.bat          # Diagnostic tool
├── test-server.js        # Component testing
└── README.md

⚙️ Claude Desktop Configuration

The server uses this configuration (automatically applied by setup):

{
  "mcpServers": {
    "powershell": {
      "command": "node",
      "args": ["D:/claude/claude-powershell-mcp/src/server.js"],
      "env": {}
    }
  }
}

Config location: %APPDATA%\Claude\claude_desktop_config.json

🛡️ Security Features

  • 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)

🐛 Troubleshooting

Server won't start

# Check Node.js version (need 18+)
node --version

# Check dependencies
npm install

# Test components
node test-server.js

Claude Desktop integration issues

# Run setup again
setup.bat

# Check configuration
type "%APPDATA%\Claude\claude_desktop_config.json"

# Restart Claude Desktop completely

PowerShell execution issues

# Test PowerShell
powershell -Command "Get-Date"

# Check execution policy
Get-ExecutionPolicy

# Run diagnostics
node diagnose.bat

🔄 Recent Updates (v1.1.2)

Configuration Management Improvements

  • ✅ Safe Configuration Management - No more overwriting existing configs
  • ✅ Automatic Backups - Creates backups before any configuration changes
  • ✅ Configuration Recovery - Tools to find and restore previous configurations
  • ✅ Merge Capability - Intelligent merging of multiple MCP server configs
  • ✅ Interactive Recovery - Step-by-step configuration recovery process

Previous Fixes (v1.1.1)

  • ✅ Fixed Claude Desktop JSON parsing error - Changed console.log to console.error (stderr)
  • ✅ Cleaned up project structure - Removed redundant server files
  • ✅ Simplified setup - One script setup process
  • ✅ Proper error handling - Enhanced logging and error management

🤝 Contributing

  1. Fork the repository
  2. Create feature branch: git checkout -b feature-name
  3. Make changes and test: npm test
  4. Commit: git commit -am 'Add feature'
  5. Push: git push origin feature-name
  6. Submit pull request

📄 License

MIT License - see LICENSE file for details.


Made with ❤️ for the Claude and PowerShell communities

⚠️ Important: This tool provides direct access to PowerShell commands. Use responsibly and be aware of security implications.

Install configuration

Are you the maintainer?

Claim this server with your GitHub account to request manual ownership verification.

README Embed Badge
Markdown

Link to the catalog listing for PowerShell MCP Server from your README. This badge does not certify ownership, compatibility or security.

[![MCP catalog listing](https://img.shields.io/badge/MCP-awesome--mcp-orange?style=flat-square)](https://awesome-mcp.com/servers/powershell-mcp)

REPOSITORY STATS

GitHub StarsUnavailable
ForksUnavailable

Public repository statistics could not be verified. Check the configured source address; unavailable counts are not zero.

Downloads and pulls

Separate sources, scopes and periods. Never combined or treated as installations, active users or security reviews.

No reviewed package or image identity; download statistics are not listed yet.

Related developer tools MCP Servers

Alternative and complementary servers in the same category

View all in developer tools →
Postbye
postbye-mcp•postbye-team

A directory listing describing a cancellation-letter and mailing-address service. The configured public GitHub repository returned 404 during source verification.

Repository stats unavailable
Developer Tools
Singapore Proxy MCP
singapore-proxy-mcp•Xavierfok

A hosted MCP service for browsing and searching through Singapore mobile-network proxies.

0
Developer Tools

A directory listing describing a Markdown-to-PDF service. The configured public GitHub repository returned 404 during source verification.

Repository stats unavailable
Developer Tools