|
1 | 1 | # PowerShell.MCP |
2 | 2 |
|
3 | 3 | [](https://github.com/PowerShell/PowerShell) |
| 4 | +[](#prerequisites) |
4 | 5 | [](https://www.powershellgallery.com/packages/PowerShell.MCP) |
5 | 6 | [](https://www.powershellgallery.com/packages/PowerShell.MCP) |
6 | 7 | [](https://opensource.org/licenses/MIT) |
@@ -95,43 +96,136 @@ This minimalist architecture provides maximum flexibility while maintaining simp |
95 | 96 | ## Quick Start |
96 | 97 |
|
97 | 98 | ### Prerequisites |
98 | | -- Windows 10/11 or Windows Server 2016+ |
99 | | -- Claude Desktop ([download](https://claude.ai/download)) or any MCP clients |
100 | | - - **Note: Claude Desktop is strongly recommended** as other clients may not deliver optimal performance |
101 | | -- PowerShell 7.2 or higher ([installation guide](https://learn.microsoft.com/powershell/scripting/install/installing-powershell-on-windows?view=powershell-7.5)) |
102 | | -- PSReadLine 2.3.4 or higher ([auto-installed](https://www.powershellgallery.com/packages/PSReadLine)) |
103 | 99 |
|
104 | | -### 1. Open PowerShell 7 |
105 | | -- Press `Win + R`, type `pwsh`, press `Enter` |
106 | | -- Verify PowerShell 7.x is running (not Windows PowerShell 5.x) |
| 100 | +| Platform | Requirements | |
| 101 | +|----------|-------------| |
| 102 | +| **Windows** | Windows 10/11 or Windows Server 2016+ | |
| 103 | +| **Linux** | Ubuntu 22.04+, Debian 11+, RHEL 8+, or other distributions with GUI desktop | |
| 104 | +| **macOS** | macOS 12 (Monterey) or later, Intel or Apple Silicon | |
107 | 105 |
|
108 | | -### 2. Install PowerShell.MCP |
| 106 | +**All platforms require:** |
| 107 | +- PowerShell 7.2 or higher ([installation guide](https://learn.microsoft.com/powershell/scripting/install/installing-powershell)) |
| 108 | +- Claude Desktop ([download](https://claude.ai/download)), Claude Code, or any MCP client |
| 109 | + |
| 110 | +> **Note:** Claude Desktop is strongly recommended as other clients may not deliver optimal performance. |
| 111 | +
|
| 112 | +--- |
| 113 | + |
| 114 | +### Windows Setup |
| 115 | + |
| 116 | +#### 1. Open PowerShell 7 |
| 117 | +Press `Win + R`, type `pwsh`, press `Enter` |
| 118 | + |
| 119 | +#### 2. Install PowerShell.MCP |
109 | 120 | ```powershell |
110 | 121 | Install-Module PowerShell.MCP |
111 | 122 | Import-Module PowerShell.MCP |
112 | 123 | ``` |
113 | 124 |
|
114 | | -### 3. Get your module path |
| 125 | +#### 3. Get your Proxy path |
115 | 126 | ```powershell |
116 | | -(Get-Module PowerShell.MCP).ModuleBase |
117 | | -# Example output: C:\Users\YourName\Documents\PowerShell\Modules\PowerShell.MCP\1.3.9 |
| 127 | +Get-MCPProxyPath |
| 128 | +# Example: C:\Users\YourName\Documents\PowerShell\Modules\PowerShell.MCP\1.4.0\bin\win-x64\PowerShell.MCP.Proxy.exe |
118 | 129 | ``` |
119 | 130 |
|
120 | | -### 4. Configure Claude Desktop |
121 | | -Add to your Claude Desktop configuration: |
| 131 | +#### 4. Configure Claude Desktop |
| 132 | +Add to `%APPDATA%\Claude\claude_desktop_config.json`: |
122 | 133 | ```json |
123 | 134 | { |
124 | 135 | "mcpServers": { |
125 | 136 | "PowerShell": { |
126 | | - "command": "C:\\Users\\YourName\\Documents\\PowerShell\\Modules\\PowerShell.MCP\\1.3.9\\bin\\PowerShell.MCP.Proxy.exe" |
| 137 | + "command": "C:\\Users\\YourName\\Documents\\PowerShell\\Modules\\PowerShell.MCP\\1.4.0\\bin\\win-x64\\PowerShell.MCP.Proxy.exe" |
127 | 138 | } |
128 | 139 | } |
129 | 140 | } |
130 | 141 | ``` |
131 | 142 |
|
132 | | -### 5. Restart Claude Desktop and test |
133 | | -- Restart Claude Desktop to activate the integration |
134 | | -- See the **First-Time Demo** section below for your first demo! |
| 143 | +#### 5. Restart Claude Desktop |
| 144 | + |
| 145 | +--- |
| 146 | + |
| 147 | +### Linux Setup |
| 148 | + |
| 149 | +#### 1. Install PowerShell 7 |
| 150 | +```bash |
| 151 | +# Ubuntu/Debian |
| 152 | +sudo apt-get update |
| 153 | +sudo apt-get install -y wget apt-transport-https software-properties-common |
| 154 | +source /etc/os-release |
| 155 | +wget -q https://packages.microsoft.com/config/ubuntu/$VERSION_ID/packages-microsoft-prod.deb |
| 156 | +sudo dpkg -i packages-microsoft-prod.deb |
| 157 | +sudo apt-get update |
| 158 | +sudo apt-get install -y powershell |
| 159 | +``` |
| 160 | + |
| 161 | +#### 2. Install PowerShell.MCP |
| 162 | +```bash |
| 163 | +pwsh -Command "Install-Module PowerShell.MCP -Scope CurrentUser" |
| 164 | +``` |
| 165 | + |
| 166 | +#### 3. Get your Proxy path |
| 167 | +```bash |
| 168 | +pwsh -Command "Import-Module PowerShell.MCP; Get-MCPProxyPath" |
| 169 | +# Example: /home/username/.local/share/powershell/Modules/PowerShell.MCP/1.4.0/bin/linux-x64/PowerShell.MCP.Proxy |
| 170 | +``` |
| 171 | + |
| 172 | +#### 4. Set execute permission |
| 173 | +```bash |
| 174 | +chmod +x /path/to/PowerShell.MCP.Proxy |
| 175 | +``` |
| 176 | + |
| 177 | +#### 5. Configure Claude Code |
| 178 | +```bash |
| 179 | +claude mcp add powershell-mcp -- /path/to/PowerShell.MCP.Proxy |
| 180 | +``` |
| 181 | + |
| 182 | +Or edit `~/.claude.json` manually. |
| 183 | + |
| 184 | +--- |
| 185 | + |
| 186 | +### macOS Setup |
| 187 | + |
| 188 | +#### 1. Install PowerShell 7 |
| 189 | +```bash |
| 190 | +# Using Homebrew |
| 191 | +brew install powershell/tap/powershell |
| 192 | + |
| 193 | +# Or download the official pkg installer from: |
| 194 | +# https://learn.microsoft.com/powershell/scripting/install/installing-powershell-on-macos |
| 195 | +``` |
| 196 | + |
| 197 | +#### 2. Install PowerShell.MCP |
| 198 | +```bash |
| 199 | +pwsh -Command "Install-Module PowerShell.MCP -Scope CurrentUser" |
| 200 | +``` |
| 201 | + |
| 202 | +#### 3. Get your Proxy path |
| 203 | +```bash |
| 204 | +pwsh -Command "Import-Module PowerShell.MCP; Get-MCPProxyPath" |
| 205 | +# Apple Silicon: ~/.local/share/powershell/Modules/PowerShell.MCP/1.4.0/bin/osx-arm64/PowerShell.MCP.Proxy |
| 206 | +# Intel Mac: ~/.local/share/powershell/Modules/PowerShell.MCP/1.4.0/bin/osx-x64/PowerShell.MCP.Proxy |
| 207 | +``` |
| 208 | + |
| 209 | +#### 4. Set execute permission |
| 210 | +```bash |
| 211 | +chmod +x /path/to/PowerShell.MCP.Proxy |
| 212 | +``` |
| 213 | + |
| 214 | +#### 5. Configure Claude Desktop |
| 215 | +Add to `~/Library/Application Support/Claude/claude_desktop_config.json`: |
| 216 | +```json |
| 217 | +{ |
| 218 | + "mcpServers": { |
| 219 | + "PowerShell": { |
| 220 | + "command": "/Users/YourName/.local/share/powershell/Modules/PowerShell.MCP/1.4.0/bin/osx-arm64/PowerShell.MCP.Proxy" |
| 221 | + } |
| 222 | + } |
| 223 | +} |
| 224 | +``` |
| 225 | + |
| 226 | +#### 6. Restart Claude Desktop |
| 227 | + |
| 228 | +--- |
135 | 229 |
|
136 | 230 | ## First-Time Demo |
137 | 231 | 🎨 Experience PowerShell.MCP's capabilities with these engaging demonstrations: |
@@ -286,6 +380,24 @@ Generates interactive HTML maps with markers, descriptions, and optional 3D disp |
286 | 380 |
|
287 | 381 | --- |
288 | 382 |
|
| 383 | +## Platform Notes |
| 384 | + |
| 385 | +### Windows |
| 386 | +- PSReadLine module is automatically loaded for enhanced console experience |
| 387 | +- Full color support for PowerShell output |
| 388 | + |
| 389 | +### Linux |
| 390 | +- Requires a GUI desktop environment (GNOME, KDE, XFCE, etc.) |
| 391 | +- Supported terminal emulators: gnome-terminal, konsole, xfce4-terminal, xterm, lxterminal, mate-terminal, terminator, tilix, alacritty, kitty |
| 392 | +- PSReadLine is automatically removed (not supported on Linux) |
| 393 | + |
| 394 | +### macOS |
| 395 | +- Works with Terminal.app (default) |
| 396 | +- PSReadLine is automatically removed (not supported on macOS) |
| 397 | +- Both Apple Silicon (M1/M2/M3/M4) and Intel Macs are supported |
| 398 | + |
| 399 | +--- |
| 400 | + |
289 | 401 | ## Limitations |
290 | 402 | - **AI Command Cancellation**: Commands executed by AI assistants cannot be cancelled with Ctrl+C. To cancel AI-executed commands, close the PowerShell console |
291 | 403 | - **User Command Privacy**: Commands executed by users are not visible to AI assistants |
|
0 commit comments