mcp-server-for-powershell
Unofficial Powershell MCP server
README
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.
Recommended Servers
playwright-mcp
A Model Context Protocol server that enables LLMs to interact with web pages through structured accessibility snapshots without requiring vision models or screenshots.
Magic Component Platform (MCP)
An AI-powered tool that generates modern UI components from natural language descriptions, integrating with popular IDEs to streamline UI development workflow.
Audiense Insights MCP Server
Enables interaction with Audiense Insights accounts via the Model Context Protocol, facilitating the extraction and analysis of marketing insights and audience data including demographics, behavior, and influencer engagement.
VeyraX MCP
Single MCP tool to connect all your favorite tools: Gmail, Calendar and 40 more.
Kagi MCP Server
An MCP server that integrates Kagi search capabilities with Claude AI, enabling Claude to perform real-time web searches when answering questions that require up-to-date information.
graphlit-mcp-server
The Model Context Protocol (MCP) Server enables integration between MCP clients and the Graphlit service. Ingest anything from Slack to Gmail to podcast feeds, in addition to web crawling, into a Graphlit project - and then retrieve relevant contents from the MCP client.
E2B
Using MCP to run code via e2b.
Neon Database
MCP server for interacting with Neon Management API and databases
Exa Search
A Model Context Protocol (MCP) server lets AI assistants like Claude use the Exa AI Search API for web searches. This setup allows AI models to get real-time web information in a safe and controlled way.
Qdrant Server
This repository is an example of how to create a MCP server for Qdrant, a vector search engine.