Skip to main content
Glama
@open-computer-use/mcp-server

@open-computer-use/mcp-server

by dmarcin1

Open Computer Use

Zero-install, open-source, model-agnostic macOS Computer Use engine, CLI & MCP server.

No /Applications/*.app installation, no ChatGPT/Codex host lock-in, no MCP Elicitation requirement—build once in place and use from Antigravity, Claude Code, Cursor, Codex, Windsurf, Gemini CLI, OpenAI Agents SDK, LangGraph, or any local LLM.

Key Capabilities

  • Zero-Conflict Background Mode + Verify-and-Escalate Ladder (background: true by default):

    • Combines AX-first semantic actions (AXPress / AXValue / AXSelectedText), window-targeted CGEvent.postToPid(pid) (with out-of-process XPC PID lookup), synthetic AppKit activation (SyntheticAppFocusEnforcer), and instant notification-driven focus-steal restoration (FocusRestoreGuard).

    • Structured Action Verification: Every interaction returns { ok, deliveryMode, effect: "confirmed" | "unverifiable" | "suspected_noop", detail } via pre/post AX element & window-scoped tree diffs, plus one-step deliveryMode: "foreground_transient" escalation that flash-activates the target window and restores both your previous foreground window and hardware mouse cursor.

    • Snapshot-Locked elementToken ("s<gen>:<idx>"): getState() tags snapshots with [s1], [s2], ... and cuaExt.findToken(ax, matcher) binds targets to that exact generation—rejecting shifted indices with [STALE_ELEMENT_TOKEN] before clicking.

  • Native Apple Events Browser Tab Engine (cua.listTabs / cua.getTab): Zero-conflict background automation across Chrome, Safari, Edge, Brave, and Arc (including Incognito & background tabs) via native Apple Events DOM/JS injection—auto-filtering hidden/pointer-events:none layers, supporting React/Vue-safe tab.fill(), tab.click(), tab.hover(), tab.waitFor(), tab.eval(), and CLI open-computer-use tabs [browser].

  • Multi-Window Hard Pinning (CGWindowID): app.listWindows(), app.window(windowIdOrTitle), cua.getApp(query, { windowId, windowTitle }), and open-computer-use windows <app> pin all AX queries, captures, and input to a specific window—refusing to drift across sibling windows ([WINDOW_NOT_FOUND]).

  • Codex-Style Live PiP Preview + Curved Virtual Cursor: Zero-copy ScreenCaptureKit (SCStream + IOSurface) floating preview window with embedded Bézier-gliding frosted-outline virtual cursor, click ripple, magnetic corner snapping, hover-reveal controls (× stop / ⤢ bring-to-front), 12s idle auto-hide, and IOKit display-sleep assertion while active.

  • Zero-Install Native Swift 6 Daemon (bin/open-computer-use-daemon): Spawns on demand directly from the host process, automatically inheriting your terminal/IDE/Antigravity macOS Accessibility & Screen Recording TCC permissions without installing or re-signing any .app bundle.

  • Persistent JS REPL (cua_js) + Built-in cuaExt: Batch multi-step UI flows into a single call with top-level await, cross-turn persistent bindings, cuaExt.queryAX (ancestor-preserving AX filter), cuaExt.findToken, cuaExt.findIndex, cuaExt.waitFor, cuaExt.typeSafe, and cuaExt.ocrFind.

  • AX-First + Cross-Locale AXIdentifier + Local Apple Vision OCR + Set-of-Mark: Compact accessibility trees with id="AXIdentifier", automatic diff compression, built-in VNRecognizeTextRequest (zh-Hans, en-US, zh-Hant) via app.ocr() / cua_ocr, and optional [index] Set-of-Mark screenshots.

  • Safety Gates, Context Guardrails & Dual CLI/MCP: Action-level [CONFIRMATION_REQUIRED] confirmation gate for irreversible payment/transfer/delete controls (overridable with { confirmDangerous: true } after user consent), Touch ID hardened hot-reload ~/.open-computer-use/policy.json, Esc emergency stop HUD, save_images_only & >32 KB disk spill, fast CLI (js, tabs, windows, ocr, status, doctor, allow), and Stdio / Streamable HTTP MCP.

Related MCP server: cua-mac

Architecture

Any MCP Host / CLI / LLM (Antigravity, Claude Code, Cursor, Codex, HTTP Clients...)
  │  MCP (Stdio / Streamable HTTP)  OR  Fast CLI (`open-computer-use js|tabs|windows|ocr|doctor|allow`)
  ▼
@open-computer-use/mcp-server (TypeScript)
  ├── Mode: repl   (`cua_js` + `cuaExt` + `cua_reset` + `cua_stop` + `cua_doctor`)
  ├── Mode: tools  (15 structured atomic tools incl. `cua_ocr` & `cua_doctor`)
  ├── Mode: hybrid (Both REPL + atomic tools)
  ├── AppleEventsBrowserBridge (Chrome/Safari/Edge/Brave/Arc native tab DOM/JS engine)
  ├── OutputGuard  (>32KB / >800 lines auto-spill + `save_images_only` disk mode)
  └── Optional Playwright / Chrome CDP browser surface (`--enable-browser`)
        │
        │  4-byte LE JSON-RPC 2.0 over Unix Socket (~/.open-computer-use/ipc/service.sock)
        ▼
bin/open-computer-use-daemon (Zero-Install Swift 6 Native Daemon)
  ├── AXTreeEngine         — AXUIElement + Chromium AX + AXIdentifier + windowId pinning + [s<gen>] tokens + Diff
  ├── ScreenshotEngine     — ScreenCaptureKit + Set-of-Mark + Apple Vision OCR
  ├── InputEngine          — Guarded AX/CGEvent actions + ActionEffect verification + TransientForegroundGuard
  ├── ActionSettler        — Adaptive UI stability waiter
  ├── PolicyEngine         — Hot-reload policy.json + wildcards + Touch ID + dangerous-action confirmation gate
  └── SafetyMonitor & UI   — Passive CGEventTap (Esc stop) + Live PiP SCStream preview + Curved Virtual Cursor

Quick Start (No .app Install Required)

Requirements: macOS 14+ (Apple Silicon or Intel), Xcode Command Line Tools (Swift 6+), and Node.js 20+.

git clone https://github.com/dmarcin1/OpenComputerUse.git
cd OpenComputerUse
npm --prefix packages/mcp-server install
npm run build

# Verify daemon, TCC permissions, Touch ID & client setup
npm run doctor

# Install Antigravity MCP config + SKILL.md + ~/.local/bin/open-computer-use CLI
node scripts/configure-clients.mjs --apply-antigravity --install-skill --link-cli

Usage Examples

# Fast CLI against hot daemon
open-computer-use doctor
open-computer-use tabs Chrome        # List native Chrome/Safari/Edge/Brave/Arc tabs (incl. Incognito)
open-computer-use windows "Finder"   # List windows with CGWindowIDs for hard window pinning
open-computer-use js 'const apps = await cua.listApps({includeInstalled:false,emit:false}); cua.write(apps.map(a=>a.displayName));'
open-computer-use ocr "Finder"

# Policy & Touch ID hardening
open-computer-use allow list
open-computer-use allow add "com.apple.iWork.*"
open-computer-use allow mode allowlist
open-computer-use allow auth on     # Protects future allowlist edits with Touch ID

# Streamable HTTP MCP (universal for any LLM / framework)
open-computer-use mcp --mode repl --http --port 3847

Verification

npm run test:unit   # IPC framing, REPL AST/persistence, cuaExt/findToken/cross-realm RegExp, output spill, saveImagesOnly
npm run test:e2e    # Live zero-install daemon + [s<gen>] token guard + windowId pinning + Apple Events tabs + Vision OCR + Policy + CLI + Stdio & HTTP MCP

License

MIT

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections.

Loading tool schema changelog…

    Related MCP Connectors

    Related MCP Servers

    • A
      license
      B
      quality
      D
      maintenance
      Provides a local MCP bridge for AI assistants to control a Mac by observing screen state and performing actions like mouse movement, clicking, typing, and opening URLs.
      12
      MIT
    • F
      license
      Not graded
      quality
      D
      maintenance
      macOS MCP server that enables AI agents to directly control the host OS, including mouse, keyboard, windows, files, and accessibility automation for computer-use workflows.
      1
      -
    • A
      license
      A
      quality
      D
      maintenance
      macctl is an accessibility-first macOS desktop automation MCP server that lets AI clients see the screen, inspect app accessibility trees, control mouse/keyboard, manage windows, and run commands, all behind tiered permissions and audit logging.
      36
      9 npm
      Apache 2.0
    • A
      license
      Not graded
      quality
      D
      maintenance
      Provides a JSON-RPC computer use runtime for macOS, exposing 7 MCP tools (observe/act/inspect/session/cancel/trace) as image content blocks so external agents like Claude Code, Pi, OpenCode, or Codex CLI can capture screenshots and drive the desktop with clicks, keys, and typing while enforcing session locking, stale-frame protection, and trace redaction server-side.
      1
      MIT