Security Warning: This module provides complete PowerShell access to your system. Malicious use could result in severe damage. Use responsibly and only in trusted environments.
The universal MCP serverβone installation gives AI access to 10,000+ PowerShell modules and any CLI tool.
PowerShell.MCP connects AI assistants to the entire PowerShell ecosystem through a single MCP server. You and AI collaborate in the same PowerShell consoleβevery command is visible, auditable, and saved to history.
A universal gateway to the PowerShell ecosystem.
PowerShell.MCP takes a different approach from service-specific MCP servers. Rather than providing curated tools for individual services, it gives AI assistants direct access to PowerShellβletting them use the same modules and CLI tools that professionals use every day.
This means:
- One MCP server replaces many β no need for separate servers for each service
- Immediate access to 10,000+ modules on PowerShell Gallery without waiting for dedicated MCP servers
- Cross-service workflows combining multiple services in a single pipeline
- API exploration β prototype and verify API behavior with immediate feedback before writing production code
- Self-evolving capabilities β AI writes PowerShell scripts that both AI and users can execute, continuously extending what's possible
- Industry-standard skills β commands you learn transfer directly to your own work
Examples: PowerShell pipeline processing
"Show me bug issues from the PowerShell repo with their authors"
gh issue list --repo PowerShell/PowerShell --json title,author,labels |
ConvertFrom-Json |
Where-Object { $_.labels.name -contains "Issue-Bug" } |
Select-Object title, @{N='by';E={$_.author.login}}"List my running Azure VMs with their sizes"
Get-AzVM -Status | Where-Object PowerState -eq "VM running" |
Select-Object Name, @{N='Size';E={$_.HardwareProfile.VmSize}}, Location"Check if GitHub's API returns rate limit info"
Invoke-RestMethod https://api.github.com/rate_limit |
Select-Object -ExpandProperty rate"Get the current user's Windows username via Win32 API"
Add-Type -MemberDefinition '[DllImport("advapi32.dll")] public static extern bool GetUserName(System.Text.StringBuilder sb, ref int len);' -Name Win32 -Namespace API
$sb = [System.Text.StringBuilder]::new(256); $len = 256
[API.Win32]::GetUserName($sb, [ref]$len); $sb.ToString()PowerShell.MCP complements your existing MCP setup by providing a flexible, general-purpose foundation.
π₯οΈ Multi-Client Architecture
- Each client instance gets its own exclusive consoleβrun multiple Claude Code sessions in parallel
- Safe parallel operation with no resource conflicts
- Unique window titles (e.g., "#12345 Taxi") for easy identification
Get-MCPOwnercmdlet shows which client owns the current console
π€ Shared Console Experience
- You and AI collaborate in the same PowerShell session with full transparency
- Every command AI executes appears in your console in real-time
- You can respond to interactive prompts directly in the console
- Commands are saved to historyβlearn by watching AI work
π Persistent Session State
- Authenticate once, stay authenticated: Azure, AWS, Microsoft 365, and more
- Modules, variables, and functions persist across commands
- No re-initialization overhead
π Universal Access
- PowerShell Gallery: 10,000+ modules including Az, AWS.Tools, Microsoft.Graph
- Any CLI tool: git, docker, kubectl, terraform, gh, az cli, aws cli
- AI learns syntax automatically via
Get-Help
π Pipeline Composability
- Describe what you want in natural languageβAI constructs the optimal pipeline
- "Top 5 largest logs" β
Get-ChildItem *.log | Sort-Object Length -Descending | Select-Object -First 5 - Chain any commands across any services
β‘ Instant Execution
- Commands execute immediately in an existing console
- No process startup overhead per command
- Real-time streaming output
π Enterprise-Ready Security
- Local-only named pipe communicationβno network exposure
- Every command visible and auditable
- Integrates with existing security policies
Five tools provide maximum flexibility with minimum complexity:
| Tool | Purpose |
|---|---|
start_powershell_console |
Launch a persistent console for the MCP client |
get_current_location |
Get current directory and available drives |
invoke_expression |
Execute any PowerShell command or CLI tool |
wait_for_completion |
Wait for long-running commands to complete |
generate_agent_id |
Generate a unique agent ID for sub-agent console isolation |
All platforms require:
- PowerShell 7.5+ (installation guide)
- Claude Desktop, Claude Code, or any MCP client
| Platform | OS Requirements |
|---|---|
| Windows | Windows 10/11 or Windows Server 2016+ |
| Linux | Ubuntu 22.04+, Debian 11+, RHEL 8+, or distributions with GUI desktop |
| macOS | macOS 12 (Monterey)+, Intel or Apple Silicon |
Windows Setup
Press Win + R, type pwsh, press Enter
Install-Module PowerShell.MCPFor Claude Code:
Get-MCPProxyPath
# Example: C:\Users\YourName\Documents\PowerShell\Modules\PowerShell.MCP\1.6.0\bin\win-x64\PowerShell.MCP.Proxy.execlaude mcp add PowerShell -- "C:\path\to\PowerShell.MCP.Proxy.exe"For Claude Desktop β Add to %APPDATA%\Claude\claude_desktop_config.json:
Get-MCPProxyPath -Escape # Returns JSON-escaped path (e.g., C:\\Users\\...\\PowerShell.MCP.Proxy.exe){
"mcpServers": {
"PowerShell": {
"command": "C:\\Users\\YourName\\Documents\\PowerShell\\Modules\\PowerShell.MCP\\1.6.0\\bin\\win-x64\\PowerShell.MCP.Proxy.exe"
}
}
}Linux Setup
# Ubuntu/Debian
sudo apt-get update
sudo apt-get install -y wget apt-transport-https software-properties-common
source /etc/os-release
wget -q https://packages.microsoft.com/config/ubuntu/$VERSION_ID/packages-microsoft-prod.deb
sudo dpkg -i packages-microsoft-prod.deb
sudo apt-get update
sudo apt-get install -y powershellpwsh -Command "Install-Module PowerShell.MCP -Scope CurrentUser"pwsh -Command "Import-Module PowerShell.MCP; Get-MCPProxyPath"
# Example: /home/username/.local/share/powershell/Modules/PowerShell.MCP/1.6.0/bin/linux-x64/PowerShell.MCP.Proxy
chmod +x /path/to/PowerShell.MCP.ProxyFor Claude Code:
claude mcp add PowerShell -- /path/to/PowerShell.MCP.ProxyFor Claude Desktop β Edit ~/.config/Claude/claude_desktop_config.json
macOS Setup
brew install powershell/tap/powershellpwsh -Command "Install-Module PowerShell.MCP -Scope CurrentUser"pwsh -Command "Import-Module PowerShell.MCP; Get-MCPProxyPath"
# Apple Silicon: ~/.local/share/powershell/Modules/PowerShell.MCP/1.6.0/bin/osx-arm64/PowerShell.MCP.Proxy
# Intel Mac: ~/.local/share/powershell/Modules/PowerShell.MCP/1.6.0/bin/osx-x64/PowerShell.MCP.Proxy
chmod +x /path/to/PowerShell.MCP.ProxyFor Claude Code:
claude mcp add PowerShell -- /path/to/PowerShell.MCP.ProxyFor Claude Desktop β Add to ~/Library/Application Support/Claude/claude_desktop_config.json:
{
"mcpServers": {
"PowerShell": {
"command": "/Users/YourName/.local/share/powershell/Modules/PowerShell.MCP/1.6.0/bin/osx-arm64/PowerShell.MCP.Proxy"
}
}
}Experience PowerShell.MCP's capabilities:
- "Show what PowerShell.MCP can do in a colorful, dynamic, and fun demo"
- "Try out different styles of notifications using the BurntToast module"
- "Automate Notepad: type text and smoothly move the window in a circle"
- "How does it feel now that you have a tool like PowerShell.MCP?"
After trying these demos, explore the built-in prompts below or ask AI to explain any command.
PowerShell.MCP includes 7 specialized prompts accessible from your MCP client's prompts menu. Each prompt is designed for specific tasks and guides AI to provide optimal results.
Best for: Complex, multi-step tasks you'll perform repeatedly
Work together as a powerful workflow system with automatic file management:
- Create Work Procedure - AI analyzes the task and generates
work_procedure.mdas the reusable procedure andwork_progress.txtas the execution plan. - Execute Work Procedure - AI follows and refines
work_procedure.mdduring execution, and tracks and records outcomes inwork_progress.txt.
Key benefits: self-refining procedures, resumable workflows, automatic progress tracking, consistent results
Example: "Write Get-Help markdown for multiple cmdlets through execution and verification"
Best for: Deep analysis of files, folders, or datasets
Generates comprehensive reports with insights and recommendations. Combine with HTML Generation Guidelines for AI for visual reports with charts.
Examples: "Analyze my project's log files" β’ "Create a report on this CSV dataset" β’ "Analyze this HAR file"
Best for: Professional HTML reports with charts and styling
Companion prompt that ensures AI generates high-quality HTML with Chart.js visualization, responsive design, and proper styling. Works with any prompt or task that needs HTML output.
Examples: Analyze Content + this = visual reports β’ Your custom prompt + this = professional HTML β’ Any data task + this = interactive output
Best for: Learning programming languages and command-line tools at any level
Provides personalized learning experiences with clear explanations, practical examples, and hands-on exercises. Specify your learning goals directly without worrying about experience levels.
Examples: "Learn Python basics for data analysis" β’ "Learn Git commands for version control" β’ "Learn PowerShell scripting"
Best for: Improving listening skills in foreign languages
Creates dictation exercises with automatic checking.
Examples: "English dictation at beginner level" β’ "Japanese conversation at the zoo"
Best for: Visualizing geographic data or locations
Generates interactive HTML maps with markers, descriptions, and optional 3D display using PowerShell.Map module.
Examples: "Show major Roman battles in chronological order" β’ "Create a map of hot springs in Japan"
- PSReadLine module is automatically loaded for enhanced console experience
- Full color support for PowerShell output
- Requires a GUI desktop environment (GNOME, KDE, XFCE, etc.)
- Supported terminal emulators: gnome-terminal, konsole, xfce4-terminal, xterm, lxterminal, mate-terminal, terminator, tilix, alacritty, kitty
- PSReadLine is automatically removed (not supported on Linux)
- Works with Terminal.app (default)
- PSReadLine is automatically removed (not supported on macOS)
- Both Apple Silicon (M1/M2/M3/M4) and Intel Macs are supported
- AI Command Cancellation: Commands executed by AI cannot be cancelled with Ctrl+C. Close the console to stop.
- User Command Privacy: Commands you execute are not visible to AI assistants.
- Verbose/Debug Streams: Not captured. Share via clipboard if needed.
- CLI stderr: Not captured by default. Use
$result = & command.exe 2>&1to capture. - External Command Colors: Color output from some CLI tools may not be preserved (git colors are supported).
This software is provided "AS IS" without warranty of any kind, either expressed or implied. The author assumes no responsibility for any damages arising from the use of this software.
MIT License - see LICENSE for details.
Yoshifumi Tsuda
For enterprise use, ensure compliance with your organization's security policies.








