MCP Server for PowerShell
Project description
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.
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file mcp_server_for_powershell-1.0.4.tar.gz.
File metadata
- Download URL: mcp_server_for_powershell-1.0.4.tar.gz
- Upload date:
- Size: 94.2 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
3b8b930d40a359f0d5f58bed7d82b6341c78188b2a01a9d6916312b9103a5fcd
|
|
| MD5 |
5ed36b462a7bd08c0a11d241396a4737
|
|
| BLAKE2b-256 |
0f96df8e08196c44144ae83a203636c47762bcafb1ac7e2f9ae4964cd38e1f5b
|
Provenance
The following attestation bundles were made for mcp_server_for_powershell-1.0.4.tar.gz:
Publisher:
create-release.yaml on danielklecha/mcp-server-for-powershell
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
mcp_server_for_powershell-1.0.4.tar.gz -
Subject digest:
3b8b930d40a359f0d5f58bed7d82b6341c78188b2a01a9d6916312b9103a5fcd - Sigstore transparency entry: 818219877
- Sigstore integration time:
-
Permalink:
danielklecha/mcp-server-for-powershell@44bc56bb757e7a014d8ad13164dea29bc60b54b5 -
Branch / Tag:
refs/tags/v1.0.4 - Owner: https://github.com/danielklecha
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
create-release.yaml@44bc56bb757e7a014d8ad13164dea29bc60b54b5 -
Trigger Event:
push
-
Statement type:
File details
Details for the file mcp_server_for_powershell-1.0.4-py3-none-any.whl.
File metadata
- Download URL: mcp_server_for_powershell-1.0.4-py3-none-any.whl
- Upload date:
- Size: 12.1 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
8acb77cbd9d6d66736c83e83111c105a5189cae832c22ff46c3d8031f1233812
|
|
| MD5 |
4586ccf47159126c0e58ef09294dc367
|
|
| BLAKE2b-256 |
656a7a3573e91fedde4b9024cb303428b49890ac2a609f0b5abcf73d2a714393
|
Provenance
The following attestation bundles were made for mcp_server_for_powershell-1.0.4-py3-none-any.whl:
Publisher:
create-release.yaml on danielklecha/mcp-server-for-powershell
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
mcp_server_for_powershell-1.0.4-py3-none-any.whl -
Subject digest:
8acb77cbd9d6d66736c83e83111c105a5189cae832c22ff46c3d8031f1233812 - Sigstore transparency entry: 818219918
- Sigstore integration time:
-
Permalink:
danielklecha/mcp-server-for-powershell@44bc56bb757e7a014d8ad13164dea29bc60b54b5 -
Branch / Tag:
refs/tags/v1.0.4 - Owner: https://github.com/danielklecha
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
create-release.yaml@44bc56bb757e7a014d8ad13164dea29bc60b54b5 -
Trigger Event:
push
-
Statement type: