AmrDab/clawdcursor

clawdcursor compiles whatever's on screen into one UI map — accessibility tree and OCR fused into stable, addressable elements, with a screenshot only when needed — then drives apps through reusable scripts, verifying every action and routing it through a single safety gate.

392 ★58 forksTypeScriptUpdated 1d ago

What you need to know

Local MCP server that gives any tool-calling agent (Claude Code, Cursor, Windsurf, OpenClaw, Agent SDK) safe control of the real desktop — clicks, types, reads the screen, opens apps — by compiling the screen into a UI map (accessibility tree + OCR fused into confidence-scored elements with stable `el_NN` ids), verifying its own actions, and gating everything through a single safety checkpoint.

Install

npm i -g clawdcursor
clawdcursor consent --accept    # one-time desktop-control consent (required)
clawdcursor grant                # macOS only — approve Accessibility + Screen Recording
claude mcp add clawdcursor -s user -- clawdcursor mcp --compact   # Claude Code
claude plugin marketplace add AmrDab/clawdcursor && claude plugin install clawdcursor@clawdcursor   # one-command plugin

Usage

  • Add to any MCP-capable agent: Claude Code (`clawdcursor mcp --compact`), Codex (`args = ["mcp", "--compact"]` in ~/.codex/config.toml), Cursor/Windsurf/Claude Desktop (mcpServers), or Zed (`context_servers`).
  • Ask the agent to operate apps — e.g. "open Outlook and reply to the latest email from Sarah"; the agent acts on elements by {element_id, snapshot_id} instead of pixels.
  • Optional `expect` on a consequential action makes the server re-check the live screen and report a DEVIATION instead of a hollow success.
  • Headless/HTTP mode: run `clawdcursor agent` for a daemon exposing HTTP MCP at http://127.0.0.1:3847/mcp with a bearer token at ~/.clawdcursor/token.

Key features

  • Cheapest-tier-first perception: a11y tree (free) → OCR (cheap) → DOM (CDP) → screenshot/vision (expensive, last resort), so token cost tracks task difficulty.
  • Reactive verification via `expect` — actions are checked against fresh observations on the live screen.
  • Single safety gate (`safety.evaluate()` allow/confirm/block) before anything touches the desktop, plus an on-screen 'desktop control in progress' banner with a double-click-to-stop kill switch.
  • 98 granular tools + 7 compound tools (computer/accessibility/window/system/browser/task/batch) through one MCP config; batch collapses N steps into one call.
  • Cross-platform PlatformAdapter for Windows, macOS, Linux X11 and Wayland; stdio and HTTP MCP transports; secure-field redaction and no telemetry by default.

Best for

Last-mile GUI automation for AI agents over native desktop apps, legacy apps, and canvas-only UIs that have no public API or CLI — acting on elements by accessibility id rather than pixels.

Caveats

  • macOS requires Accessibility permission (and optional Screen Recording for vision fallback); Xcode Command Line Tools needed for screenshots/vision.
  • Linux needs system packages: tesseract-ocr, python3-gi + gir1.2-atspi-2.0, and on Wayland also ydotool (synthetic input).
  • Requires Node.js 20+; one-time desktop-control consent is mandatory.
  • Blocked sequences (Ctrl+Alt+Del, lock/log-out/force-quit/shutdown) are refused outright; sensitive apps auto-elevate to Confirm.
  • HTTP mode binds to 127.0.0.1 with bearer-token auth; screenshots stay in RAM and only go to the model endpoint you configured.
Platforms: Windows 10/11 (x64/ARM64) · macOS 12+ (Intel/Apple Silicon) · Linux X11 · Linux WaylandClients: Claude Code · Claude Desktop · Cursor · Windsurf · Zed · OpenAI Codex · OpenClaw · Claude Agent SDK
Documentation ↗

Reviewed 2026-08-07

Topics

ai-agentai-toolsanthropicautomationclaudecomputer-usecross-platformcursordesktopdesktop-automationgui-automationlinuxmacosmcpmcp-servermodel-agnosticmodel-context-protocolopenaitypescriptwindows
View on GitHub ↗
Stars
392★
Forks
58
Language
TypeScript
License
MIT
Created
2026-02-19
Last push
2026-08-06