Provides AI agents with headless Windows management capabilities via PowerShell, SSH, WinRM, and SFTP.
Also known as IMRRD/powershell-mcp, @imrrd/powershell-mcp
- Stars
- 1
- Tools
- 20
- Downloads, 30 days
- 1,670
- Latest version
- 0.9.1
- Last commit
- Nov 10, 2026
- License
- MIT
What is powershell MCP?
powershell provides AI agents with headless Windows management capabilities via PowerShell, SSH, WinRM, and SFTP. It exposes 20 tools, such as run_powershell, list_services, get_service.
Summary generated from the project's README
About powershell MCP server
Managing Windows environments through AI agents is made safer and more discreet with this server. It provides headless access to PowerShell, allowing agents to execute commands in hidden processes that do not steal focus or interrupt a user's active typing. This is ideal for developers or system administrators who need an unattended assistant to manage Windows servers, backup systems, or local machines without visible console windows popping up.
Users can interact with local systems or remote hosts using a variety of protocols including SSH, WinRM, and SFTP. The server includes specialized tools for system administration, such as listing or controlling Windows services and retrieving hardware information like CPU and memory usage. It prefers PowerShell 7 but can fall back to older versions, and it provides structured output containing exit codes and execution durations for every command.
Security and stability are prioritized through hard timeouts and output caps to prevent runaway processes from flooding the context. For remote file management, the SFTP tools support a staged transfer mode that uses SHA-256 verification to ensure file integrity during uploads and downloads.
What you can do with it
- 1Secure file transfersA developer can have an agent upload files to a remote server with verified integrity using SHA-256.
Written from the project's README. Every use case is checked against a quote from it.
How to install powershell MCP
Formats verified 10 Nov 2026Add to CursorAdd to GooseInstall powershell MCP in Claude Code
$ claude mcp add powershell-mcp -- npx -y @imrrd/powershell-mcpInstall powershell MCP in Cursor
~/.cursor/mcp.json
{
"mcpServers": {
"powershell-mcp": {
"command": "npx",
"args": [
"-y",
"@imrrd/powershell-mcp"
]
}
}
}Install powershell MCP in VS Code
.vscode/mcp.json
{
"servers": {
"powershell-mcp": {
"type": "stdio",
"command": "npx",
"args": [
"-y",
"@imrrd/powershell-mcp"
]
}
}
}Install powershell MCP in VS Code CLI
$ code --add-mcp '{"name":"powershell-mcp","type":"stdio","command":"npx","args":["-y","@imrrd/powershell-mcp"]}'Install powershell MCP in Claude Desktop
claude_desktop_config.json
{
"mcpServers": {
"powershell-mcp": {
"command": "npx",
"args": [
"-y",
"@imrrd/powershell-mcp"
]
}
}
}Install powershell MCP in Codex
$ codex mcp add powershell-mcp -- npx -y @imrrd/powershell-mcpInstall powershell MCP in Codex config.toml
~/.codex/config.toml
[mcp_servers.powershell-mcp] command = "npx" args = ["-y", "@imrrd/powershell-mcp"]
Install powershell MCP in Gemini CLI
$ gemini mcp add -s user powershell-mcp npx -- -y @imrrd/powershell-mcpInstall powershell MCP in Gemini settings.json
~/.gemini/settings.json
{
"mcpServers": {
"powershell-mcp": {
"command": "npx",
"args": [
"-y",
"@imrrd/powershell-mcp"
]
}
}
}Started by HostedMCP on 16 Nov 2026
We ran this command for @imrrd/powershell-mcp 0.9.1 in an isolated container with no network and no keys. It answered and listed 20 tools.
powershell MCP tools 20
Read from the server with tools/listrun_powershellRun a PowerShell script/command on this Windows host in a hidden process (no console window appears). Returns stdout, stderr and exit code. Use for any Windows command, file, or system task.
list_servicesList Windows services, optionally filtered by a name pattern. Returns Name, DisplayName, Status.
get_serviceGet detailed status of one Windows service by name.
control_serviceStart, stop, or restart a Windows service (requires the MCP host process to have sufficient privileges).
system_infoReturn OS, CPU, memory and disk summary for this Windows host.
ssh_execRun a command on a remote host over SSH, fully in-process (no ssh.exe, no WSL — works headless). Use for Linux hosts or any OpenSSH target. Auth via privateKeyPath or password. Returns stdout, stderr, exit code.
winrm_execRun a command on a remote Windows host via PowerShell Remoting (WinRM / Invoke-Command). Native to Windows Server — no SSH server or agent needed on the target, only WinRM enabled. Output captured in-process (no console window).
sftp_uploadUpload a local file to a remote host over SFTP, in-process (ssh2 — no scp.exe, no WSL, headless). Use to deploy scripts/configs to Linux hosts.
sftp_downloadDownload a file from a remote host to this Windows host over SFTP, in-process (ssh2 — no scp.exe, no WSL, headless).
run_programRun a native executable DIRECTLY (no shell) in a hidden process and capture clean stdout/stderr + exit code. Use this for console programs like gh, git, docker, node, python, etc. -- direct execution captures their stdout/stderr without PowerShell pipeline semantics. Historical hidden-shell native stdout loss is executable/environment-specific; it is not universal. Provide the program and an args array (no shell quoting needed). For work expected to outlast the synchronous deadline, choose start_execution before launching, then poll execution_status and read_execution_output. A timeout never automatically reruns or migrates work.
start_remote_batchOpt-in process-local SSH/WinRM batch; 1–32 explicit targets, up to 8 concurrent, per-target deadline. No discovery or retry. SSH supports at most four explicit jumps. Unknown after server restart.
remote_batch_statusRead ordered per-target batch records; unavailable after process restart.
Show all 20 toolsShow fewer tools
cancel_remote_batchStop dispatch of queued targets; active targets become unknown, not confirmed terminated.
runtime_capabilitiesRead-only runtime package, protocol, supported and available engines, transports and limits; no identity, environment or secrets.
start_executionStart a local executable directly with durable idempotency and bounded output. No shell; remote targets unsupported.
execution_statusRead a local execution state. Unknown after restart means no automatic replay or verified ownership.
read_execution_outputRead a bounded base64 output page, including while running.
cancel_executionRequest bounded local cancellation. Windows Job Objects and Linux subreaper/pidfds confirm owned-tree termination asynchronously; failures remain unknown. Recovered runs are never signalled.
read_output_logRead a bounded raw byte page from an opt-in session log; base64 encoded. Handles are process-local and expire after one hour.
delete_output_logDelete a session log by opaque handle.
Automated checks
Ran Nov 13, 2026Full report →Passed our automated checks. That is not a security audit: read the code and give the server the narrowest access it needs. How checks work
- Source repository linked and reachableimrrd/powershell-mcp is public and reachablegithub.com/imrrd/powershell-mcp ↗Pass
- Package names this repository as its source@imrrd/powershell-mcp names imrrd/powershell-mcp as sourcenpmjs.com/package/@imrrd/powershell-mcp ↗Pass
- Build provenance (Sigstore attestation)Sigstore attestation for @imrrd/powershell-mcpnpmjs.com/package/@imrrd/powershell-mcp/v/0.9.1#provenance ↗Pass
- Open source license (OSI)MITspdx.org/licenses/MIT.html ↗Pass
- Commit or release in the last yearLast commit or release 2026-11-10github.com/imrrd/powershell-mcp ↗Pass
- OpenSSF ScorecardNot checked
- Package name not close to a popular packageNo popular package one edit away from @imrrd/powershell-mcpPass
- No critical advisory in the package or its dependencies106 resolved dependencies checked; no critical advisoryosv.dev ↗Pass
- No hidden instructions to the model11 tool descriptions and the README read; no override phrases, credential paths or hidden charactersPass
- Destructive tools are labelledNo tool named like delete, drop or execPass
- Remote endpoint answers the MCP handshakeNot checked
README
View on GitHubpowershell-mcp
A Model Context Protocol server that gives AI agents real, non-intrusive access to Windows PowerShell.
Most tools that let an agent run Windows commands spawn a visible console window for every call — which steals focus and interrupts whatever you're typing. powershell-mcp runs everything in a hidden process (windowsHide: true / no CreateWindow), captures structured output, enforces hard timeouts, and exposes purpose-built tools for service and system management. Built for running unattended next to a human at the keyboard.
Why
- Hidden process configuration. Local child creation uses
windowsHide: true; foreground focus preservation needs interactive desktop acceptance and is not established by headless CI. - Structured + safe. Every call returns
{ stdout, stderr, exit_code, duration, timed_out }. Hard timeout with tree-kill. Output is capped so a runaway command can't flood the context. - Real Windows management. First-class tools for services and system info, not just a raw shell — handy for managing Windows servers and backup systems.
- Cross-shell. Prefers
pwsh(PowerShell 7+) and falls back topowershell.exe; override withPWSH_MCP_EXE.
Tools
The ten execution tools advertise a versioned MCP outputSchema and return the same
structuredContent contract (schemaVersion: 1) alongside their original
human-readable text. Fields are executionId (per call), transport, target,
stdout, stderr, nullable exitCode, durationMs, timedOut, truncation
(truncated, nullable limitBytesPerStream), terminationStatus, and detail.
terminationStatus is one of completed, nonzero_exit, remote_error, timeout,
script_error, cancelled, transport_error, or unknown. Any status other than completed
sets MCP isError; this is execution status, not proof that an application
operation succeeded. A null exit code never means success. SSH includes a
signal or connection error in detail; an unsolicited signal is unknown, not
caller cancellation. SFTP includes direction and verified local file size where
available. WinRM validates a locally framed invocation result: successful
invocation is completed, remote script errors are remote_error, and connection
failures are transport_error. Its local PowerShell host exit is in
detail.localExitCode; remote native exitCode remains null. Missing or truncated
frames fail closed. terminationCertainty is root_exited only for an observed
local child exit, otherwise unknown; neither status proves descendants or remote
execution stopped after a timeout. These
results never include authentication options or credential values.
Optional raw output logs
run_program, run_powershell (legacy or strict), winrm_exec, and ssh_exec accept logOutput: true and
optional logQuotaBytes (default/max 8 MiB combined stdout and stderr). Disabled
by default: no log directory is created without opting in. Raw child output is
written separately per stream, independently of the display byte cap. Strict
PowerShell persists validated command payload stdout; WinRM also persists its
validated remote console stderr. Framing, credentials, stdin, and wrapper
diagnostics are never persisted. A result's
log contains an unpredictable process-local handle, complete, byte counts,
and expiry timestamp. complete: false means producer truncation, quota loss, or a write failure; never
interpret it as the entire output. Read through read_output_log with handle,
stream, byte offset and length (maximum 65,536 bytes); data is base64, and
nextOffset/totalBytes support pagination. delete_output_log removes a log.
Handles are available only in this MCP process, never filesystem paths; only
the current OS user and SYSTEM have directory ACL access on Windows (0700/0600
on POSIX). The process reserves at most 64 MiB total, expires completed handles one
hour after finish on the next log operation (active handles remain reserved), and removes its own files on normal exit. A hard
crash may leave private files requiring operator cleanup under the configured POWERSHELL_MCP_LOG_PARENT or TMPDIR, otherwise the OS temp path.
Commands can emit secrets: opt-in logs preserve emitted stdout/stderr verbatim,
so do not enable logging for sensitive commands. Passwords, stdin and MCP
envelopes are never intentionally logged. Framed payload retention is bounded
to the larger of the display cap and log quota per stream before JSON/base64
transport. The log quota remains combined across both streams; complete: false
reports any producer truncation or log quota loss. Tail mode can therefore
produce an incomplete suffix log.
Execution tools accept maxOutputBytes (1–8,388,608, default 1 MiB per
stream) and tail (default false: retain the head; true: retain the tail).
truncation.stdout and .stderr, when the producer observed stream bytes,
report observedBytes, capturedBytes, omittedBytes, and truncated on the
original UTF-8 input bytes. capturedBytes + omittedBytes = observedBytes;
these are not lengths of pretty-printed text. An incomplete UTF-8 scalar at
a head/tail cut is omitted and counted as such. Malformed input is displayed
with replacement characters; its captured count refers to original bytes, not
the encoded replacement characters. Raw structured stdout/stderr preserve
newlines; human-readable formatting may trim whitespace. Wrapper-generated
diagnostics are not producer bytes and have no invented stream counts. Some
failed/early remote calls cannot report producer-side byte counts. No full logs
are persisted by default; opt-in runs return a protected output-log handle.
Strict PowerShell and WinRM stream formatted pipeline lines into a fixed-capacity
UTF-8 writer, counting all bytes after retention fills. WinRM runs this writer
inside the remote script block, before remoting serialization. Direct console
stdout joins payload stdout without corrupting framing; remote console stderr
has a separate bounded writer and counters. Error summaries retain at most eight
shortened records as errors arrive. Producer retention is O(cap), with fixed
encoding scratch space; terminal JSON/base64 envelopes and local pipe capture
also have finite bounds. This does not bound memory allocated by user scripts,
individual objects/lines, PowerShell formatting, or remoting internals. The
writer requires Add-Type in each execution runspace; constrained endpoints
that forbid compilation are unsupported and fail closed. Counts describe
rendered UTF-8 pipeline output, with platform newlines from Out-String -Stream,
and UTF-8 console text, rather than original native program bytes. Use
run_program for native byte provenance.
Strict/WinRM return payload output only after a validated terminal frame. Timeout, cancellation, malformed frames, or direct OS stdout writes that bypass the console writer fail closed without inventing producer counts or returning frame data as command output; unfinished framed logs are discarded. MCP cancellation requests termination of the local PowerShell process tree and releases its log reservation; it does not prove that remote work or descendants stopped.
| Tool | Description |
|---|---|
run_powershell |
Run any PowerShell script/command (hidden). `{ script, cwd?, timeoutMs?, errorPolicy?: "legacy" |
runtime_capabilities |
Read-only package/protocol version, supported and detected available engines, engine policy (without exposing configured override paths), transports and input/output/timeout limits. Does not return user identity, environment or secrets. |
run_program |
Run a native executable directly (no shell) and capture its stdout/stderr + exit code with direct argument passing. { program, args?, cwd?, timeoutMs?, maxOutputBytes?, tail? } |
list_services |
List services, optional filter wildcard. |
get_service |
Detailed status of one service by name. |
control_service |
start / stop / restart / status a service. |
system_info |
OS, CPU, memory, and per-drive disk summary. |
ssh_exec |
Run a command on a remote host over SSH, fully in-process (no ssh.exe, no WSL — works headless). { host, username, command, port?, privateKeyPath?, passphrase?, password?, timeoutMs?, maxOutputBytes?, tail? } |
winrm_exec |
Run a command on a remote Windows host via PowerShell Remoting (WinRM / Invoke-Command). No SSH server or agent needed on the target. { computerName, command, username?, password?, useSsl?, authentication?, timeoutMs?, maxOutputBytes?, tail? } |
sftp_upload |
Upload a local file to a remote host over SFTP, in-process (ssh2 — no scp.exe/WSL, headless). { localPath, remotePath, host, username, port?, privateKeyPath?, passphrase?, password?, timeoutMs? } |
sftp_download |
Download a remote file to this host over SFTP, in-process. Same params as sftp_upload. |
Opt-in verified staged SFTP
sftp_upload and sftp_download accept staged: true (default false).
The default retains the legacy direct fastPut/fastGet behavior; it does not
promise destination preservation or content verification. Staged transfers create
an exclusive, unpredictable .part file beside the destination, verify SHA-256
against a readback, and finalize without replacing an existing destination.
Upload uses the server's hardlink@openssh.com extension for no-clobber
finalization; servers without that capability fail closed rather than falling
back to an overwriting rename. Download uses a local hard link for no-clobber
finalization. The staging and destination paths must support hard links on the
same filesystem; filesystem permissions, server extension behavior and
concurrent external writers can still cause failure. Only an exclusively created
temporary path is eligible for cleanup; an existing destination is not deleted.
Structured detail adds verification (not_started, failed, or
sha256_matched), finalized (true/false, or absent when a remote finalization
request was sent but its outcome is unknown), cleanup (not_needed, removed,
or failed, or unknown when remote staging may remain), sha256 on verified success, and bytes when the staged copy's
size was observed. A cleanup failure after successful finalization may
report a failed operation with finalized: true; reconcile the destination and
orphaned staging file separately. On timeout or connection loss, the reported
cleanup is not proof that remote work stopped or no orphan remains. In particular,
do not retry an ambiguous finalization as though finalized: false had been
proved. SHA-256 readback checks observed bytes, not an immutable source snapshot:
source files must be kept stable by the caller; concurrent mutation outside the
observed comparison window is not prevented, and there is no source lock.
Only synthetic loopback SFTP fixtures exercise this feature in the repository; live-server extension behavior, filesystem semantics, and permissions remain unverified and require operator validation before deployment.
Native programs: Historical #1 observed missing native stdout from a hidden PowerShell host for particular executables. This is not universal: on a Windows PowerShell 5.1 local probe (October 20, 2026),
cmd.exe /d /c echo NATIVE_CMD_24,git.exe --version, andnode.exe --versionall produced captured stdout. That probe does not reproduce or refute the originalgh.exe/where.exefailure on its host. Preferrun_program(direct exec) when you need native arguments, exit status and stdout/stderr independent of PowerShell pipeline behavior; userun_powershellfor cmdlets and scripts. Validate the specific executable and host before relying on either path.
Typed inputs: run_powershell accepts engine: "pwsh" | "powershell" (Windows; only pwsh elsewhere). An explicit choice selects only that engine and overrides PWSH_MCP_EXE; if it is missing, execution fails without fallback. When engine is omitted and PWSH_MCP_EXE is configured, only that executable is attempted; a missing configured executable fails without fallback. Only when neither is selected does automatic discovery try pwsh, then powershell.exe on Windows (only pwsh on other platforms). runtime_capabilities.availableEngines reports detected named engines, not whether the configured override is runnable. Its result detail.shell reports the actual executable used and detail.version the version when detectable. parameters is an optional named JSON object of strings, finite numbers, booleans, nulls, arrays and nested objects (max 8 levels, 1 MiB serialized UTF-8). Declare matching param($name) in the script. Values are sent on stdin and bound as data, not interpolated into source; the default remains legacy (strict must be requested explicitly). winrm_exec accepts the same parameters and sends them inside its protected stdin payload for remote binding. Never deliberately print secrets: emitted output may enter results or opt-in output logs.
run_program accepts optional UTF-8 stdin (at most 1 MiB bytes, not characters). An empty string opens the pipe and sends EOF; omitted stdin inherits no pipe. The child receives no input in argv/environment or telemetry, and stdin is not captured in logs. Oversize is rejected before child launch; Node stream writes respect backpressure, and early exit, timeout and pipe errors are handled without unhandled stream errors. Do not send secrets to programs that echo them.
run_powershell defaults to legacy raw -Command semantics. Opt into
errorPolicy: "strict" to parse the script before execution and report unhandled
PowerShell ErrorRecords as script_error. Strict sets command-level default
-ErrorAction Stop, so an unhandled Write-Error stops subsequent commands;
explicit -ErrorAction Continue still continues (and reports an error), while
-ErrorAction SilentlyContinue suppresses that error. Handled try/catch
exceptions are not failures. Its framed wrapper sends the source over stdin;
script output is retained before failures. Structured diagnostics render only
selected exception messages and metadata, not ErrorRecord source context;
legacy raw output retains the engine's native formatting.
errorRecords contains at most eight summaries (category,
fullyQualifiedErrorId, exceptionType, message), with each field shortened to
256 characters; errorRecordsTruncated flags omitted records/fields. Diagnostics
can contain sensitive user-emitted text; this is bounding, not redaction.
The strict wrapper changes script scope and output formatting; choose legacy for
scripts relying on raw exit, argument binding, or stream semantics. A missing or
truncated wrapper envelope is a transport error, never reported as success.
Neither policy proves that every native command succeeded: $LASTEXITCODE only
describes the latest native call, and a later cmdlet does not validate earlier
native calls. Explicitly check immediately after each native command, e.g.
& mytool.exe; if ($LASTEXITCODE -ne 0) { throw "mytool failed: $LASTEXITCODE" }.
Native stderr alone is not failure. Strict retains command-level Stop without
setting global $ErrorActionPreference = 'Stop', which would turn successful
native stderr into a terminating exception on Windows PowerShell 5.1. Redirected
native NativeCommandError records are treated as diagnostic output rather than
script errors; other PowerShell errors still stop by default. For an explicit
native exit code use run_program or check $LASTEXITCODE immediately in the
script. These defaults are not a sandbox: user scripts can override error
preferences and deliberately emit arbitrary content (including secrets) in output
or exception messages. WinRM preserves its legacy remote error policy, while its
structured error output also avoids rendering source context.
Experimental local execution lifecycle
Choose start_execution before launching local work expected to outlast a
synchronous run_program call. run_program defaults to 60 seconds, including
supervisor startup, and accepts an explicit deadline up to 900,000 ms. Silence or
slow startup does not extend that deadline. A timeout can reflect legitimate
duration, input waiting, output backpressure, or a failed program; it is not a
diagnosis by itself. Poll execution_status, page read_execution_output, and
use cancel_execution for long-running work. The durable path accepts executable,
arguments and cwd; it does not accept stdin or provide remote supervision.
Timeouts never automatically rerun a command or migrate it to a durable execution.
Reconcile any ambiguous side effects before submitting a new intent.
start_execution accepts owner (a secret caller-chosen namespace token), idempotencyKey, program, args and optional cwd. It starts a local executable directly, without a shell. execution_status, read_execution_output (base64 byte pages, at most 65,536 bytes) and cancel_execution require the same owner token and opaque execution ID. A repeated owner/key/request returns the same ID; a different request with that key fails. Never retry with a new key after an ambiguous launch. The owner token is a bearer capability, not MCP transport authentication; callers sharing the token can read or cancel one another's executions.
Metadata and output live under POWERSHELL_MCP_EXEC_PARENT/powershell-mcp-executions or the private temporary parent. The dedicated directory is restricted to the current Windows SID and SYSTEM (or POSIX mode 0700); records contain request hashes, not raw arguments or scripts. Output can contain secrets; quota is 8 MiB combined per execution and at most 64 retained executions. No encryption or automatic retention cleanup is provided: archive/delete the dedicated store only when no execution is active, and never clear idempotency history if duplicate side effects would be unsafe. Do not point the parent at a shared/untrusted location.
Disconnecting an MCP client does not cancel a durable execution while the server lives. After MCP restart, crash or OS reboot, a new server preserves valid completed records/output and returns unknown for any previously running/reserved run. It never adopts a stored PID, infers ownership from PID liveness, signals an old process or automatically relaunches an ambiguous request. Reusing the same owner/key/request returns the same ID even when unknown; conflicting requests fail. Invalid metadata and missing or length-mismatched output recover conservatively; a surviving key reservation prevents replay even without readable metadata. Output content has no independent integrity checksum. Keep the store on persistent local storage if handles must survive a reboot: an OS-cleaned temporary directory cannot provide that contract.
This specifies reboot reconciliation without asserting a real reboot or power-loss test. File fsync and atomic metadata rename provide process-restart recovery; they do not establish crash consistency of directory entries or hardware power-loss durability (especially on Windows). If the entire store/idempotency history is lost, duplicate prevention across that loss cannot be guaranteed; reconcile side effects externally before submitting anything again.
All local production callers (run_program, legacy/strict run_powershell, the local WinRM host and the durable lifecycle) use the same private supervisor channel. Windows 10 1703+/Server 1709+ launches suspended into a non-breakaway Job Object with Desktop Bridge child breakaway disabled (including Store-installed PowerShell) and retains native handles; cancellation requires zero active job processes before proof. Job close also requests tree cleanup. Linux requires pwsh and a kernel supporting subreapers and pidfds (Linux 5.3+); the supervisor adopts orphan descendants, including processes which detach into another session, and signals through pidfds only after checking direct-child ownership. Unsupported supervision fails closed. Neither platform uses bare-PID taskkill or a negative-PID group kill. Parent/child/grandchild exits must all be established before durable cancelled. Cancellation is requested once, cleanup has a four-second native deadline and a six-second caller bound; failed/absent proof returns unknown and does not trigger relaunch or repeated cancellation. The deadline bounds the local wait, not the termination of an inaccessible process.
Persisted output uses bounded streaming (8 MiB combined), without raw spool files. SSH/WinRM remote supervision remains unsupported: timeout, local-host exit, connection refusal and authorization denial never establish that a remote process stopped. terminationCertainty stays unknown for every WinRM/SSH result. These paths do not automatically retry commands. Commands with side effects require independent reconciliation before a new idempotency key is used.
See it work
Real calls, real output — headless, no console window, structured results:
# ssh_exec — run a command on a Linux box, in-process (no ssh.exe, no WSL)
> ssh_exec host=192.168.0.5 username=isak command="uptime; systemctl is-active app"
$ ssh isak@192.168.0.5 (exit=0, 818ms)
2 days, 23:53, load average: 0.00, 0.01, 0.04
active
# sftp_upload — deploy a file, in-process (no scp.exe)
> sftp_upload localPath=C:\deploy\app.py remotePath=/home/isak/app.py host=192.168.0.5 ...
sftp upload: C:\deploy\app.py → isak@192.168.0.5:/home/isak/app.py
OK (9129 bytes, 714ms)
Remote operations
powershell-mcp supports SSH in-process, without depending on a native SSH executable or a windowed console. The historical native-output issue is described above; native stdout capture varies by executable and environment:
ssh_execuses the pure-JSssh2client (no external binary), so it works headless and needs nothing on the target beyond an SSH server. Ideal for Linux hosts.winrm_execuses native PowerShell Remoting, so a Windows fleet needs only WinRM enabled — no per-server install.
powershell MCP questions
How do I add powershell MCP to Claude Code?
Run claude mcp add powershell-mcp -- npx -y @imrrd/powershell-mcp in your terminal. Add --scope user to make it available in every project.
How do I add powershell MCP to Cursor?
Open ~/.cursor/mcp.json and add the server under mcpServers, using the Cursor config shown in the install section above.
What tools does powershell MCP provide?
It exposes 20 tools, including run_powershell, list_services, get_service, control_service, system_info.
Does running commands via this server interrupt my typing?
No, the server runs everything in a hidden process so it does not steal focus or spawn visible console windows.
Can I run commands on remote Windows hosts without an SSH server?
Yes, you can use the winrm_exec tool to run commands on remote Windows hosts via PowerShell Remoting (WinRM) without needing an SSH server or agent.
How does the server handle long-running commands?
The server enforces hard timeouts with a tree-kill mechanism to prevent runaway processes from flooding the context.