loading…
Search for a command to run...
loading…
Unofficial Powershell MCP server
Unofficial Powershell MCP server
Unofficial Implementation: This project is an independent open-source software project. It is not affiliated with, endorsed by, sponsored by, or associated with Microsoft Corporation or the PowerShell team.
Trademarks: "PowerShell" and the PowerShell logo are trademarks or registered trademarks of Microsoft Corporation in the United States and/or other countries. All other trademarks cited herein are the property of their respective owners. Use of these names is for descriptive purposes only (nominative fair use) to indicate compatibility.
uvx mcp-server-for-powershellpip install mcp-server-for-powershelluv pip install mcp-server-for-powershellThe server can be configured using the following command-line arguments:
| Argument | Description | Default |
|---|---|---|
--allowed-commands |
List of allowed PowerShell commands. If empty, all are allowed (subject to restrictions). | [] |
--restricted-commands |
List of restricted PowerShell commands. | Safe defaults |
--restricted-directories |
List of restricted directories. | System directories |
--language-mode |
PowerShell Language Mode: 0 (NoLanguage), 1 (ConstrainedLanguage), 2 (RestrictedLanguage), 3 (FullLanguage). |
1 |
--cwd |
Initial working directory. | Current Directory |
We recommend different configurations based on your security needs:
By default, the server runs in ConstrainedLanguage mode with a curated blocklist of dangerous commands and restricted system directories. This provides "good enough" defaults for general use, preventing common dangerous operations while allowing most read-only and safe actions.
uvx mcp-server-for-powershell
For environments requiring stricter controls, use NoLanguage mode (--language-mode 0). Only built-in commands and cmdlets can be executed.
uvx mcp-server-for-powershell --language-mode 0
For the highest security "nuclear" option, explicitly whitelist ONLY the commands you need (e.g., allow get-items only). This blocks everything else by default.
uvx mcp-server-for-powershell --allowed-commands Get-Item Get-ChildItem Get-Content
mcp-server-for-powershell is provided as-is under the MIT license.
Добавь это в claude_desktop_config.json и перезапусти Claude Desktop.
{
"mcpServers": {
"mcp-server-for-powershell": {
"command": "npx",
"args": []
}
}
}