Логотип PowerShell.MCP

PowerShell.MCP

Спільнота
yotsuda

The universal MCP server for Claude Code and other MCP-compatible clients. One installation gives AI access to 10,000+ PowerShell modules and any CLI tool. You and AI collaborate in the same console with full transparency. Supports Windows, Linux, and macOS.

Видавецьyotsuda
РепозиторійPowerShell.MCP
МоваC#
Форки
9
Зірки
96
Доступні інструменти
0
Тип транспортуstdio
Категорії
ЛіцензіяMIT
Посилання
  • Підключайте інструменти до робочих процесів із ШІ

    PowerShell.MCP надає можливості MCP, які можуть використовувати сумісні клієнтські ШІ-застосунки та агенти.

  • Доступні інструменти: 0

    Перегляньте нижче дії, які можна викликати, з назвами й описами, якщо сервер їх надає.

  • Готова конфігурація для копіювання

    Скористайтеся прикладами конфігурації, щоб налаштувати цей сервер у вибраному клієнті MCP.

  • Показники інтересу до відкритого коду

    Зірки: 96, форки: 9 — у пов’язаному репозиторії.

PowerShell.MCP

PowerShell Platform PowerShell Gallery PowerShell Gallery License: MIT

Security Warning: This module provides complete PowerShell access to your system. Malicious use could result in severe damage. Use responsibly and only in trusted environments.

Overview

The universal MCP server—one installation gives AI access to 10,000+ PowerShell modules and any CLI tool.

PowerShell.MCP connects AI assistants to the entire PowerShell ecosystem through a single MCP server. You and AI collaborate in the same PowerShell console—every command the AI runs appears there as it runs, and a transcript can record all of it (see Auditing an AI Session).

Need bash, a language REPL, a SQL console, or a debugger instead? If you can't install PowerShell 7, or you'd rather drive another shell (bash, cmd, zsh), a language REPL (python, node, racket, lua, …), a SQL console (sqlite3, …), or a language debugger (pdb, jdb, perldb), check out ripple — the same shared-console concept generalized to any REPL, with unified ConPTY-based consoles running side by side.

Why PowerShell.MCP?

A universal gateway to the PowerShell ecosystem.

PowerShell.MCP takes a different approach from service-specific MCP servers. Rather than providing curated tools for individual services, it gives AI assistants direct access to PowerShell—letting them use the same modules and CLI tools that professionals use every day.

This means:

  • One MCP server replaces many — no need for separate servers for each service
  • Immediate access to 10,000+ modules on PowerShell Gallery without waiting for dedicated MCP servers
  • Cross-service workflows combining multiple services in a single pipeline
  • API exploration — prototype and verify API behavior with immediate feedback before writing production code
  • Self-evolving capabilities — AI writes PowerShell scripts that both AI and users can execute, continuously extending what's possible
  • Industry-standard skills — commands you learn transfer directly to your own work

Examples: PowerShell pipeline processing

"Show me bug issues from the PowerShell repo with their authors"

powershell
gh issue list --repo PowerShell/PowerShell --json title,author,labels |
    ConvertFrom-Json |
    Where-Object { $_.labels.name -contains "Issue-Bug" } |
    Select-Object title, @{N='by';E={$_.author.login}}

"List my running Azure VMs with their sizes"

powershell
Get-AzVM -Status | Where-Object PowerState -eq "VM running" |
    Select-Object Name, @{N='Size';E={$_.HardwareProfile.VmSize}}, Location

"Check if GitHub's API returns rate limit info"

powershell
Invoke-RestMethod https://api.github.com/rate_limit |
    Select-Object -ExpandProperty rate

"Get the current user's Windows username via Win32 API"

powershell
Add-Type -MemberDefinition '[DllImport("advapi32.dll")] public static extern bool GetUserName(System.Text.StringBuilder sb, ref int len);' -Name Win32 -Namespace API
$sb = [System.Text.StringBuilder]::new(256); $len = 256
[API.Win32]::GetUserName($sb, [ref]$len); $sb.ToString()

PowerShell.MCP complements your existing MCP setup by providing a flexible, general-purpose foundation.

What Makes It Powerful

🖥️ Multi-Client Architecture

  • Each client instance gets its own exclusive console—run multiple Claude Code sessions in parallel
  • Safe parallel operation with no resource conflicts
  • Unique window titles (e.g., "#12345 Taxi") for easy identification
  • Get-MCPOwner cmdlet shows which client owns the current console

🤝 Shared Console Experience

  • You and AI collaborate in the same PowerShell session with full transparency
  • Every command AI executes appears in your console in real-time
  • You can respond to interactive prompts directly in the console
  • Short commands are added to the console history on Windows—learn by watching AI work

🔄 Persistent Session State

  • Authenticate once, stay authenticated: Azure, AWS, Microsoft 365, and more
  • Modules, variables, and functions persist across commands
  • No re-initialization overhead

🌐 Universal Access

🔗 Pipeline Composability

  • Describe what you want in natural language—AI constructs the optimal pipeline
  • "Top 5 largest logs" → Get-ChildItem *.log | Sort-Object Length -Descending | Select-Object -First 5
  • Chain any commands across any services

⚡ Instant Execution

  • Commands execute immediately in an existing console
  • No process startup overhead per command
  • Real-time streaming output

🔐 Enterprise-Ready Security

  • Local-only named pipe communication—no network exposure
  • Every command visible, and recordable with Start-Transcript or Script Block Logging (Auditing an AI Session)
  • Integrates with existing security policies

🔒 Secrets stay with you, not the AI

  • Interactive prompts (Read-Host -AsSecureString, Get-Credential, MFA codes) hide input from the AI
  • Enter passphrases for code-signing, gpg, ssh-add, sudo, cloud CLI MFA — keystrokes go to the program, never to AI's output stream
  • AI orchestrates the workflow ("build, sign, push the tag"); you supply the secret at the right moment
  • Impossible with stdin-piped MCP shells, where the AI must somehow feed the secret in

Architecture

Six tools provide maximum flexibility with minimum complexity:

ToolPurpose
start_consoleLaunch a persistent console for the MCP client
get_current_locationGet current directory and available drives
execute_commandExecute any PowerShell command or CLI tool
wait_for_completionWait for long-running commands to complete
cancelInterrupt the command currently running in the console
close_consoleClose a console by PID (e.g. one paused at an interactive prompt)

Quick Start

Prerequisites

All platforms require:

PlatformOS Requirements
WindowsWindows 10/11 or Windows Server 2016+
LinuxUbuntu 22.04+, Debian 11+, RHEL 8+, or another distribution PowerShell 7.4 supports; a GUI desktop to see the console
macOSmacOS 12 (Monterey)+, Intel or Apple Silicon

1. Open PowerShell 7

Press Win + R, type pwsh, press Enter

2. Install PowerShell.MCP

powershell
Install-PSResource PowerShell.MCP

3. Configure your MCP client

For Claude Code:

powershell
Register-PwshToClaudeCode

For Claude Desktop:

powershell
Register-PwshToClaudeDesktop

For other MCP clients: Run Get-MCPProxyPath -Escape to get the JSON-escaped executable path, then add it to your client's configuration file manually.

4. Restart your MCP client

1. Install PowerShell 7

bash
# Ubuntu/Debian
sudo apt-get update
sudo apt-get install -y wget apt-transport-https software-properties-common
source /etc/os-release
wget -q https://packages.microsoft.com/config/ubuntu/$VERSION_ID/packages-microsoft-prod.deb
sudo dpkg -i packages-microsoft-prod.deb
sudo apt-get update
sudo apt-get install -y powershell

2. Install PowerShell.MCP, set permissions, and configure your MCP client

powershell
# Run in PowerShell (pwsh)
Install-PSResource PowerShell.MCP
chmod +x "$(Get-MCPProxyPath)"

For Claude Code:

powershell
Register-PwshToClaudeCode

For Claude Desktop:

powershell
Register-PwshToClaudeDesktop

For other MCP clients: Run Get-MCPProxyPath -Escape to get the JSON-escaped executable path, then add it to your client's configuration file manually.

3. Restart your MCP client

1. Install PowerShell 7

bash
brew install --cask powershell
# If the cask is unavailable, install from GitHub Release (on an Intel Mac, use osx-x64 instead of osx-arm64):
# curl -sSL -o /tmp/powershell.tar.gz https://github.com/PowerShell/PowerShell/releases/download/v7.5.4/powershell-7.5.4-osx-arm64.tar.gz
# sudo mkdir -p /usr/local/microsoft/powershell/7
# sudo tar zxf /tmp/powershell.tar.gz -C /usr/local/microsoft/powershell/7
# sudo chmod +x /usr/local/microsoft/powershell/7/pwsh
# sudo ln -sf /usr/local/microsoft/powershell/7/pwsh /usr/local/bin/pwsh

2. Install PowerShell.MCP, set permissions, and configure your MCP client

powershell
# Run in PowerShell (pwsh)
Install-PSResource PowerShell.MCP
chmod +x "$(Get-MCPProxyPath)"

For Claude Code:

powershell
Register-PwshToClaudeCode

For Claude Desktop:

powershell
Register-PwshToClaudeDesktop

For other MCP clients: Run Get-MCPProxyPath -Escape to get the JSON-escaped executable path, then add it to your client's configuration file manually.

3. Restart your MCP client

Updating

Every installed version lives in its own folder, so the proxy path your MCP client launches changes with each update. Re-register after updating: otherwise the client keeps starting the previous version's proxy, and commands fail with "PowerShell.MCP.Proxy version is outdated".

1. Update the module

Open a new PowerShell 7 window (not one of the PowerShell.MCP consoles) and run:

powershell
Update-PSResource PowerShell.MCP

2. Re-register from another new window

A window that has already loaded PowerShell.MCP keeps the old version, so open one more new window, which loads the version just installed:

powershell
chmod +x "$(Get-MCPProxyPath)"   # Linux / macOS only: the new proxy needs the execute bit again

Register-PwshToClaudeCode        # Claude Code
Register-PwshToClaudeDesktop     # Claude Desktop

Both replace the existing pwsh entry and keep the arguments and environment variables already set on it, such as --no-profile. For other MCP clients: replace the path in your configuration with the output of Get-MCPProxyPath -Escape.

3. Close the old consoles and restart your MCP client

Close the PowerShell.MCP console windows (titled like #12345 Taxi) — each keeps running the version it was started with — then quit and restart your MCP client.

To see what is installed, and remove a version no console is using any more:

powershell
Get-InstalledPSResource PowerShell.MCP
Uninstall-PSResource PowerShell.MCP -Version <old version>

Configuration

Lean consoles (--no-profile)

By default, every console the proxy launches loads your PowerShell $PROFILE (prompt, aliases, PSReadLine, theme) — these are real interactive shells, not just automation targets. Pass --no-profile to start them with -NoProfile instead, for faster startup and a clean, deterministic environment.

Claude Code:

powershell
claude mcp remove pwsh -s user   # if pwsh is already registered: 'claude mcp add' refuses an existing name
claude mcp add pwsh -s user -- "$(Get-MCPProxyPath)" --no-profile

From then on Register-PwshToClaudeCode keeps the flag, including when you re-register after an update.

Claude Desktop / other MCP clients: add an args array with --no-profile to the pwsh entry in your config (Register-PwshToClaudeDesktop keeps it when it re-registers):

json
"mcpServers": {
  "pwsh": {
    "command": "...PowerShell.MCP.Proxy.exe",
    "args": ["--no-profile"]
  }
}

The headless / CI launcher always uses -NoProfile regardless of this flag.

Idle consoles close themselves

When consoles pile up, an owned console that neither the AI nor you have used for 10 minutes prints a warning and closes itself 60 seconds later. The most recently used console of each session is always kept, and a console that is busy, waiting at a prompt, still holding output that has not been collected, or has text typed at its prompt is never closed. Typing anything, or any AI command, cancels a pending close.

VariableDefaultMeaning
POWERSHELL_MCP_STANDBY_REAP_MINUTES10Idle minutes before the warning; 0 turns closing off
POWERSHELL_MCP_STANDBY_REAP_GRACE_SECONDS60Seconds between the warning and the close

Set these as user or system environment variables (Windows: System Properties → Environment Variables, or setx; macOS / Linux: your login shell's profile), not in your MCP client's env block. Each console is a new terminal window rather than a child of the proxy, so a variable set only for the proxy generally does not reach it.

Timeout ceiling

A blocking call is capped to what your MCP client will actually wait for: 170 seconds for Claude Code and 50 seconds for any other client. Nothing is lost when the cap is reached: the command keeps running, and its result arrives with the next tool call. If your client waits longer than 50 seconds, raise the cap with POWERSHELL_MCP_TIMEOUT_CEILING (seconds, at most 170). This one is read by the proxy, so set it in your MCP client's env block:

json
"mcpServers": {
  "pwsh": {
    "command": "...PowerShell.MCP.Proxy.exe",
    "env": { "POWERSHELL_MCP_TIMEOUT_CEILING": "120" }
  }
}

With the Claude Code CLI, pass it as -e POWERSHELL_MCP_TIMEOUT_CEILING=120 to claude mcp add; Register-PwshToClaudeCode and Register-PwshToClaudeDesktop keep it when they re-register.


First-Time Demo

Experience PowerShell.MCP's capabilities:

  • "Open pwsh and show what it can do in a colorful, dynamic, and fun demo"
  • "Try out different styles of notifications using the BurntToast module"
  • "Automate Notepad: type text and smoothly move the window in a circle"
  • "How does it feel now that you have a tool like PowerShell.MCP?"

After trying these demos, explore the built-in prompts below or ask AI to explain any command.

Built-in Prompts

PowerShell.MCP includes 7 specialized prompts accessible from your MCP client's prompts menu. Each prompt is designed for specific tasks and guides AI to provide optimal results.


📋 Create Work Procedure + ⚙️ Execute Work Procedure

Best for: Complex, multi-step tasks you'll perform repeatedly

Work together as a powerful workflow system with automatic file management:

  1. Create Work Procedure - AI analyzes the task and generates work_procedure.md as the reusable procedure and work_progress.txt as the execution plan.
  2. Execute Work Procedure - AI follows and refines work_procedure.md during execution, and tracks and records outcomes in work_progress.txt.

Key benefits: self-refining procedures, resumable workflows, automatic progress tracking, consistent results

Example: "Write Get-Help markdown for multiple cmdlets through execution and verification"


📊 Analyze Content

Best for: Deep analysis of files, folders, or datasets

Generates comprehensive reports with insights and recommendations. Combine with HTML Generation Guidelines for AI for visual reports with charts.

Examples: "Analyze my project's log files" • "Create a report on this CSV dataset" • "Analyze this HAR file"


🎨 HTML Generation Guidelines for AI

Best for: Professional HTML reports with charts and styling

Companion prompt that ensures AI generates high-quality HTML with Chart.js visualization, responsive design, and proper styling. Works with any prompt or task that needs HTML output.

Examples: Analyze Content + this = visual reports • Your custom prompt + this = professional HTML • Any data task + this = interactive output


📚 Learn Programming & CLI

Best for: Learning programming languages and command-line tools at any level

Provides personalized learning experiences with clear explanations, practical examples, and hands-on exercises. Specify your learning goals directly without worrying about experience levels.

Examples: "Learn Python basics for data analysis" • "Learn Git commands for version control" • "Learn PowerShell scripting"


🗣️ Foreign Language Dictation Training

Best for: Improving listening skills in foreign languages

Creates dictation exercises with automatic checking.

Examples: "English dictation at beginner level" • "Japanese conversation at the zoo"


🗺️ Show Interactive Map

Best for: Visualizing geographic data or locations

Generates interactive HTML maps with markers, descriptions, and optional 3D display using PowerShell.Map module.

Examples: "Show major Roman battles in chronological order" • "Create a map of hot springs in Japan"


Platform Notes

Windows

  • PSReadLine module is automatically loaded for enhanced console experience
  • Full color support for PowerShell output

Linux

  • A GUI desktop environment (GNOME, KDE, XFCE, etc.) is needed to see and type into the console. Without a supported terminal emulator the console still starts, headless: the AI can run commands, but there is no window to watch or type into.
  • Supported terminal emulators: gnome-terminal, konsole, xfce4-terminal, xterm, lxterminal, mate-terminal, terminator, tilix, alacritty, kitty
  • PSReadLine is replaced by a simpler line editor of the module's own: on Linux, PSReadLine keeps the timer that runs AI commands from firing while the prompt waits for input

macOS

  • Works with Terminal.app (default)
  • PSReadLine is replaced by a simpler line editor of the module's own, for the same reason as on Linux
  • Both Apple Silicon (M1/M2/M3/M4) and Intel Macs are supported

Limitations

  • AI Command Cancellation: AI can interrupt a running command with the cancel tool — it stops a runaway/long-running PowerShell pipeline and sends Ctrl+C to a native CLI. A command stuck in a non-interruptible blocking call, or a console paused at an interactive prompt, can't be stopped that way — abandon it with the close_console tool.
  • User Command Privacy: Commands you execute are not visible to AI assistants.
  • External Command Colors: Color output from some CLI tools may not be preserved (git colors are supported).
  • Command History: On Windows, AI-executed commands of one or two lines are added to the console's PSReadLine history; longer multi-line commands are intentionally excluded to avoid history bloat. On Linux and macOS, AI-executed commands are not added to history.
  • Programs that read the console at startup (Windows): Windows lets only one reader at a time take from a console's input buffer, and the prompt holds one for as long as an AI command runs. A program that probes console input while starting up therefore queues behind the prompt and does not return until a key is pressed. It is rare — common CLIs (git, node, npm, python, dotnet, curl, ssh) are unaffected; LilyPond is a known case. Run such a program detached with its standard input from NUL: cmd /d /s /c "<command> < NUL > out.log 2>&1". On a timeout the console names the stalled process and repeats this form. See docs/Console-Input-Starvation.md.

Enterprise Deployment (WDAC / Device Guard)

Starting with v1.7.7, PowerShell.MCP.dll and PowerShell.MCP.Proxy.exe (win-x64) are Authenticode-signed with the yotsuda code-signing certificate, shared across all yotsuda OSS projects.

For installation instructions (personal PC, AD GPO deployment, WDAC policy configuration) and the public certificate file itself, see:

→ github.com/yotsuda/code-signing

The certificate thumbprint is also published in each GitHub release's notes.

powershell
# Quick verify on installed binaries
Get-AuthenticodeSignature (Get-MCPProxyPath)   # the proxy of the version this window loaded

Disclaimer

This software is provided "AS IS" without warranty of any kind, either expressed or implied. The author assumes no responsibility for any damages arising from the use of this software.

License

MIT License - see LICENSE for details.

Author

Yoshifumi Tsuda


For enterprise use, ensure compliance with your organization's security policies.

Використовуйте MCP PowerShell.MCP з різними моделями ШІ

TypingMind підключає інструменти MCP на рівні робочого простору, тож після підключення PowerShell.MCP ви можете використовувати їх із різними моделями ШІ в TypingMind, а не налаштовувати окремо для кожної моделі. Ця інтеграція MCP працює локально через конектор MCP TypingMind на вашому пристрої.

Інструкція з налаштування локального конектора

Виберіть цей варіант, якщо серверу MCP потрібен доступ до локальних файлів, програм або приватних ресурсів на вашому комп’ютері.

1

Відкрийте налаштування MCP

У TypingMind перейдіть до розділу «Налаштування», відкрийте «Розширені налаштування», потім «Протокол контексту моделі» й виберіть «Параметри конектора».

  1. Відкрийте TypingMind у браузері.
  2. Натисніть значок налаштувань.
  3. Перейдіть до розділу «Розширені налаштування».
  4. Відкрийте розділ «Протокол контексту моделі».
  5. Натисніть «Параметри конектора» й виберіть «Цей пристрій».
Екран налаштування конектора MCP у TypingMind з вибраним варіантом «Цей пристрій»
2

Виконайте команду конектора

Виберіть «Цей пристрій», скопіюйте команду з TypingMind і виконайте її в терміналі. Не зупиняйте процес, поки користуєтеся MCP.

  1. Скопіюйте команду налаштування, показану в TypingMind.
  2. Відкрийте «Термінал» у macOS або Windows Terminal у Windows.
  3. Вставте й виконайте команду.
  4. Підтвердьте встановлення пакета, якщо термінал запитає дозволу продовжити.
  5. Не закривайте вікно термінала й не зупиняйте процес, поки користуєтеся інструментами MCP.
3

Додайте PowerShell.MCP як сервер

Коли статус конектора зміниться на «Готово», натисніть «Змінити сервери» та вставте конфігурацію сервера MCP.

  1. Зачекайте, доки статус конектора зміниться на «Готово».
  2. Натисніть «Змінити сервери».
  3. Вставте конфігурацію сервера MCP PowerShell.MCP.
  4. Збережіть список серверів.
  5. Оновіть дані, щоб переконатися, що конектор досі готовий до роботи.
Налаштування MCP у TypingMind з активним сервером і кнопкою «Змінити сервери»
{
  "mcpServers": {
    "powershell-mcp": {
      "command": "npx",
      "args": [
        "-y",
        "<mcp-server-package>"
      ]
    }
  }
}
4

Використовуйте підключення з різними моделями

Збережіть список серверів, відкрийте «Плагіни», увімкніть інструменти MCP для PowerShell.MCP, а потім виберіть будь-яку підтримувану модель ШІ в TypingMind і використовуйте інструменти в чаті або призначте їх агенту ШІ.

  1. Відкрийте сторінку «Плагіни» в TypingMind.
  2. Увімкніть інструменти MCP для PowerShell.MCP.
  3. Почніть чат і виберіть модель ШІ, яку хочете використовувати.
  4. Використовуйте інструменти MCP у чаті або призначте їх агенту ШІ.
  5. За потреби перемикайтеся на іншу модель ШІ без повторного підключення MCP.
Чат TypingMind із використанням увімкнених інструментів MCP і вибраної моделі ШІ
Допоможете з цим завданням через PowerShell.MCP?
PowerShell.MCP
Звісно. Я це прочитав.
Ось що я знайшов за допомогою PowerShell.MCP.

Поширені запитання

Для чого використовується сервер MCP PowerShell.MCP?

PowerShell.MCP — це сервер MCP, який дає змогу сумісним клієнтам ШІ підключатися до зовнішніх інструментів і контексту. У TypingMind ви можете додати цей сервер MCP один раз і зробити його інструменти доступними у своєму робочому просторі ШІ.

Чи можу я використовувати MCP PowerShell.MCP з кількома моделями ШІ в TypingMind?

Так. TypingMind підключає інструменти MCP на рівні робочого простору, тому ви можете використовувати PowerShell.MCP з різними моделями ШІ, як-от Claude, ChatGPT, Gemini або іншими моделями, які ви налаштували в TypingMind, без окремого налаштування сервера MCP для кожної моделі.

Навіщо використовувати MCP PowerShell.MCP із TypingMind?

TypingMind — один із найкращих інтерфейсів для чату з великими мовними моделями, адже він об’єднує різні моделі ШІ, промпти, плагіни, агентів ШІ, ключі API та інструменти MCP в одному робочому просторі. Підключивши PowerShell.MCP, ви зможете використовувати його інструменти MCP з вибраними моделями та впорядковано працювати з чатами в TypingMind.

Як підключити MCP PowerShell.MCP до TypingMind?

PowerShell.MCP працює через локальний конектор MCP TypingMind. Це найкращий варіант, коли серверу MCP потрібен доступ до локальних файлів, настільних застосунків, інструментів командного рядка або приватних ресурсів на вашому комп’ютері.

Які інструменти надає MCP PowerShell.MCP у TypingMind?

PowerShell.MCP надає можливості MCP, які можна ввімкнути на сторінці «Плагіни» в TypingMind і використовувати в чаті або призначати агентам ШІ.

Чи потрібно передавати свої ключі API в TypingMind, щоб використовувати MCP PowerShell.MCP?

Ні. TypingMind орієнтований насамперед на локальну роботу й дає змогу зберігати контроль над постачальниками моделей, ключами API, промптами та конфігурацією MCP. Якщо PowerShell.MCP потребує автентифікації, під час створення підключення додайте потрібні заголовки, налаштування OAuth або локальну конфігурацію для цього сервера MCP.

Схожі сервери MCP

Усі

Створіть власний ШІ-простір уже зараз

Підпишіться на нашу розсилку, щоб дізнаватися про нові функції та майбутні розіграші 👇