An MCP server that lets an AI control your Windows desktop.
Screenshots, mouse, keyboard, window snap/arrange, read UI elements by name
One .exe, ~1 MB. No Python, no Node, no background app.
3 tools, not 15+ — cheaper on every request
Skips resending a screenshot when nothing changed
Token-efficient MCP server for Windows computer use — screenshots, mouse, keyboard, window layout and UI Automation over stdio or cloudflared-safe HTTP.
星數
4
工具
—
可用率
—
Works over stdio (local) or HTTP behind a tunnel (remote)
Works with any MCP client: Claude Code, Codex, ChatGPT, Ollama, etc.
ChatGPT runs in the cloud, so it can't launch a local process — it needs winmcp reachable over HTTPS, and the ChatGPT web UI only supports "No Auth" or OAuth for custom MCP servers — there is no field to enter a bearer token. winmcp doesn't implement OAuth, so the only way to connect it is with no token, behind a tunnel:
⚠️ With no token, anyone who has the tunnel URL has full control of your desktop. Don't skip this: put Cloudflare Access (free) in front of the tunnel so it requires a login before it'll even reach winmcp. winmcp itself will also print a warning on startup when you run it with no token.
In ChatGPT:
Settings → turn on Developer mode
Go to Plugins → click +
Paste the URL: https://<your-tunnel-domain>/mcp
Authentication: No Auth
(This menu has been renamed by OpenAI before — if you don't see "Plugins," look for "Connectors" or "MCP servers" under Settings.)
Ollama-backed agents, and other MCP clients (Hermes, OpenClaw, etc.)
Any framework that speaks MCP takes one of the same two shapes, whatever its config file calls the field:
Local (stdio) — the client launches winmcp itself:
{ "command": "C:\\path\\to\\winmcp.exe" }
Remote (HTTP) — winmcp already running, reachable over the network or a tunnel:
Frameworks like Hermes Agent and OpenClaw both support MCP servers natively; drop one of the two shapes above into their MCP configuration (check their own docs for the exact key names, since these vary) and winmcp shows up as a normal set of tools.
Command-line flags
winmcp [OPTIONS]
--http Serve over HTTP instead of stdio (default: stdio).
--host <ADDR> Bind address in HTTP mode. Default 127.0.0.1.
--port <PORT> Bind port in HTTP mode. Default 7099.
--token <TOKEN> Bearer token for HTTP mode. Also read from WINMCP_TOKEN.
Mandatory once --host is not a loopback address —
winmcp refuses to start without one, rather than
accepting unauthenticated desktop control from the network.
--max-dim <PIXELS> Long edge of a full-desktop screenshot, in model pixels.
Default 1200 — smaller costs fewer tokens, larger keeps
more detail legible without needing `zoom`.
-h, --help Print help.
How it works
Three tools, not thirty
Every extra tool a server exposes is schema that gets re-sent to the model on every single request for the life of the conversation — it's the single biggest fixed cost in an MCP integration. winmcp exposes exactly three:
computer — screenshots, zoom, mouse, keyboard, scrolling. Uses Anthropic's computer_20251124 action vocabulary (left_click, left_click_drag, key, …) verbatim, because models are already trained on it — matching the spelling buys accuracy for free.
ui — reads and drives the Windows accessibility tree (UI Automation). ui find "Save" then ui invoke is cheaper and far more reliable than clicking a pixel: it either presses the named button or reports that it couldn't, where a coordinate click just lands somewhere and calls it success either way.
window — list windows and displays, focus/move/resize/close, snap a window to a half or quarter of a screen, and arrange several windows into side-by-side columns, a grid, or a cascade in one call.
All three schemas together stay under ~1500 tokens, checked by a test that fails the build if that budget grows without a deliberate decision to spend it.
One coordinate space
Every coordinate in or out — screenshots, window rectangles, clicks — lives in a single 0-based "model space" that's a downscaled view of the whole virtual desktop (1200px on the long edge by default). The model never sees a physical pixel or a DPI scale factor to multiply by itself; conversion happens once, at the boundary. This is what a lot of coordinate-based computer-use breaks on — a model doing its own scale arithmetic on a 4K or multi-monitor desktop eventually gets it wrong and clicks somewhere plausible-but-incorrect.
Screenshots are the expensive part, so they're suppressed when nothing changed
An image costs a model roughly width × height / 750 tokens — a raw 4K screenshot is on the order of 11,000 tokens, and an agent typically takes one after nearly every action. winmcp hashes the captured pixels and, when a screenshot is identical to the last one taken of that same target, returns the single word unchanged instead of the image. That one behavior is the largest token saving in the whole server, because it turns the very common "did my click do anything yet?" check from a thousand-token image into a five-token sentence.
Stateless HTTP, because that's what survives a tunnel
The HTTP transport is POST /mcp in, one self-contained JSON response out — no session ID, no server-sent-events stream held open. That's deliberate: it's what passes cleanly through Cloudflare Tunnel, nginx, and any other reverse proxy that buffers a response body or times out an idle connection, because there's nothing long-lived for either to interfere with. A bearer token is mandatory the moment winmcp binds anything other than loopback; it refuses to start otherwise rather than silently accepting unauthenticated desktop control from the network.
Five files
main.rs (entry point, CLI, shared types), desktop.rs (window enumeration/layout + synthetic mouse/keyboard input), vision.rs (screen capture + UI Automation — everything that reads the desktop), protocol.rs (JSON-RPC framing + both transports), tools.rs (the three tool schemas and their dispatch). No SDK, no web framework, no ORM — the whole thing is a single crate on tokio + hyper + windows-rs + serde.
Safety notes
winmcp never touches the network unless you pass --http, and even then it binds 127.0.0.1 unless you explicitly give it a non-loopback --host — which then requires a bearer token.
Ctrl+Alt+Del and Win+L are refused outright: Windows handles both below the input queue, so synthesizing them is either impossible or a lock-screen footgun, and winmcp says so instead of pretending to try.
Input to an elevated (Run as Administrator) window is silently dropped by Windows' own UIPI boundary — winmcp is not elevated, and window list reports which windows are elevated so this is visible rather than a mysterious silent failure.
window close posts WM_CLOSE and lets the application decide, so it can still prompt to save — it does not terminate the process.
Antivirus false positives
A fresh, unsigned .exe that synthesizes input, captures the screen and opens a socket looks a lot like a remote-access tool to a reputation scanner — Avast, Defender and others may flag or quarantine it on first run. This is a known, common false positive for this whole category of legitimate tool (RMM software, remote-desktop clients, automation tools all hit it too), not a sign of anything wrong with the code.
What's already done about it:
The binary carries a real Windows manifest (asInvoker, no elevation, no UI-automation privilege) and version/publisher metadata, which is what most heuristics actually check for.
No packing, obfuscation, or anti-analysis tricks — the fix for a false positive is never to hide what the tool does.
If your AV flags it: build it yourself from source rather than a downloaded binary, add an exclusion for the path once you've verified it, or report it as a false positive to your vendor. The real long-term fix is code-signing release builds with a purchased certificate, which isn't something that can be done from source alone.
Token-efficient MCP server for Windows computer use — screenshots, mouse, keyboard, window layout and UI Automation over stdio or cloudflared-safe HTTP.
上次檢查時間:2026-11-05。 Token-efficient MCP server for Windows computer use — screenshots, mouse, keyboard, window layout and UI Automation over stdio or cloudflared-safe HTTP.