cua-ag-bridge
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.
cua-ag-bridge
A lightweight Windows stdio MCP proxy over cua-driver built specifically to eliminate desktop-automation latency bottlenecks in Google Antigravity (and other MCP hosts with small inline payload caps or missing structuredContent rendering).
Why This Exists
Profiling real multi-step Windows desktop automation sessions (e.g., driving wxWidgets / wxWindowNR apps like Bambu Studio on high-DPI displays) revealed that >90% of wall-clock latency is not cua-driver execution—it is avoidable LLM round-trips caused by four integration gaps:
Antigravity's ~10 KB MCP Inline Payload Cap: Any MCP
ImageContent> 10,000 bytes is offloaded tomedia_0.png, forcing a mandatory second LLM turn (read_file) every time the agent looks at the screen.Stripped MCP
structuredContent:cua-driverplaceselements[].screenshot_frame,capture_id,window_bounds, cursor state, and action metadata in MCP 2025-06-18structuredContent, which Antigravity drops—leavingget_window_state({tree_format: "elements"})returning only a placeholder string.Custom-Toolkit Blind Spots (
wxWindowNR/ Qt / CAD): Custom buttons show up as unnamed UIA nodes (Button [id=...]), silently drop backgroundPostMessageclicks, and lose transientWS_POPUPdropdowns whenclick({delivery_mode: "foreground"})immediately restores the prior foreground window (and per-HWNDPrintWindowomits siblingWS_POPUPoverlays).Default 600 ms Cursor Glide Floor (
steady):cua-driver's defaultsteadycursor timing adds ~750 ms per pointer move; switching tofixed50 ms glide cuts cursor overhead 6× (~125 ms/move).
Related MCP server: Computer Use MCP
Architecture
flowchart LR
AG["Google Antigravity (10 KB inline cap, drops structuredContent)"] <-->|stdio MCP| BR["cua-ag-bridge (bridge.py)"]
BR <-->|single shared stdio runtime| CD["cua-driver.exe mcp --cursor-reduced-motion on"]
BR <-->|resident ~80ms warm| OCR["Windows WinRT OCR (ocr_worker.ps1)"]
BR <-->|Pillow <= 9.6 KB| IMG["Sub-10KB Inline JPEG Tile Encoder"]Because cua-ag-bridge wraps a single shared cua-driver.exe mcp child process, all 60+ native cua-driver tools and the 3 bridge super-tools share the exact same sessions, snapshot_ids, element_tokens, capture_ids, and zoom contexts—with zero duplicate tools or orphan daemons.
Features & Bridge Super-Tools
Transparent Improvements on All cua-driver Tools
Automatic
structuredContentFlattening: Renderselements[].screenshot_framecentroids@(cx,cy),capture_id,window_bounds, cursor state, and actionroute/effect/escalation/next_callmetadata directly into plain MCP text.Auto-Fast Cursor Motion: Automatically injects
{timing: "fixed", glide_duration_ms: 50, dwell_after_click_ms: 0}intostart_sessioncalls whencursor_motionis omitted (disable withCUA_BRIDGE_FAST_CURSOR=0).Fast Path Enabled by Default: Seeds
CUA_DRIVER_FAST_PATH=onand--cursor-reduced-motion onon the childcua-driverprocess.
3 Added Super-Tools
Tool | Purpose | Turns / Latency |
| Merges | 1 turn (~220 ms total; ~80 ms warm OCR) |
| Crops | 1 turn (~40 ms, zero |
| Calls | 1 turn atomic foreground batch |
Quick Start (Windows)
Prerequisites
Windows 10 / 11 (uses built-in
Windows.Media.Ocrvia Windows PowerShell 5.1)Python 3.9+ with Pillow:
pip install -r requirements.txtcua-driverinstalled (cua-driver.exeonPATHor in%LOCALAPPDATA%\Programs\Cua\cua-driver\bin\)
1. Clone & Verify
git clone https://github.com/saverchenkov/cua-ag-bridge.git
cd cua-ag-bridge
pip install -r requirements.txt
python test_bridge.py2. Configure Google Antigravity (~/.gemini/config/mcp_config.json)
Replace (or add) your "cua-driver" entry:
{
"mcpServers": {
"cua-driver": {
"command": "python",
"args": [
"C:\\path\\to\\cua-ag-bridge\\bridge.py"
],
"env": {
"PYTHONUTF8": "1",
"CUA_DRIVER_FAST_PATH": "on",
"CUA_DRIVER_ARGS": "mcp --cursor-reduced-motion on",
"CUA_BRIDGE_FAST_CURSOR": "1"
}
}
}
}(Tip: Use the full path to python.exe, e.g. C:\\Python\\Python39\\python.exe, and optionally set CUA_DRIVER_EXE if cua-driver.exe is in a custom location.)
3. Install the Recommended Agent Rule (Optional)
Copy rules/cua-driver-antigravity.md into ~/.agents/rules/ so your agents default to run_steps, inspect_window_hybrid, peek_region, and foreground_tx.
Also note: if cua-driver skills install created a Windows symlink at ~/.agents/skills/cua-driver, replacing that symlink with a real directory copy ensures Antigravity discovers the bundled cua-driver skill docs.
Environment Variables
Variable | Default | Description |
| Auto-discovered ( | Explicit path to |
|
| Space-separated args passed to |
|
| Passed through to |
|
| Set to |
Rollback
To bypass cua-ag-bridge and run cua-driver.exe directly, point "cua-driver" in ~/.gemini/config/mcp_config.json back to cua-driver.exe:
"cua-driver": {
"command": "cua-driver.exe",
"args": ["mcp", "--cursor-reduced-motion", "on"],
"env": { "CUA_DRIVER_FAST_PATH": "on" }
}License
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
Windows MCP server for AI agents (WebGL browser QA, MS Office COM, NVENC) via x402 USDC.
Eyes and hands on real Windows PCs — observe, click, type via Glasswarp API.
Let AI see and use your own Windows PC with your permission: screen, apps, mouse and keyboard.
Clean PNG/JPEG screenshots via REST or MCP, with goal-driven multi-step navigation.
Related MCP Servers
- AlicenseAqualityCmaintenanceAllows AI clients to see and control Windows 10/11 desktops via MCP, with screenshots, UI Automation, Chrome CDP, keyboard/mouse, and terminal using semantic element targeting.30MIT
- FlicenseNot gradedqualityDmaintenanceEnables MCP clients to observe and control Windows desktop applications by reading UIA element trees and capturing screenshots, then acting through UIA patterns or synthesized mouse and keyboard input. It runs standalone on an interactive Windows session, without requiring the original host application.1-
- AlicenseNot gradedqualityCmaintenanceEnables an AI client to inspect and control an interactive Windows desktop, including screenshots, mouse and keyboard input, Windows UI Automation, PowerShell commands with managed jobs, and authenticated file uploads/downloads. Connects over remote MCP Streamable HTTP or local stdio without a separate host-side gateway.1Apache 2.0
- AlicenseNot gradedqualityCmaintenanceEnables an MCP host to observe and control Windows desktop applications deterministically: reading UIA control trees, OCR text and pixel diffs, clicking, typing, scrolling and window management, plus verbatim text reading/appending via ValuePattern/TextPattern. Visual judgment is delegated back to the host model's own multimodal context through annotated screenshots, numbered element cards, grid maps and crosshair zoom-ins, so no separate vision model is needed.1AGPL 3.0