Omni-Desktop-MCP
Windows-first desktop automation MCP server exposing three KV-cache-friendly tools for observing and controlling the desktop.
Observe desktop state with
desktop_observe: list windows, fetch fast COM UIA trees, return incremental tree diffs, run RapidOCR/WinRT hybrid OCR, capture annotated screenshots, use backgroundPrintWindow, template matching, and SoM grids.Perform desktop actions with
desktop_act: click/double-click/right-click, move, drag, scroll, type, press keys/hotkeys, focus/resize/close windows, launch apps, wait for conditions, use clipboard (text/files/images), capture templates, and run/record macros.Use smart hybrid delivery for foreground/background input with zero-focus-steal background operations,
wait_until_stable,find_and_act, retries, conditions, and mergedobserve_afterresults.Inspect and manage the server with
desktop_status: health, safety policy, saved macros, audit logs, guard reset, and snapshot clearing.Operate safely via dangerous-hotkey/command blocklists, protected-system-process blocks, rate limiting, repeat suppression, Esc emergency abort, UIPI fail-closed behavior, and optional HTTP Bearer-token/CIDR auth.
Integrate with clients such as DeepSeek Harness, Antigravity, Codex, Trae CN, and Doubao through stdio or streamable HTTP.
Click on "Deploy 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., "@Omni-Desktop-MCP Open Notepad and type a short meeting note."
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.
Omni-Desktop-MCP
Windows-first desktop automation MCP server — built around COM UIA Tree Diffs, Background PrintWindow Capture, Dual Adaptive OCR (RapidOCR + WinRT), and Hardened Safety Guardrails, exposed through three stable tools (desktop_observe, desktop_act, desktop_status) to keep prompt KV caches intact across DeepSeek Harness (DSH), Antigravity (agy), Codex, Trae CN, and Doubao.
Production Support Scope (Important)
Platform
Production Support
Verification
Windows 10 / 11 (x64)
Supported (Primary Target)
25/25 live Windows benchmark tasks + 20/20 headless CI unit/auth tests + live E2E
macOS
Experimental stub only
Window listing &
screencaptureonly; input actions returnunsupported_on_current_host. Not tested on macOS hardware.Linux
Experimental stub only
Basic
wmctrl/xdotoolwrapper; not tested on a Linux desktop.

Verified Windows Efficiency Benchmark (Reproducible)
All figures below were measured directly on Windows 10/11 across 25 standardized desktop subtasks (benchmarks/run_windows_benchmark.py → benchmarks/results_windows.json), covering a 35-control WinForms app, a DPI-unaware bilingual CN/EN Tkinter window across dual monitors (3840×1200, PerMonitorV2), an always-on-top occluding foreground cover window, and injected fault recovery.

Metric | Measured Result | Scope / Notes |
Task Success Rate | 100.0% (25 / 25) | All 5 categories: UIA & Diff, High-DPI/Multi-Monitor, CN/EN OCR, Obscured Background Ops, Fault Recovery |
UIA Tree Diff Token Savings | 71.4% avg (48.6% – 83.8%) | Full 35-control snapshot ( |
L1 Background Input ( | 5.0 ms (Invoke) · 13.6 ms (Type) | Cached STA COM handles + auto focus preservation even on focus-grabbing WinForms buttons |
Dual-Engine OCR Latency | 0.2 ms (cache hit) · 140.4 ms (WinRT) · 1024.1 ms (RapidOCR warm) | RapidOCR achieves exact CN/EN small-font recognition ( |
Mean Single-Step Latency | 306.1 ms | Average across UIA L1, cross-monitor physical click ( |
Failure Recovery Rate | 100.0% (4 / 4) |
|
Complex Electron / Browser UIA Speedup: On larger accessibility trees outside the 35-control WinForms harness, single-RPC COM
IUIAutomation.FindAllBuildCachemeasured 129.8 ms vs 404.9 ms (3.1×) on Microsoft Edge and 417.1 ms (213 elements) vs 1538.3 ms (truncated at 78, 3.7×) on DeepSeek Harness (Electron).
Reproduce on your own Windows 10/11 desktop:
python benchmarks/run_windows_benchmark.py
python benchmarks/generate_assets.pyRelated MCP server: ORVEX
Core Capabilities
3 Stable Tools (KV-Cache Friendly):
desktop_observe,desktop_act,desktop_status.Fast COM UIA + Incremental Tree Diffs: Single-RPC
IUIAutomation.FindAllBuildCacheon a dedicated STA thread (with BFS fallback) +diff=truereturning only+/~/-changes.Background
PrintWindowCapture (Zero Focus Steal): Reads obscured Windows apps without bringing them to the foreground, with automatic scaling correction for DPI-unaware windows under >100% Windows scaling and black-frame screen fallback.Adaptive Dual-Engine OCR + Frame-Hash Micro-Cache: Offline RapidOCR (
pip install "omni-desktop-mcp[full]") with zero-dependency WinRT OCR (zh-Hans-CN+en-US) fallback.Icon & Canvas Grounding: OpenCV multi-scale icon template matching (
capture_template+template_path, ~15–40 ms), Set-of-Mark (grid=true→target="grid:C4"), localizedzoom_scale, andwait_until_stable.Macro v2 Playbooks & Rich Clipboard: Parameterized JSON playbooks (
{{var}},condition,retries,on_error="continue"), plusCF_HDROPmulti-file andCF_DIBimage clipboard paste (Ctrl+V).Remote HTTP Auth & Rotating JSONL Audit: Streamable HTTP enforces Bearer Token auth + CIDR IP allowlist (
--allow-ips 127.0.0.1,100.64.0.0/10for Tailscale);~/.omni-desktop/audit/actions.jsonllogs actions with typed text length-masked.
Install
# Core (zero-dependency Windows WinRT OCR)
pip install omni-desktop-mcp
# Recommended: full bundle (RapidOCR + OpenCV icon template matching)
pip install "omni-desktop-mcp[full]"Requires Windows 10/11, Python 3.10+, and mcp 2.x (installed automatically along with pywin32 and uiautomation).
Run directly:
# stdio (default for local clients)
omni-desktop-mcp
# Streamable HTTP with Bearer token + Tailscale CIDR allowlist
omni-desktop-mcp --http --host 0.0.0.0 --port 8765 --token YOUR_SECRET --allow-ips 127.0.0.1,100.64.0.0/10Register with Your Clients
omni-desktop-mcp-install # dry-run preview (nothing written)
omni-desktop-mcp-install --apply # backs up existing configs (*.bak-*) before writingSupports Antigravity (~/.gemini), Codex (~/.codex/config.toml), Trae CN, and installs the bundled omni-desktop-control skill. Generic snippets are in clients/doubao-mcp.json.
DeepSeek Harness (DSH) Bundle
Install the companion npm bundle @yangdw2024/omni-desktop-mcp (zero external npm runtime dependencies; includes a native Plugins configuration card using DSH theme tokens):
pip install -U "omni-desktop-mcp[full]"
dsh plugin add @yangdw2024/omni-desktop-mcpIf python on DSH's PATH is not the environment you installed into, set command in the MCP client row to the absolute path of that python.exe.
Safety Guardrails & CI
This server drives real OS input on the logged-in desktop session — treat it accordingly:
Dangerous Hotkey & Command Blocklist:
Ctrl+Alt+Del,Ctrl+Alt+End,Ctrl+Shift+Esc,Win+L,Win+R,Win+X,Shift+Del,Alt+F4, power/sleep single keys, and destructivelaunch_appcommands (format,diskpart,bcdedit,shutdown,regedit) are refused by default unlessallow_dangerous=trueis explicitly provided.Protected Windows & OS Security Surfaces: Closing critical host/system processes (
DeepSeek Harness,explorer.exe,taskmgr.exe,svchost.exe,csrss.exe,dwm.exe) and sending automated inputs to UAC/Credential/Logon surfaces (consent.exe,CredentialUIBroker.exe,LogonUI.exe) are blocked by default.Sliding-Window Rate Limiter & 5s Repeat Suppression: Throttles runaway bursts (
30mutating actions /10 sby default, returningrate_limited) and suppresses identical blind click loops (repeat_suppressed).Hook-Free Emergency Abort (
Esc): PollsGetAsyncKeyState(VK_ESCAPE)at dispatch and betweenbatch,macro_run,drag, andwait_until_stablesteps — immune to wireless mouse zero-deltaWM_MOUSEMOVElockups.Windows UIPI & HTTP Auth: Non-elevated servers fail closed (
foreground_unavailable) on elevated targets;--httpenables Bearer token verification by default.
Testing & CI
GitHub Actions (.github/workflows/ci.yml) runs on windows-latest across Python 3.11, 3.12, and 3.13:
ruff check omni_desktop_mcp tests benchmarks
pytest -v -m "not live_desktop" # 20 headless unit, safety, macro, vision, and HTTP auth tests
pytest -v # full 21 tests (includes live interactive desktop E2E)License
MIT. See LICENSE.
Available Tools
3 toolsdesktop_actC
Execute desktop actions with 3-tier smart hybrid delivery, Macro v2 playbooks, wait_until_stable, icon template_path matching, SoM grid: clicks, rich clipboard (set_files/set_image/get_text/set_text), and merged observe_after='diff|tree|ocr|hybrid|screenshot'.
Inputs: action (required), to, key, args, +38 more.
desktop_observeB
Observe desktop state: list windows (mode='windows'), fast COM UIA tree (mode='tree', diff=true), adaptive RapidOCR/WinRT OCR (mode='ocr'), UIA+OCR (mode='hybrid'), or annotated screenshot (mode='screenshot'). Supports background PrintWindow capture, OpenCV multi-scale template_path matching, SoM grid=true overlay, and zoom_scale.
Inputs: diff, grid, mode, region, +12 more.
desktop_statusB
Inspect Omni-Desktop-MCP health, vision/OCR capabilities, saved macros ('macros'), JSONL audit log ('audit'), safety policy ('policy'), or reset guards.
Inputs: command. Returns: result
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 3 tools
The three tools map to clean phases (observe / act / introspect), so an agent can distinguish them at a high level. The boundary blurs slightly because desktop_act embeds observe_after='diff|tree|ocr|hybrid|screenshot', duplicating desktop_observe's core capability, and desktop_status overlaps with act's macro/clipboard surface.
All names share a consistent 'desktop_' prefix and snake_case form with a single short suffix. Minor deviation: observe and act are verbs while status is a noun, so the pattern is prefix-stable but not strictly verb_noun.
Three tools for a full desktop-automation domain is thin; nearly all functionality is crammed into multi-mode parameters on desktop_observe and desktop_act. Each tool is a mega-tool, so the surface is scoped but at the cost of discoverability and mode selection burden.
Observation, action, and introspection form a closed loop for desktop automation, with OCR/UIA, macros, clipboard, and audit/policy inspection covered. Gaps are minor: macro authoring/editing is not clearly exposed as its own operation, and status largely reads state rather than mutating it.
Maintenance
Related MCP Connectors
Let AI see and use your own Windows PC with your permission: screen, apps, mouse and keyboard.
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.
Remote desktop control, files, and terminal tools for AI assistants on paired Windows PCs.
Related MCP Servers
- AlicenseNot gradedqualityBmaintenanceEnables AI agents to automate real desktop applications across Windows, Linux, and macOS using incremental screen perception, accessibility trees, OCR, and window management, dramatically reducing token usage compared to screenshot-per-step approaches.44 PyPI4MIT
- AlicenseNot gradedqualityCmaintenanceEnables AI assistants to drive Windows desktop automation — opening and interacting with applications, native UI controls, keyboard/mouse input, files, processes, clipboard, and Chrome/Edge browsing via UI Automation and CDP. All actions pass through a safety policy with human approval, emergency stop, and deterministic verification.1MIT
- AlicenseNot gradedqualityBmaintenanceEnables AI agents to observe and drive Windows desktop applications in the background through UI Automation and Win32 messages, without taking over the user's mouse, keyboard, or foreground window. Every action is read back and verified, and outward actions are held for explicit confirmation.6MIT
- AlicenseNot gradedqualityCmaintenanceEnables AI agents to inspect and control Windows desktop applications through compact UI Automation trees, dHash-gated screenshots, OCR, and guarded physical, virtual, or parallel input actions with emergency stop.MIT