winauto-mcp
Click on "Install 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., "@winauto-mcpAttach to the Notepad window and type 'Hello, world!'"
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.
winauto-mcp
MCP server that lets an LLM see and drive any running Windows app: pick a window, screenshot it, read its UI Automation element tree (buttons/menus/ inputs with coordinates), click, type, and press keys. A transparent green outline tracks whichever window is currently attached; red boxes can be drawn on demand to highlight specific elements.
Windows-only. Built and tested against Python 3.12 on Windows 11.
Design
Coordinates: every coordinate a tool accepts or returns (click x/y, element rects, highlight rects) is relative to the attached window's client area — the same pixel space as the image
capture_screenreturns. The server does all client-rect <-> screen-rect translation internally.Hybrid inspection:
capture_screenreturns both an image and a text summary built from the Windows UI Automation (UIA) tree. For native apps (browsers, Win32/WPF/UWP apps) the UIA summary is usually enough to act on by name. For canvas-rendered apps (games, custom-drawn UIs) the UIA tree comes back empty — the calling LLM should read the screenshot directly and pass pixel coordinates toclick.Single active target: one attached window at a time (
attach_windowreplaces whatever was attached before).Input simulation: uses the Win32
SendInputAPI directly (notpyautogui), withKEYEVENTF_UNICODEfor typing — so arbitrary Unicode text (Thai included) types correctly without keycode mapping.DPI awareness: the server calls
SetProcessDpiAwarenessContext(with fallbacks) at startup, before any other Win32/GDI call. Without this, an unaware process gets its coordinates silently scaled to 96 DPI whilemsscaptures true physical pixels — on any scaled display (the common case) click coordinates read off a screenshot would land in the wrong place.Foreground-lock workaround:
attach_windowusesAttachThreadInputto temporarily join input queues with the current foreground window's thread before callingSetForegroundWindow— otherwise Windows silently ignores that call when it comes from a background/automated process (this server).
Related MCP server: helix-pilot
Tools
Tool | Purpose |
| List visible top-level windows (title, process, hwnd) |
| Attach to a window, foreground it, show tracking outline |
| Detach and hide the overlay |
| Screenshot + UIA text summary of the attached window |
| Screenshot only, no UIA tree walk — fast, for re-checking the screen |
| UIA element list only, as JSON (no screenshot) |
| Click at client-relative coordinates; |
| Click a UIA element by visible name (exact, else substring match) |
| Poll until an element matching |
| Type Unicode text into the focused control |
| Press a named special key (enter, tab, escape, arrows, f1-f12, ...) |
| Press a chord together, e.g. |
| Mouse-wheel scroll at client-relative coordinates (positive = up, negative = down) |
| Drag from one point to another -- moves through intermediate points, not a teleport, since many apps only recognize a drag if the mouse visibly moves while held |
| Find exact click coordinates by pixel contrast within a small region -- returns the tight content bbox and its center. Use instead of eyeballing coordinates off a displayed screenshot crop, which has repeatedly been wrong by 50-150+ px (displayed crops can be rescaled in ways that don't map back to real source pixels) |
| Store the current screenshot as a reference point |
| Compare the current screen to the last |
| Save a click target under a semantic label, scoped to the attached process's name + client size |
| Look up a saved label, but only after re-scanning the live screen ( |
| Draw debug boxes on the overlay (visual only) |
Setup
cd F:\tools\winauto-mcp
python -m venv .venv
.venv\Scripts\pip install -r requirements.txtRegister with an MCP client
Claude Desktop / Claude Code mcpServers config:
{
"mcpServers": {
"winauto": {
"command": "F:\\tools\\winauto-mcp\\.venv\\Scripts\\python.exe",
"args": ["F:\\tools\\winauto-mcp\\server.py"]
}
}
}Claude Code CLI:
claude mcp add winauto -- F:\tools\winauto-mcp\.venv\Scripts\python.exe F:\tools\winauto-mcp\server.pyKnown limitations (v0.1)
One attached window at a time.
SendInputis userspace input — most apps and browsers receive it fine, but some DirectInput/XInput-hooked fullscreen games may ignore it.SetForegroundWindow's foreground-lock rejection is mitigated (seeAttachThreadInputnote above) but not guaranteed in every edge case;attach_window/click/type_textdon't hard-fail if it's still refused.UIA tree walk is capped (depth 15 / 3000 nodes / 150 results) to stay fast on deep trees (e.g. Chrome with heavy pages) — very deeply nested elements past the cap won't show up in the text summary.
click_element/wait_formatch by UIAName(exact, then substring, case-insensitive); if multiple elements share a name the first one found in tree order is used — checkget_elementsif you need to disambiguate.Some apps with a custom-drawn title bar (e.g. Windows 11's modern Notepad) report menu items slightly outside
GetClientRect, so their rect's y can be negative — a UIA quirk of that app, not a bug in this server.diff_since_snapshotcan false-positive on apps that redraw part of their own UI continuously with no user input (e.g. a game/tool-script gizmo, blinking cursor, live counter) — confirmed against Godot's editor, whose 2D viewport keeps redrawing a debug hint label for the currently selected node. A nonzerochanged_bboxmeans "something changed," not necessarily "your action caused it" — sanity-check that the bbox's location/size fits the expected effect.The location cache (
remember_location/recall_location) is stored in.location_cache.jsonnext to the server, keyed by process name + client size + label. It is never trusted blind: everyrecall_locationcall re-scans the live screen and compares against the cached bbox before returning a coordinate, so a stale entry (app updated, window resized, target scrolled out of view) is detected and dropped rather than causing a misclick.recall_location's re-verify margin can itself cause a false "stale" report if set too large for the target's surroundings: expanding into a neighboring label/icon merges them into one bigger bbox, which fails the size-ratio check even though the actual target never moved — confirmed against Blender's tightly packed viewport header (View Select Add Object, items only ~15-20px apart). Use a smallmargin(5-10px) for dense menu/toolbar rows; the default (15) assumes moderate spacing.
This server cannot be installed
Maintenance
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
Related MCP Servers
- AlicenseAqualityAmaintenanceWindows desktop automation MCP server — screenshot, mouse, keyboard & UI Automation. Lets LLM agents see and control your Windows desktop directly.306179MIT
- Alicense-qualityCmaintenanceGUI automation MCP server that enables AI agents to see and control the Windows desktop using a local Vision LLM (Ollama), supporting screenshot analysis, mouse/keyboard actions, and autonomous task execution.4MIT
- Alicense-qualityBmaintenanceAn MCP server that gives any AI assistant eyes and hands on your desktop — screenshots, clicking, typing, OCR, window management, accessibility-tree queries, workflow recording.5Apache 2.0
- Alicense-qualityDmaintenanceAn MCP server that enables LLMs to see and control a computer — screen capture, window management, mouse and keyboard automation — with a structured plan-execute workflow for complex desktop automation.GPL 3.0
Related MCP Connectors
Hosted MCP server connecting claude.ai, ChatGPT and other AI apps to your own computer
MCP server for AI dialogue using various LLM models via AceDataCloud
A comprehensive Model Context Protocol (MCP) server that enables AI assistants to interact with yo…
Latest Blog Posts
- Who's Calling? MCP Hosts Are an Identity Blind Spot (And the Spec Knows It)By Om-Shree-0709 on .mcpAgent IdentityOAuth 2.1
- Your AI Chatbot Just Exposed Your CEO's Salary to an InternBy Om-Shree-0709 on .Agent IdentityMCP SecurityOAuth Delegation
- Why MCP Servers Need Execution Sandboxing (And Why Your Current Stack Isn't Enough)By Om-Shree-0709 on .Agentic AiPrompt InjectionWebAssembly
MCP directory API
We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/PingPong2534/winauto-mcp'
If you have feedback or need assistance with the MCP directory API, please join our Discord server