MCP server for PowerShell
Disclaimer
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.
Installation
- Run directly with uv (recommended):
uvx mcp-server-for-powershell - pip:
pip install mcp-server-for-powershell - uv:
uv pip install mcp-server-for-powershell
Configuration
The 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 |
Language Modes
- 0 (NoLanguage): No script execution allowed.
- 1 (ConstrainedLanguage): Restricts access to sensitive language elements (default).
- 2 (RestrictedLanguage): Only allows basic commands.
- 3 (FullLanguage): Unrestricted access.
Security Profiles
We recommend different configurations based on your security needs:
Default (Balanced)
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
Safe Mode (Strict)
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
Nuclear Mode (Allow-List Only)
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
License
mcp-server-for-powershell is provided as-is under the MIT license.
Metadata
Release files for mcp-server-for-powershell 1.0.4
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| mcp_server_for_powershell-1.0.4.tar.gz | 94.2 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| mcp_server_for_powershell-1.0.4-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 106.4 kB
Release files / mcp_server_for_powershell-1.0.4.tar.gz
| Download URL | mcp_server_for_powershell-1.0.4.tar.gz |
|---|---|
| Size | 94.2 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
3b8b930d40a359f0d5f58bed7d82b6341c78188b2a01a9d6916312b9103a5fcd
|
|
BLAKE2b-256 checksum How to use checksums |
0f96df8e08196c44144ae83a203636c47762bcafb1ac7e2f9ae4964cd38e1f5b
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.7
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Jan 13, 2026.
Transparency logRelease files / mcp_server_for_powershell-1.0.4-py3-none-any.whl
| Download URL | mcp_server_for_powershell-1.0.4-py3-none-any.whl |
|---|---|
| Size | 12.1 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
8acb77cbd9d6d66736c83e83111c105a5189cae832c22ff46c3d8031f1233812
|
|
BLAKE2b-256 checksum How to use checksums |
656a7a3573e91fedde4b9024cb303428b49890ac2a609f0b5abcf73d2a714393
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.7
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Jan 13, 2026.
Transparency log