windows-gui
Enables GUI automation of Electron-based desktop applications through Windows UI Automation, OCR, icon matching, and batched input.
Enables GUI automation of Tauri-based desktop applications through Windows UI Automation, OCR, icon matching, and batched input.
Automates the WeChat desktop client using Windows GUI automation, including UIA, OCR, and icon matching for self-drawn Qt5 interfaces.
This server does not currently have a deployable release on Glama. Follow the repository's setup instructions to install and configure it for your MCP client, including any required credentials and local dependencies.
windows-gui is a production-grade Antigravity plugin and standalone MCP server that gives AI agents fast, reliable, semantic-first control over the entire Windows desktop — from standard WinUI/UWP/Tauri/Electron apps and normal logged-in browsers, to zero-UIA self-drawn apps (e.g. WeChat 4.x Qt5, HTML5 <canvas>), Windows 11 OS controls, rich clipboards, and (optionally) elevated Administrator windows.
All 27 MCP tools run with zero GPU, zero OpenCV, zero NumPy, and zero Playwright dependencies — only Python stdlib, Pillow, mcp<2, native Win32/WinRT APIs, and the upstream Rust CLI vercel-labs/agent-desktop (downloaded and SHA-256 verified automatically by scripts/setup.ps1).

Why windows-gui?
Dimension | Pure-VLM Computer Use | OmniParser + SoM | Playwright / Browserbase | Raw Desktop Drivers / RPA |
|
Control Scope | Full desktop (pixel-only) | Full desktop | Browser tabs only | Full desktop (standard integrity) | Full OS + Optional Admin UIPI + Win11 Shell + Rich Clipboard + Opt. CDP |
Perception Routing | 100% raw pixel guessing | Extra GPU YOLO + Caption models | DOM / CDP | UIA tree only (breaks on Qt/Canvas) | 4-Tier Routing: Opt. stdlib CDP → UIA/ |
Execution Latency | 1 step = 1 LLM turn + blind sleep | 1 step = 1 LLM turn + vision pass | Fast inside browser | Cold subprocess per call (500–2000 ms) | In-Process + Warm PS Worker (6–45× faster) + 1-Turn |
CJK IME & Clipboard | Keystrokes break on CJK IME | Same | Native DOM fill | Overwrites user clipboard | UIA |
Privilege Isolation | Blocked by UIPI | Blocked by UIPI | N/A | Blocked by UIPI or leaks admin token | Elevated control plane + Win32 Shell Token Drop (normal apps launch at Medium Integrity) |

Related MCP server: AiPC
Quick Start
Prerequisites
Windows 10 / 11 (x64 or ARM64)
Python 3.10+ available in
PATH(python --version)PowerShell 5.1+ (built into Windows)
1. Install the Plugin or Standalone MCP Server
Option A — Antigravity CLI (Recommended for Antigravity):
agy plugin install https://github.com/ruol1/windows-gui-mcpOption B — Manual Clone (Antigravity App / IDE / Any MCP Client):
git clone https://github.com/ruol1/windows-gui-mcp.git "$env:USERPROFILE\.gemini\config\plugins\windows-gui"2. Run One-Command Setup (Persistent Mode A Default: Deps + agent-desktop.exe + Tray Daemon)
For repository cleanliness and security, the upstream third-party binary
agent-desktop.exeis not committed to Git.scripts/setup.ps1installsmcp<2+Pillow, downloadsv1.3.1directly from officialvercel-labs/agent-desktopGitHub Releases with SHA-256 verification, and configures the persistent local Streamable HTTP daemon (Mode A, recommended) with auto-start at logon, zero battery/timeout throttling, automatic crash recovery, a Start Menu relaunch shortcut, and the minimal system tray icon.
cd "$env:USERPROFILE\.gemini\config\plugins\windows-gui"
# Default (Recommended): Elevated Mode A persistent daemon (one UAC prompt; supports Admin windows + Tray icon)
powershell -ExecutionPolicy Bypass -File .\scripts\setup.ps1
# Optional: Non-UAC persistent Mode A (no UAC prompt; still gets Tray icon & auto-start, skips Admin windows)
powershell -ExecutionPolicy Bypass -File .\scripts\setup.ps1 -Standard
# Optional: Stdio-only Mode B (no background daemon or tray icon)
powershell -ExecutionPolicy Bypass -File .\scripts\setup.ps1 -StdioOnlyListens strictly on
127.0.0.1:18765/mcpwith a 48-character random Bearer token (NTFS ACL-locked to your user +Administrators+SYSTEM) and rejects browserOriginheaders to prevent CSRF.Runs as a native interactive
AtLogOnWindows Scheduled Task with 4 reliability safeguards (AtLogOn,ExecutionTimeLimit=0,DontStopIfGoingOnBatteries,RestartCount=3) and a minimal pure-Win32 system tray icon (one-click disable/enable AI control, Esc/mouse-override toggles, redacted audit log viewer, clean exit + Start Menu relaunch).Even when elevated, auto-launching everyday apps (Chrome, WeChat, Office, UWP) uses Win32
CreateProcessWithTokenWwith the desktop shell token so apps start cleanly at Medium Integrity with zero admin quirks.Restart or enable Windows GUI Automation in Antigravity (Customizations → Installed → MCP Servers). Revert to Stdio mode at any time via
.\scripts\uninstall_elevated_service.ps1.
Using with Any MCP Client (Claude Desktop, Claude Code, Cursor, Codex, Windsurf)
windows-gui-mcp is a 100% standard MCP server — not locked to Antigravity. Connect any MCP client either to the persistent local Streamable HTTP endpoint generated in mcp_config.json (http://127.0.0.1:18765/mcp + Authorization: Bearer <token>), or directly via Stdio:
{
"mcpServers": {
"windows-gui": {
"command": "python",
"args": [
"-X",
"utf8",
"C:/path/to/windows-gui-mcp/skills/windows-gui/scripts/mcp_server.py",
"--transport",
"stdio"
]
}
}
}Tip: Copy
skills/windows-gui/SKILL.mdinto your client's skills/instructions folder so the agent automatically uses the 4-tier routing strategy, macro HUDtasklabels, and app playbooks.
Key Capabilities & Performance Benchmarks
Measured v1.0 Cold vs v2.0 Warm Latency (Windows 11, 2560×1600 @ 150% DPI)
v2.0 executes gui_assist commands in-process (eliminating ~250–350 ms python.exe cold starts), shares a self-healing persistent warm PowerShell JSON-RPC worker (win_worker.ps1 / ps_worker.py), and captures screen regions directly via Win32 GDI BitBlt:
Operation | v1.0 Cold Subprocess | v2.0 Warm / In-Process | Speedup |
Dual-Pass WinRT OCR (47 Chinese lines, normal + white-text mask) | ~1,500–2,000 ms |
| 6.1× – 10× |
Core Audio Master Volume ( | ~800–1,200 ms |
| ~45× |
Process Snapshot ( | ~550 ms |
| ~22× |
WMI Display Brightness ( | ~650 ms |
| ~7× |
Full-Screen 2560×1600 → 1280px JPEG ( | ~450–600 ms |
| ~6× |
Cropped Region Capture (popups / input boxes) | ~400 ms |
| ~30× |
UIA Document Text Extraction (Calculator) |
|
| 2.5× |
Worker Crash Auto-Respawn ( | N/A |
| Zero error |
All 27 MCP Tools (windows-gui_desktop)
Category | Tools | Highlights |
Safety HUD, Tray & Audit |
| Codex-style capture-excluded ( |
Diagnostics & Recovery |
| Verifies |
Window & App Lifecycle |
| EN/ZH app discovery via Registry |
4-Tier Perception |
| Optional stdlib RFC 6455 CDP (Shadow DOM); UIA |
Full Win32 Input |
| 40B x64 |
Waits & 1-Turn Macros |
| Smart waits ( |
OS Controls & Clipboard |
| Localized Win11 shell surfaces, headless WinRT notifications, Core Audio volume, WMI brightness, virtual desktops, keep-awake, processes, multi-monitor; rich clipboard ( |
Verification, Stress Testing & Automated Regression Suite
Every capability in v2.0 has been stress-tested across a zero-UIA / zero-text / paste-blocked HTML5 <canvas> adversarial bench (CanvasLab) and 6 heterogeneous Windows UI stacks (WeChat 4.x Qt 5.15, Codex MSIX/UWP, Clash Verge Tauri/WebView2, Antigravity heavy Electron with 5,000+ nodes, Chrome 158 CDP, and elevated WinUI/Admin apps). See the full report in docs/TEST_REPORT_v2.md.

Run the zero-dependency unittest regression suite anytime (33/33 tests pass in ~13s, including WDA_EXCLUDEFROMCAPTURE continuous multi-turn Task Session HUD & watchdog, smooth cursor glide + pre-click pause, auto focus restore, OS-language localized Win32 tray icon, privacy-redacted audit log rotation, physical vs injected Esc/double_esc/mouse_override hooks, CJK pacing, worker taskkill recovery, and a built-in mock RFC 6455 CDP server):
# Offline unit + integration + worker crash-recovery + mock RFC 6455 CDP tests
python -X utf8 tests/run_tests.py
# Also run live headless Chrome/Edge CDP E2E (open Shadow DOM + CJK Input.insertText)
python -X utf8 tests/run_tests.py --live-cdpSecurity & Human-in-the-Loop (HITL) Boundaries
Loopback-Only & Token-Locked: Both the optional Streamable HTTP daemon (
127.0.0.1:18765) andgui_browser_cdpstrictly enforce loopback hosts (127.0.0.1/localhost/::1) and reject cross-origin browser requests.No Privilege Leakage: Elevated mode launches normal user apps via Win32 Shell Token Drop (
Medium Integrity) and applies 2-step NTFS DACL hardening onAGENT_DESKTOP_HOME.Strict HITL Walls: Bundled agent instructions (
skills/windows-gui/SKILL.md) explicitly prohibit bypassing Windows UAC Secure Desktop prompts, CAPTCHAs, account login/2FA, or payment confirmations — handing control back to the human whenever those walls appear.
License & Acknowledgments
License: MIT License — Copyright (c) 2026 Ye Qiu (
ruol1).Upstream Driver: Built on top of
vercel-labs/agent-desktop(licensed under Apache-2.0), downloaded directly from official releases viascripts/setup.ps1.See CHANGELOG.md for the full v2.0.0 release history.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
This server cannot be deployed
Maintenance
Related MCP Connectors
Let AI see and use your own Windows PC with your permission: screen, apps, mouse and keyboard.
Remote desktop MCP: let AI see, click, type and run terminal commands on your own Windows or Mac.
Let your AI see your screen, click, type and run commands on your own Windows, Mac or Linux PC.
Connect ChatGPT, Claude, Cursor or VS Code to your Windows PC: files, terminal, browser, apps.
Related MCP Servers
- AlicenseNot gradedqualityCmaintenanceEnables comprehensive Windows desktop automation including screen capture, OCR text extraction, mouse/keyboard control, window management, process control, and clipboard operations through 25+ tools for AI agents.37 PyPI8MIT
- AlicenseNot gradedqualityBmaintenanceGives AI agents full control of a Windows computer over MCP through 63 native tools — screenshots and UI trees for vision, mouse/keyboard input, Chrome control via CDP, plus files, terminal, processes, and SSH/SFTP. The agent can look at the screen, click, type, launch apps, run commands, and verify each step with a fresh screenshot.43MIT
- AlicenseNot gradedqualityCmaintenanceEnables MCP-capable AI agents to control Windows desktops through UI Automation element trees, native screenshots, app launching, batched action sequences, smart waits, and safety gates using normalized coordinates.MIT
- AlicenseNot gradedqualityBmaintenanceEnables Windows desktop automation through a unified 29-tool MCP surface combining UI Automation, OCR, browser DOM reading, screenshots, window management, mouse/keyboard control, app launching, and notifications while intercepting dangerous calls.2MIT