Skip to main content
Glama
Omni-Desktop-MCP

Omni-Desktop-MCP

by yangdw2024

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 & screencapture only; input actions return unsupported_on_current_host. Not tested on macOS hardware.

Linux

Experimental stub only

Basic wmctrl/xdotool wrapper; not tested on a Linux desktop.

Background UIA Operation Demo (0 focus steal)


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.

Windows 10/11 25-Task Benchmark Chart

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 (877 est. tokens) vs observe_after="diff" (142 / 451 / 160 est. tokens)

L1 Background Input (0 focus steal)

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 (CLICKED:实验数据_Test_2026); frame-hash cache skips redundant OCR

Mean Single-Step Latency

306.1 ms

Average across UIA L1, cross-monitor physical click (138.3 ms), Unicode CN/EN typing (281.8 ms), find_and_act + OCR

Failure Recovery Rate

100.0% (4 / 4)

stale_snapshot re-observe, Macro v2 retries=2, condition skip + on_error="continue", ESC / guard recovery

Complex Electron / Browser UIA Speedup: On larger accessibility trees outside the 35-control WinForms harness, single-RPC COM IUIAutomation.FindAllBuildCache measured 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.py

Related 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.FindAllBuildCache on a dedicated STA thread (with BFS fallback) + diff=true returning only + / ~ / - changes.

  • Background PrintWindow Capture (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"), localized zoom_scale, and wait_until_stable.

  • Macro v2 Playbooks & Rich Clipboard: Parameterized JSON playbooks ({{var}}, condition, retries, on_error="continue"), plus CF_HDROP multi-file and CF_DIB image 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/10 for Tailscale); ~/.omni-desktop/audit/actions.jsonl logs 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/10

Register with Your Clients

omni-desktop-mcp-install          # dry-run preview (nothing written)
omni-desktop-mcp-install --apply  # backs up existing configs (*.bak-*) before writing

Supports 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-mcp

If 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 destructive launch_app commands (format, diskpart, bcdedit, shutdown, regedit) are refused by default unless allow_dangerous=true is 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 (30 mutating actions / 10 s by default, returning rate_limited) and suppresses identical blind click loops (repeat_suppressed).

  • Hook-Free Emergency Abort (Esc): Polls GetAsyncKeyState(VK_ESCAPE) at dispatch and between batch, macro_run, drag, and wait_until_stable steps — immune to wireless mouse zero-delta WM_MOUSEMOVE lockups.

  • Windows UIPI & HTTP Auth: Non-elevated servers fail closed (foreground_unavailable) on elevated targets; --http enables 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 tools
desktop_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

    B3/5.0

    Scored across 3 tools

    Disambiguation4/5

    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.

    Naming Consistency4/5

    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.

    Tool Count3/5

    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.

    Completeness4/5

    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

    ActivityNo data
    ResponsivenessNo recent community issues

    Related MCP Connectors

    Related MCP Servers

    • A
      license
      Not graded
      quality
      B
      maintenance
      Enables 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 PyPI
      4
      MIT
    • A
      license
      Not graded
      quality
      C
      maintenance
      Enables 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.
      1
      MIT
    • A
      license
      Not graded
      quality
      B
      maintenance
      Enables 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.
      6
      MIT
    • A
      license
      Not graded
      quality
      C
      maintenance
      Enables 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