winrdp-mcp
Click on "Deploy Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@winrdp-mcpProvision a new Windows Server 2022 box and run a security audit"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
winrdp-mcp
A zero-config MCP server that provisions and fully administers any Windows RDP box — Windows 10/11 and Server 2016–2025 — for Claude and Claude Code.
You give it a host and admin credentials. It makes the box remotely manageable by itself — turning on WinRM, opening the Windows firewall, and fixing local-admin token filtering — regardless of the box's starting state or Windows version. Claude then gets 144 tools: shell, files, registry, services, processes, scheduled tasks, users, firewall, event logs, software, networking, live RDP control, screenshots, GUI automation, real UAC elevation, one-call health/security reports, and on-demand tool staging — plus 5 guided workflows (prompts) and live host resources.
Nothing is pre-installed on the target. The controller reaches boxes over WinRM / SSH / SMB from wherever Claude Code runs, and manages one box or a whole fleet from a single server.
Why it's different
Zero-config provisioning.
provision_hostclimbs a ladder — WinRM → SSH → SMB/WMI cold-start → paste-once bootstrap — and makes a fresh, locked-down box manageable with no manual WinRM setup.Real UAC / elevation, not "please run as admin." Over WinRM a local admin gets a high-integrity full token and elevated ops run directly; a filtered token falls back to a one-shot
SYSTEMScheduled Task.as_user=Trueruns inside the interactive RDP desktop.144 tools across 15 modules, every one with
readOnlyHint/destructiveHintsafety annotations so MCP clients can gate destructive actions automatically. Narrow the surface to a focused set with a tool profile (WINRDP_PROFILE=admin|rdp|core).Guided workflows & live context. 5 MCP prompts (
provision_and_harden,diagnose_box,security_audit,setup_dev_box,open_service_locally) turn a whole operation into one click, and resources (winrdp://hosts,winrdp://host/{alias}/info) hand the model the inventory and a live box summary without spending a tool call.On-demand code execution.
run_pythonfinds or installs Python, pip-installs deps, runs your code, and cleans up — same for Node, PowerShell, cmd, and batch.stage_toolpulls Sysinternals (or any URL/local file) onto the box mid-task.Native GUI automation. Drive the interactive RDP desktop — keystrokes, mouse, and UI Automation (find/click/read controls by name) — plus live screenshots, with no on-box agent.
One-call ops.
health_report(OS/CPU/RAM/disk/services/errors/updates/Defender in one read),apply_baseline(high-perf power plan, no sleep, long paths),whoami_priv,failed_logons,list_open_ports.First-class RDP and an encrypted multi-host inventory (Fernet) with tags and parallel fan-out across the fleet.
Two modes, one package
Mode | Command | Runs where | Reaches the box via |
Controller (default) |
| wherever Claude Code lives | WinRM / SSH / SMB+DCOM |
Agent |
| on the box itself | local PowerShell |
Both build the same server; python -m winrdp_mcp serve is equivalent to the console script.
Table of contents
Related MCP server: Audit Bridge MCP
Quick start
1. Install
Python 3.10+ on the operator machine (Windows, macOS, or Linux). Targets are Windows.
pipx install winrdp-mcp # isolated, recommended — gives you the `winrdp-mcp` command
uvx winrdp-mcp serve # zero-install run via uv
pip install winrdp-mcp # plain pipOptional extras and a local dev checkout:
pip install "winrdp-mcp[bootstrap]" # + impacket, for SMB/WMI cold-start of boxes with WinRM AND SSH off
pip install "winrdp-mcp[agent-ui]" # + on-box interactive-desktop UI agent (click/type/OCR)
pip install -e ".[dev]" # from a checkout of this repo (tests + ruff)Claude Desktop, one click: grab winrdp-mcp.dxt from Releases and open it (Settings → Extensions → Install from file), or build it yourself with pwsh dxt/build.ps1.
2. Register with Claude Code
Drop a project .mcp.json at your repo root:
{
"mcpServers": {
"winrdp": {
"command": "winrdp-mcp",
"args": ["serve"],
"env": { "WINRDP_VAULT_KEY": "change-me", "WINRDP_PROFILE": "full" }
}
}
}Or register from the CLI:
claude mcp add winrdp -- winrdp-mcp serveSet WINRDP_VAULT_KEY to a strong passphrase — it encrypts stored credentials at rest (see Configuration). Set WINRDP_PROFILE to admin, rdp, or core to expose a focused tool set instead of all 144.
3. The 30-second flow
Ask Claude to run these tools (arguments shown inline). Every tool takes an optional host= alias; omit it to hit the active host.
add_host alias="vps1" host="203.0.113.10" username="Administrator" password="…"
provision_host # climbs the ladder → box is now manageable
system_info # OS, build, CPU, RAM, disks, IPs
run_powershell script="Get-Service | Where Status -eq Running"
run_python code="import platform; print(platform.platform())"If the box has only RDP open, provision_host returns a bootstrap_oneliner to paste once into an RDP session — see Preparing a box.
Tool groups
144 tools across fifteen modules. The full catalog — every signature, parameter, default, and safety class — is in docs/TOOLS.md.
Group | Module | # | What it covers |
Hosts & Fleet |
| 8 |
|
Provisioning / UAC / Tooling |
| 10 |
|
System |
| 8 |
|
Scripting |
| 6 |
|
Files |
| 21 | list/read/write/search/upload/download/delete, |
Admin |
| 25 | registry, services ( |
RDP |
| 12 |
|
Software |
| 4 |
|
Network |
| 8 |
|
Windows |
| 11 |
|
GUI |
| 15 | windows/keyboard/mouse ( |
Waiters |
| 4 |
|
Scheduling |
| 4 |
|
Tunnel |
| 3 |
|
Ops |
| 5 |
|
Safety classification across all 144: 49 read-only, 23 destructive, 72 mutating. Read-only tools are safe to auto-run; destructive tools carry destructiveHint=True so clients gate them behind confirmation.
Prompts & resources
Beyond tools, the server exposes MCP prompts (user-invoked, one-click operations that steer the model through the right tool sequence) and resources (bounded read-only context the client can hand the model for free):
Kind | Name | What it does |
Prompt |
| Bring a new box under management and lock it down, step by step |
Prompt |
| Gather health evidence and give a prioritized root-cause summary |
Prompt |
| Read-only posture review → risk-ranked findings + remediations |
Prompt |
| Install runtimes/tools and verify a working dev environment |
Prompt |
| Reach a box's loopback service from your machine over an SSH tunnel |
Resource |
| The registered inventory (passwords redacted) + active host |
Resource |
| A compact live summary of one box (OS, build, CPU/RAM, disks, uptime) |
Tool profiles
WINRDP_PROFILE selects which modules to expose, so the model's tool list stays focused:
Profile | Tools | Includes |
| 144 | everything |
| 117 | systems administration (no GUI/RDP-desktop, no bare tunnel) |
| 104 | RDP + desktop/GUI focus |
| 87 | the essential subset (hosts, provisioning, system, scripting, files, admin, ops, waiters) |
Preparing a box
The controller needs the target reachable on one management transport. In the best case (WinRM already up) provision_host does everything. The only two things you may have to do by hand on a brand-new cloud box are:
Open one management port inbound in the provider firewall / security group (5985 for WinRM-HTTP, or 5986 for HTTPS) — this is outside Windows and winrdp-mcp cannot do it for you.
Turn on a transport once — either paste the enable-WinRM one-liner into an RDP session, or let the SMB/WMI cold-start do it.
Print the paste-once one-liner any time:
winrdp-mcp bootstrap # prints the -EncodedCommand one-liner + the readable scriptFull walkthrough — provider-firewall specifics (AWS/Azure/GCP/Hetzner/…), the cold-start rungs, RDP hardening, verification, and a "new box in 3 minutes" runbook — in docs/PREPARE-SERVER.md.
Key capabilities
Provisioning ladder
provision_host tries the best rung first and stops at the first that works (winrdp_mcp/provision.py):
WinRM (5985/5986) reachable → use it, re-run the idempotent enable script to harden.
SSH (22) reachable → use it, and turn WinRM on over the SSH channel for the richer path.
SMB (445) + DCOM (135) only → stage the enable script over
ADMIN$and trigger it fire-and-forget over WMI ([bootstrap]extra), then switch to WinRM.Nothing but RDP → return a
bootstrap_onelinerto paste once; then everything is remote.
The enable script opens the WinRM firewall rule, flips a Public network profile to Private, and sets LocalAccountTokenFilterPolicy=1 so a non-builtin local admin gets a full token over the network.
Elevated & interactive execution
run_powershell script="Stop-Service W3SVC" elevated=true # full unfiltered token
run_powershell script="Add-Type -AssemblyName System.Windows.Forms; …" as_user=true # interactive RDP desktopOver WinRM a full-token admin runs elevated=True directly (fast path); a filtered token (SSH / non-elevated local) falls back to a one-shot SYSTEM Scheduled Task. as_user=True runs inside the visible desktop session — needed for GUI, clipboard, and screenshots.
Run any script in one call
run_python code="import psutil; print(psutil.cpu_percent())" pip="psutil" # auto-installs Python + psutil
run_script content=<any code> interpreter="auto" # python | node | powershell | cmd | vbscript
run_node code="console.log(process.version)"
ensure_runtime runtime="python" # or "node"run_python with ensure_python=True (default) locates Python or installs it detached (winget → choco → python.org), resolving the concrete python.exe by glob so it works the same session. Long installs run as a Scheduled Task and poll a done-marker, so a mid-install WinRM disconnect doesn't fail them.
Parallel fan-out across the fleet
add_host alias="web1" host="10.20.0.11" username="Administrator" password="…" tags="prod,web"
run_on_hosts script="(Get-CimInstance Win32_OperatingSystem).LastBootUpTime" tag="prod"run_on_hosts runs one script across many boxes concurrently (default max_parallel=8) and returns per-host {stdout, stderr, rc} keyed by alias. Select by aliases (CSV), by tag, or omit both to hit every box.
First-class RDP control
rdp_status # enabled? NLA? port? firewall?
rdp_enable nla=true
rdp_sessions # id / user / state via qwinsta
screenshot # live RDP desktop as a PNG
rdp_open # launch mstsc pre-authenticated (operator = Windows)rdp_connection_file generates a .rdp and stores the password via cmdkey on the operator machine — it is never returned to the model or written into the .rdp file. install_rdp_wrapper enables concurrent sessions on client SKUs.
On-demand tooling
stage_tool source="psexec" # preset (Sysinternals), a URL, or a local file
stage_tool source="https://example.com/tool.exe"
list_staged_tools
cleanup_stagedPresets: psexec, handle, procdump, autoruns, tcpview, pslist, accesschk, sigcheck. Everything caches under C:\ProgramData\winrdp-mcp\tools; URLs and presets download on the box, local files are uploaded.
Configuration
All configuration is via environment variables (set them in the env block of your .mcp.json).
Variable | Purpose |
| Passphrase (or raw Fernet key) that encrypts stored passwords. A passphrase is SHA-256-derived into a key. If unset, a machine-local |
| Override the data directory holding |
|
|
| Tool profile to expose: |
| CSV allowlist — if set, only these tools are registered. |
| CSV blocklist — these tools are skipped (e.g. |
| WinRM per-operation timeout in seconds (default |
Logging goes to stderr only — on the stdio transport, stdout is the MCP JSON-RPC channel. Known secrets are redacted from logs by exact match plus structural patterns.
Security
winrdp-mcp is admin tooling for boxes you own or are authorized to manage. It is a remote code-execution surface by design.
Permissive first contact. Defaults favor zero-setup provisioning:
winrm_cert_validation="ignore"andssh_host_key_policy="auto"(trust-on-first-use). On an untrusted network this allows an on-path attacker to MITM. For production, register withadd_host(..., use_ssl=true, winrm_port=5986, winrm_cert_validation="validate", ssh_host_key_policy="reject")and restrict the firewall to your operator IP.NTLM encrypts the payload over HTTP 5985. The default
winrm_auth="ntlm"seals the message body even without TLS. The enable script deliberately does not turn onBasic/AllowUnencrypted/TrustedHosts=*(0.1.1+) — NTLM needs none of them, and they'd only weaken the box.Secrets on the box are transient.
user_create/service_createstage the new password to an admin-only file read on the box (kept off the process command line / Event 4688);cmdkeystores the RDP password on the operator machine. None are ever returned to the model, and logs redact known secrets.Least privilege. Narrow the tool surface with
WINRDP_ENABLED_TOOLS/WINRDP_DISABLED_TOOLS, and keep destructive-action confirmation on in your client.
Full threat model, credential-vault internals, log redaction, argument-injection defenses, and a hardening checklist: docs/SECURITY.md.
Documentation
Doc | Contents |
Taking a fresh cloud/VDS/dedicated box from locked-down to managed: provider firewalls, cold-start options, RDP hardening, verification, sizing. | |
Running safely at scale: install options, vault, transport hardening, allow/block lists, observability, reliability, fleet management, background-service setup, checklist. | |
Threat model, trust boundary, credential handling, transport/MITM, the enable-WinRM script, argument-injection defense, hardening checklist. | |
Symptom → cause → fix for the failure modes you actually hit (provision failures, connection drops, slow elevation, Python/Node install, SSH banner, 5986 certs, MCP registration). | |
Internal map for contributors: transports → PowerShell marshaling → provisioning → elevation → context → vault → tooling → server assembly. | |
The complete reference for all 144 tools — signatures, parameters, defaults, and safety class. |
Architecture
winrdp-mcp is a FastMCP server: tools call a shared Context that resolves the target host from an encrypted vault, hands the PowerShell body to a cached Transport (WinRM / SSH / Local / SMB+WMI), and marshals delimited JSON back — nothing above the transport layer knows how the command reached the box. Full internals in docs/ARCHITECTURE.md.
Attribution & license
Built on and gratefully crediting two MIT-licensed projects — see NOTICE:
winremote-mcp — basis for the on-box tool surface, the risk-tier model, and the optional
deploy_ui_agentinteractive-desktop path.windows-admin-mcp — basis for the WinRM-primary / SSH-fallback administration approach.
winrdp-mcp's own additions: the zero-config provisioning ladder, real UAC/elevation via one-shot Scheduled Tasks, on-demand tool staging, the encrypted multi-host inventory, and first-class RDP control.
This server cannot be deployed
Maintenance
Related MCP Connectors
Read-only MCP access to a documented IT fleet: state, changes, posture. 15 tools.
Hosted MCP catalog with 30 tenant-isolated browser, RAG, AI, mail and media tools.
A paid remote MCP for ClawManager, built to return verdicts, receipts, usage logs, and audit-ready J
Self-hosted MCP server: 26 deterministic dev, security, and EVM tools.
Related MCP Servers
- AlicenseNot gradedqualityCmaintenanceEnables AI agents to perform extensive Windows system administration, file operations, process management, network configuration, registry editing, GUI automation, and more through a comprehensive set of MCP tools.1MIT
- FlicenseNot gradedqualityDmaintenanceMCP server for orchestrating Windows system auditing tools, supporting system checks, configuration adjustments, and security operations via a standardized interface.-
- AlicenseNot gradedqualityAmaintenanceA Windows MCP server for remote administration over WinRM/NTLM, enabling management of files, services, registry, events, certificates, processes, network, and more on AD-joined Windows hosts from MCP clients.1MIT
- AlicenseNot gradedqualityAmaintenanceEnables AI clients to securely control and interact with a local Windows machine through 218 configurable tools for files, Git, processes, Windows UI, browser automation, WSL, Office, recovery, skills, and child MCP servers.5 npmMIT