agy-cpt-use-mcp.sou
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.
Why agy-cpt-use-mcp.sou?
Most computer-use agents break down in real Windows workflows for six concrete reasons:
They hijack your machine mid-call or mid-chat — clicking over your Google Meet/Zoom call, personal Messenger/Zalo chat, or banking tab while you're actively using your PC.
They lose your browser logins — spawning an empty Playwright Chromium instance with zero cookies, failing on Gmail, internal portals, e-tax, or SaaS dashboards.
They mangle Vietnamese & IME input — typing through UniKey/EVKey Telex hooks turns
oointoôandwintoưinside DirectX/game search boxes or custom inputs.They click shifted pixels on scaled displays —
PrintWindowDPI padding on125%/150%laptops and window movement cause coordinate drift after every screenshot.They burn turns on Canvas & Games — forcing an LLM screenshot round-trip just to read one dropdown label or click through 15–45 repetitive items.
They repeat expensive LLM loops forever — re-running deterministic multi-step exports or forms from scratch instead of replaying a verified local macro.
agy-cpt-use-mcp.sou solves all six in a single pure-stdio JSON-RPC 2.0 MCP server (32 tools total: 31 universal tools for Claude Desktop, Cursor, Windsurf, or any stdio MCP client, plus app_browser as a built-in extension for the Antigravity IDE).
Related MCP server: atomic-computer-mcp
How It Compares
Capability |
| Screenshot-Only Computer Use | Playwright-Only Browser MCP | Basic UIA Wrappers |
Windows UIA + | Single-IPC | None (blind pixel clicking) | Browser DOM only | Per-property IPC (~7x calls) |
Logged-in Chrome/Edge (no mouse hijack) | MV3 Chrome Bridge ( | Steals physical mouse/keyboard | Isolated fresh profile (logged out) | Foreground UIA only |
Privacy & call protection | Auto-tags | Clicks anything on screen | N/A | None |
Hardware panic abort |
| Wait for model timeout | N/A | None |
IME / UniKey / DirectX typing | Auto clipboard-restore + | Mangled Telex keys | Browser only | Standard |
DPI & Canvas / Game Vision | Auto-fixes | Full-screen re-screenshots | N/A | None |
Repetitive & Zero-Token Replay |
| Full LLM loop every run | Scripted tests only | Manual Python scripts |
Architecture
flowchart TB
Client["MCP Client (Claude Desktop / Cursor / Windsurf / Antigravity)"] <-->|"Stdio JSON-RPC 2.0"| Server["agy_computer_use_mcp.py (v6.3.0 - 32 Tools)"]
Server --> Desktop["Win32 & UIA Engine (cu_helpers.py + agy_screen_overlay.py)"]
Server --> Vision["Vision & WinRT OCR (Windows.Media.Ocr + SoM + 3-Tier Grid)"]
Server --> Bridge["Agy Chrome Bridge (MV3 Extension + Native Host)"]
Server --> Replay["Macros & Local Batch (macro JSON/Python + BatchSession)"]
Server -.->|"Antigravity IDE bonus"| AppPane["Antigravity Built-In Browser (app_browser via DevTools)"]
Desktop -->|"SendInput + UIA CacheRequest + ESC Guard"| WinApps["Desktop Apps & Canvas/Games"]
Vision -->|"Text + @(cx,cy) in TextContent"| Client
Bridge -->|"127.0.0.1 Token TCP <-> Native Messaging"| Chrome["User's Logged-In Chrome / Edge"]Highlight: Bundled Agy Chrome Bridge Extension — Zero Mouse Hijack, Zero Tab Stealing
Most browser MCP servers force an ugly trade-off: either spawn a fresh, logged-out Playwright Chromium browser, or hijack your mouse/active window via desktop clicks. agy-cpt-use-mcp.sou bundles the full Agy Chrome Bridge MV3 extension + Native Messaging host right in the repo (extension & host docs):
Zero Mouse & Keyboard Hijacking: Actions run completely in background tabs via
chrome.debugger+ a local127.0.0.1token-authenticated Native Messaging relay (agy_chrome_host.py). Your cursor and keyboard never get pulled away while the AI reads pages, clicks, uploads files, or inspects network/console logs.Zero Tab & Window Stealing: Never hijacks your active
[USER_HERE]tab. Whenever[CALLING],[AUDIBLE],[PRIVATE_CHAT], or[BANKING]tabs exist (ornew_window=true),chrome_browser(action="open")automatically opens or reuses a dedicated background Chrome window ([AGENT_WIN],focused: false) and preserves your current window focus — meaning no stray tabs and no debugging banner over your main browser window.Respects
F12DevTools & User Layout: Refuses to steal tabs where you already attachedF12DevTools, blocksviewport/deviceemulation on non-[AGENT_WIN]user tabs unlessforce=true, and cleanly removes Chrome's debug bar onaction="done"(plus 120s idle auto-detach).Works With Your Real Logins + Modern SPAs: Uses your already-logged-in Gmail, Zalo, tax/public portals, and internal dashboards, while piercing same-origin iframes, cross-origin OOPIF frames, open Shadow DOM, and React-controlled inputs — surviving MV3 service-worker sleeps via
syncAttachedFromTargets+chrome.storage.session.
Quick Start (60 Seconds)
1. Clone & Install Dependencies
Requires Windows 10/11 and Python 3.10+.
git clone https://github.com/athsou/agy-cpt-use-mcp.sou.git
cd agy-cpt-use-mcp.sou
python -m venv .venv
.venv\Scripts\Activate.ps1
pip install -r requirements.txtOptional: Only install Playwright (
pip install playwright+playwright install chromium) if you also plan to usecdp_action/cdp_list_tabsagainst a separate--remote-debugging-portChrome instance. Core desktop UIA, OCR, overlay, macros, and the MV3 Chrome Bridge do not require Playwright.
2. Add to Your MCP Client
Point your MCP client to your virtual environment's python.exe (recommended) and src/agy_computer_use_mcp.py. Ready-to-copy templates live in examples/.
{
"mcpServers": {
"agy-computer-use": {
"command": "C:/path/to/agy-cpt-use-mcp.sou/.venv/Scripts/python.exe",
"args": [
"C:/path/to/agy-cpt-use-mcp.sou/src/agy_computer_use_mcp.py"
]
}
}
}Config file locations:
Claude Desktop:
%APPDATA%\Claude\claude_desktop_config.json(seeexamples/mcp_config.claude_desktop.json)Cursor:
.cursor/mcp.jsonor%USERPROFILE%\.cursor\mcp.json(seeexamples/mcp_config.cursor.json)Antigravity:
%USERPROFILE%\.gemini\antigravity\mcp_config.json(seeexamples/mcp_config.antigravity.json)
3. Enable Logged-In Chrome / Edge Automation (Optional, 2 Steps)
Want the agent to work in background tabs inside your real, already-logged-in Chrome or Edge without stealing your mouse or keyboard?
Step A — Register the Native Messaging Host & generate a local extension key:
.venv\Scripts\python.exe chrome-bridge\install.pyRunning install.py first generates a fresh local RSA public key in chrome-bridge/extension/manifest.json (giving the unpacked extension a deterministic ID on your PC) and registers agy.chrome.bridge in HKCU\Software\Google\Chrome\NativeMessagingHosts and HKCU\Software\Microsoft\Edge\NativeMessagingHosts.
Step B — Load the unpacked extension once:
Open
chrome://extensions(oredge://extensions)Enable Developer mode
Click Load unpacked and select
<repo>\chrome-bridge\extension
Tip: If you update
background.jslater, click Reload once on the extension card inchrome://extensions.
4. Optional: Agent Playbook Skill
If your agent supports SKILL.md playbooks (such as Antigravity or skill-compatible clients), copy skills/agy-computer-use/SKILL.md to teach the model the optimal observe -> act -> verify loop, WinRT OCR shortcuts, and safety rules.
Human-First Safety & Privacy Guardrails
Automation should never feel dangerous or intrusive. Every action passes through built-in runtime guards:
Tag / Mechanism | What It Protects | Runtime Behavior |
| Active Google Meet, Zoom, Teams, Messenger/Zalo/Discord calls | Blocks clicks, typing, focus steals, and tab attachment |
| Banking & payment portals / desktop finance apps | Blocks interaction by default unless user explicitly passes |
| Messenger, Zalo, Telegram, WhatsApp, Discord chats | Refuses to interrupt foreground chat or attach without explicit override |
| Tabs playing audio or video | Auto-isolates new agent browser tabs into |
| Webmail & desktop mail clients ( | Tagged clearly in window and tab listings |
| Elevated UAC/administrator processes (UIPI boundary) | Warns before failing on OS UIPI instead of silently misfiring |
| Human presence detected via | Refuses to yank focus while you are actively typing/moving the mouse |
Click-Through Overlay + | Physical emergency stop |
|
Scoped Call Exception | Running a separate app while on a call |
|
Host & Hotkey Locks | Accidental typing in your IDE/terminal or dangerous combos | Refuses stray keyboard input without |
Canvas, Games & High-Speed Vision
When Windows UI Automation returns 0 elements (DirectX/Unity/canvas apps, games, custom-drawn UIs), agy-cpt-use-mcp.sou switches seamlessly to high-precision visual tools:
3-Tier Pixel Coordinate Grid & Live
shot_idTracking:capture_window(hwnd, include_som=true)automatically draws a labeled100px/50px/25pxruler when UIA finds 0 controls. Passingshot_idtoclick_screen,drag, orscrollmaps image pixels to live post-focusHWNDbounds automatically — no scale math for the LLM.PrintWindowDPI-Pad Auto-Fix: Automatically detects and crops DPI-unaware black borders on125%/150%scaled monitors so captured surfaces align 1:1 with physical clicks.Zero-Extra-Turn Local WinRT OCR (
~20ms): Passocr=true,ocr_region=[x1, y1, x2, y2], orocr_query="Confirm"tocapture_window,take_screenshot, ordesktop_batch(ocr_after=true). A persistent localWindows.Media.Ocrworker returns"Label" @(cx, cy)click coordinates directly inTextContent— eliminating extra image-read turns.1-Call
desktop_batch: Chain up to 25 steps (click,click_element,click_ocr,wait_ocr,set_value,type,hotkey,key_event,drag,scroll,wait,capture) withref_size=[w, h]auto-scaling andmethod="unicode"+clear_backspaces+focus_delay_msfor IME/DirectX-resistant inputs.Local
cu_batch_runner.BatchSession: For>= 5repetitive canvas/game items, run a local Python script (seeexamples/batch_runner_example.py) with target-window lock and<50mshardwareESCabort:
from cu_batch_runner import BatchSession
with BatchSession(hwnd=target_hwnd, ref_size=(1280, 720)) as session:
session.click(220, 140, wait_ms=250)
session.scroll_until_ocr(
"Target Option",
region=[180, 160, 460, 440],
scroll_xy=(320, 300),
click_match=True,
)
session.type_text("Exact Query", method="unicode", clear_backspaces=16, focus_delay_ms=150)Zero-Token Macros (record -> parameterize -> replay)
Automate repeatable forms, exports, and browser workflows once — then replay them deterministically without LLM tokens in the loop:
Record:
macro(action="start", name="monthly_export")— records desktop UIA + browser input actions (resolving transient#Nrefs into durable selectors/automation IDs).Parameterize & Protect Secrets:
macro(action="stop", params={"client": "Acme Corp"})— turns matching inputs/URLs/selectors into{{client}}, and automatically redacts password fields as{{password}}(passwords are never written to disk).Replay or Export:
macro(action="play", name="monthly_export", params={"client": "Globex"})(supportsdry_run=true,from_step,to_step)macro(action="export_python", name="monthly_export")— emits an editable standalone Python script callingcu.handle_tool_call.
Complete 32-Tool Reference
Compatibility note: 31 tools work universally with any stdio MCP client (Claude Desktop, Cursor, Windsurf, custom agents). Tool #30 (
app_browser) targets the Antigravity IDE right-hand browser pane viaDevToolsActivePortand is safely isolated if you use another host.
1. Window Management & Safety Overlay (7)
Tool | Description |
| Show click-through cyan border & banner on the target monitor, arm hardware |
| Hide the screen overlay indicator. |
| List visible top-level windows with |
| Open an app by alias ( |
| Inspect active |
| Focus a window by |
| Sleep up to 30 seconds with interruptible |
2. Windows UI Automation & Elements (6)
Tool | Description |
| Fast |
| Detailed text-only UIA tree walker with |
| Click by |
| Replace field/combo contents via UIA |
| Poll until an element matching |
| Read full plain text of a web page, document, editor, or element ( |
3. Input & Batch Desktop/Canvas Execution (8)
Tool | Description |
| Verified-focus typing with UniKey/EVKey-safe clipboard restore ( |
| Send key combinations ( |
| Press/hold/release a key ( |
| Move cursor in physical screen pixels or |
| Click ( |
| Smooth mouse drag from |
| Scroll wheel ( |
| Execute 1–25 desktop/canvas steps ( |
4. Vision, Screenshots & Local OCR (2)
Tool | Description |
| Background-safe |
| Full virtual desktop capture or |
5. Browser Automation (8)
Tool | Description |
| Drive the user's logged-in Chrome/Edge in background tabs via Agy Chrome Bridge ( |
| (Antigravity IDE bonus) Same rich DOM/screenshot/network toolset inside Antigravity's right-hand built-in browser pane. |
| Read URL and title of the active Chrome/Edge window via UIA (no screenshot). |
| Open a new browser tab ( |
| Navigate the active browser tab via address bar ( |
| Close the active browser tab ( |
| List tabs on a |
| Execute DOM actions + console/network capture over Playwright CDP debug port. |
6. Record & Replay Macros (1)
Tool | Description |
|
|
Environment Variables
Variable | Default | Purpose |
| Unset (all allowed except guarded apps) | Comma-separated window title substrings restricting all input actions |
|
| Human activity threshold in ms before tagging |
| Empty | Isolate overlay lock/abort flags per agent session (max 24 chars) |
|
| Debug port used by |
|
| Profile directory when |
|
| Directory for Chrome Bridge discovery metadata & session files |
|
| Directory where recorded JSON macros are saved |
|
| Rotating JSONL action log path |
Running Tests
# Upgrade & macro-to-Python unit tests
python tests/test_computer_use_upgrades.py
# Deterministic CI suite (syntax, stdio MCP JSON-RPC, schema checks, unit & mock tests)
python tests/test_computer_use.py --ci
# Full local Windows desktop suite (adds Win32 Notepad tests + 1.2s overlay smoke test)
python tests/test_computer_use.pyContributing & Security
Read CONTRIBUTING.md before opening a pull request.
Read SECURITY.md for details on the built-in safety architecture and private vulnerability reporting.
License
Licensed under the MIT License — Copyright (c) 2026 Sou (@athsou).
Crafted by Sou (@athsou) · sou.io.vn
If agy-cpt-use-mcp.sou saved you hours of brittle UI scripting, consider giving the repo a ⭐ Star or citing it via CITATION.cff!
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
Browser automation MCP for whole web tasks in a cloud browser: saved logins, bot checks, replays.
Build and run AI workflows, agents, data tables and 1000+ API integrations from any MCP client.
Build and run automations across 2,300+ apps and build app integrations from any MCP client.
Turn any work into an API. Agents use any software through the screen, each on its own desktop.
Related MCP Servers
- AlicenseNot gradedqualityDmaintenanceEnables AI clients to automate Windows desktop applications through window manipulation, image recognition, OCR, keyboard/mouse simulation, and memory operations via the MCP protocol.MIT
- FlicenseNot gradedqualityDmaintenanceEnables automation of native Windows desktop applications through screen capture, mouse/keyboard control, and waiting for UI changes, exposing them as MCP tools.1-
- AlicenseBqualityCmaintenanceMCP server for Windows computer use, providing low-token, low-latency automation through UIA/Win32, OCR, and vision. It enables batch actions, shortcuts, isolated desktop execution, and browser control via MCP tools.133MIT
- AlicenseNot gradedqualityCmaintenanceEnables AI agents to perform deterministic Windows desktop and browser automation through MCP, using pre-validated UI Automation and DOM locators for fast, stable execution of ERP and business workflows.1MIT