ApexUse
Allows agents to inspect and automate Electron-based desktop applications through the OS accessibility tree and visual grounding, treating them like any other native app.
Enables agents to control the Firefox browser window on the desktop using accessibility refs, visual marks, and synthesized input, alongside other user browsers.
Provides desktop control on Linux under X11 and Wayland, using AT-SPI2 accessibility trees, libX11/libXtst input, tesseract OCR, and Wayland screenshot/input helpers to inspect and automate native Linux applications.
Provides full desktop control on macOS 14+ via native Accessibility (AXUIElement) trees, ScreenCaptureKit screenshots, Apple Vision OCR, and per-PID CGEvent/NSEvent input, letting agents inspect, click, type, scroll, and verify changes in native macOS apps.
Enables agents to drive the Safari browser on the desktop through the same accessibility, visual Set-of-Mark, and input tooling used for native apps, rather than a browser-specific automation protocol.
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., "@ApexUse Open Safari, go to news.ycombinator.com, and summarize the top three posts"
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.
ApexUse — Computer Use MCP Server for AI Agents (macOS, Windows & Linux)
ApexUse (apexuse-mcp) is an open-source, local-first Computer Use MCP server written in pure Rust and native OS bridges. It gives AI coding agents — including Antigravity, Claude Code, Claude Desktop, OpenAI Codex, Gemini CLI, Cursor, Windsurf, VS Code, and OpenCode — full desktop and browser control over macOS, Windows, and Linux using batched native Accessibility trees with incremental AX diffing (state_mode), inline post-action return_state: "diff", Set-of-Mark ([m1]..[mN]) visual grounding, direct native set_value/select_text, semantic target lookup, local OCR, compact JPEG screenshots, a non-hijacking AgentCursor overlay, batched run_actions (up to 24 steps), and local workflow memory.
Zero external LLM keys. Zero external Rust crate or npm runtime dependencies. Zero cloud relay.
Why ApexUse vs. Alternative Computer-Use Tools?
Capability | ApexUse ( | Screenshot-Only Computer Use | Browser-Only MCPs (Playwright / DevTools) |
App Coverage | Full OS: native apps, Electron, terminals & any browser | Whole screen | Browser tabs only |
UI Grounding | Hybrid AX-first: batched Accessibility ( | Pixel coordinates only | DOM only |
Form Input & Speed | Native | 1 LLM round-trip per slow key/click | Step-by-step DOM calls |
Image Bandwidth | Pure-Rust baseline JPEG default ( | Uncompressed full-res PNGs | Page screenshots |
Visual Pointer | Floating transparent | Teleports real user cursor | None / page focus |
Workflow Memory | Records & replays structural macros via | Re-plans every run | Scripts must be coded |
Security Controls | Native password/secure-field blocking, | Sends full raw screen pixels | Web origin scope |
Related MCP server: oswright
Platform Support
Platform | Backend Driver | Capabilities & Verification |
macOS 14+ ( |
| Batched |
Windows 10 / 11 ( |
| Pure-Rust Win32 FFI ( |
Linux ( |
| Runtime |
Quick Start
1. Run via npx (zero-config, no Rust toolchain required)
The apexuse-mcp npm launcher uses zero external npm dependencies (Node.js >=18), downloads the matching v0.3.0 binary from GitHub Releases, verifies its .sha256 checksum before extraction, and caches it under ~/.apexuse/bin/v0.3.0/ (installing via npm install -g apexuse-mcp prints a platform-aware postinstall setup banner):
# Wire all detected AI coding agents, install SKILL.md & verify live MCP handshake
npx -y apexuse-mcp install all --write --npx --with-skill --probe
# Or install the Codex Desktop App Plugin directly
npx -y apexuse-mcp install codex-plugin --write --npx --probe
# macOS: open host-aware Accessibility & Screen Recording onboarding UI
npx -y apexuse-mcp doctor --onboard
# Cross-platform: verify OS accessibility & screen recording readiness (headless)
npx -y apexuse-mcp doctor --check2. Alternative installs (crates.io, GitHub Releases, or source)
Download prebuilt archives (
macos-arm64,macos-x86_64,linux-x86_64,windows-x86_64) from GitHub Releases.Install from crates.io:
cargo install apexuse-mcpOr clone and build from source (requires Rust, plus Xcode Command Line Tools on macOS):
git clone https://github.com/Jackpkn/apexuse.git cd apexuse cargo build --release --manifest-path rust/Cargo.toml
3. Check OS readiness & guided macOS onboarding
# macOS guided AppKit onboarding window (or `apexuse-mcp onboard`)
npx -y apexuse-mcp doctor --onboard
# Headless readiness check across macOS, Windows, and Linux
npx -y apexuse-mcp doctor --check
# or with a local source build:
./rust/target/release/apexuse-mcp doctor --checkmacOS: Enable Accessibility and Screen Recording for the host terminal or IDE launching
apexuse-mcp(Terminal,iTerm2,Codex,Cursor,Antigravity, etc.) in System Settings → Privacy & Security. Rundoctor --onboard(onboard [--force] [--no-auto-close]) to detect the host app, jump straight to System Settings, and poll status live (if Screen Recording stays unset after toggling and clicking Later, restart the host app).doctor --checknever spawns GUI windows and exits1when either grant is missing (emitting"onboard_hint"in JSON).Windows: Uses built-in Win32 / UI Automation / WinRT APIs with no extra dependencies.
Linux: Runs on X11 via
libX11/libXtst(dlopen). For full semantic accessibility, OCR, and Wayland support install distro packages as needed (e.g.,python3-gi,gir1.2-atspi-2.0,tesseract-ocr,xdotool, orgrim/spectacle/gnome-screenshotandwtype/ydotoolon Wayland).
4. Wire your AI coding agent (install, codex-plugin, probe, skills)
apexuse-mcp install auto-merges safely across 9 clients (antigravity, gemini, claude, claude-desktop, codex, cursor, windsurf, vscode, opencode), codex-plugin (Codex Desktop App Plugin), or all:
# Preview without touching disk
npx -y apexuse-mcp install cursor --dry-run --npx
# Safely merge into detected configs (creates .bak backup), install SKILL.md, and probe MCP
npx -y apexuse-mcp install all --write --npx --with-skill --probe
# Install Codex Desktop Plugin (marketplace + 0.3.0 cache + ~/.codex/config.toml) and probe
npx -y apexuse-mcp install codex-plugin --write --npx --probe
# Standalone live MCP initialize + tools/list probe
npx -y apexuse-mcp probe --npx
# Project-scoped wiring with custom policy
npx -y apexuse-mcp install claude --write --npx --scope project --policy ./policy.autonomous.yaml
# Install the rich agent skill pack (SKILL.md + agents/openai.yaml + references/)
npx skills add Jackpkn/apexuse -g -a codex --skill apexuse -yExisting JSON files are validated before modification (invalid/commented JSON aborts cleanly without touching disk), non-empty changed files are backed up to
<file>.bak, and Codexconfig.tomlupdates preserve top-level settings and sibling tables.Codex Plugin vs. Direct MCP Server:
install codex-plugin --writematerializes~/.codex/plugins/marketplaces/apexuse-local/and~/.codex/plugins/cache/apexuse-local/apexuse/0.3.0/, activates[marketplaces.apexuse-local]+[plugins."apexuse@apexuse-local"], and removes[mcp_servers.apexuse*]to avoid duplicate registrations. When[plugins."apexuse@apexuse-local"](enabled = true) is active,install all --writepreserves and refreshescodex-pluginin place; runninginstall codex --writeswitches back cleanly (enabled = false+[mcp_servers.apexuse]).--probe [--timeout-ms <n>] [--mock]runs the pure-Rust MCP stdio handshake (initialize,notifications/initialized,tools/list) after install (--mockonly applies to the temporary probe subprocess and is never written into configs or.mcp.json).--with-skillwrites.agents/skills/apexuse/SKILL.mdto standard skill directories (~/.agents/skills/apexuse/SKILL.md,~/.claude/skills/apexuse/SKILL.md,~/.codex/skills/apexuse/SKILL.md, or.agents//.claude/in project scope). Usenpx skills add Jackpkn/apexuseto install the full skill pack includingagents/openai.yamlandreferences/.
Antigravity / Gemini CLI / Cursor / Windsurf / Claude Desktop (
"mcpServers"):{ "mcpServers": { "apexuse": { "command": "npx", "args": ["-y", "apexuse-mcp"] } } }Claude Code:
claude mcp add apexuse -- npx -y apexuse-mcpOpenAI Codex (
~/.codex/config.toml):[mcp_servers.apexuse] command = "npx" args = ["-y", "apexuse-mcp"] startup_timeout_sec = 60 tool_timeout_sec = 180VS Code (
mcp.json—"servers"):{ "servers": { "apexuse": { "type": "stdio", "command": "npx", "args": ["-y", "apexuse-mcp"] } } }OpenCode (
opencode.json—"mcp"):{ "mcp": { "apexuse": { "type": "local", "command": ["npx", "-y", "apexuse-mcp"], "enabled": true } } }
See agent-configs/README.md for full paths across macOS, Windows, and Linux.
CLI Commands (config, call, doctor, onboard, probe, install, --version)
apexuse-mcp --version
apexuse-mcp doctor [--onboard] [--force] [--no-auto-close] [--check] [--mock]
apexuse-mcp onboard [--force] [--no-auto-close] [--check] [--mock]
apexuse-mcp probe [--mock] [--npx] [--policy <path>] [--timeout-ms <n>]
apexuse-mcp install <agent|codex-plugin|all> [--write] [--dry-run] [--scope user|project] [--npx] [--policy <path>] [--with-skill] [--probe] [--timeout-ms <n>] [--mock]
apexuse-mcp config [show | get <key> | set <key> <val> | reset]
apexuse-mcp call <tool> [--args '<json>'] [--save-image <path>] [--mock]
apexuse-mcp call (--calls '<json-array>' | --calls-file <path>) [--sleep-ms <n>] [--save-image <path>] [--mock]Persistent Configuration (~/.apexuse/config.json)
Override defaults persistently via apexuse-mcp config set <key> <value> (or APEXUSE_CONFIG):
Key | Default | Range / Values | Purpose |
|
|
| Default screenshot/SoM image encoding ( |
|
|
| Baseline JPEG quality. |
|
|
| Maximum image pixel width before downscaling. |
|
|
| Default |
|
|
| Early-exit poll cadence during |
|
|
| Inter-chunk delay for fast Unicode fallback typing. |
|
|
| Preserve |
|
|
| Auto-diff repeat |
|
|
| Include |
Launcher wrapper options (npx -y apexuse-mcp):
--use-system: allowPATHfallback if no cached binary exists (stripped before forwarding args toapexuse-mcp).APEXUSE_BIN: override with a specific localapexuse-mcpbinary path.
MCP Tools Reference (6 Tools)
Tool | Actions & Key Parameters |
| AX-first read-only snapshot for |
| Captures an app window or full |
|
|
|
|
| Unannotated JPEG (default) or PNG ( |
|
|
Policy, Safety & Environment Variables
Variable | Default | Purpose |
|
| Policy YAML ( |
|
| Directory for |
|
| Override persistent runtime config file path. |
| (unset) | Explicit binary path override for the |
|
| Set to |
(Legacy HANDSMCP_* env vars remain supported as fallbacks.)
Built-in safety & reliability guardrails:
Protected app denial (
password,1password,bitwarden,keychain,wallet,bank, etc.)Browser domain policy (
allowed_domains/blocked_domainsinpolicy.yamlenforced acrossopen_url,inspect_app,visual_inspect,screenshot, andworkflow_memoryreplay)Optional destructive-action confirmation (
confirm_destructive: trueinpolicy.yamlrequires interactive confirmation tokens for irreversible labels likeDelete,Purchase,Transfer,Send)Direct-mode element identity & window-state checks (
probe_point_safe+ process/window-count verification) to reject stalereftargets when UI layout shifts before click orset_valueNative password / secure text field redaction (
AXSecureTextField,CurrentIsPassword,AT-SPI PASSWORD_TEXT, bullet-mask checks)Fail-closed
set_value: rejects raw(x, y)or OCR-only targets (target_identity_unverified) unless OS Accessibility verifies an editable controlClipboard paste blocking (
Cmd+V/Ctrl+Vrejected; useset_valueortype)Emergency kill switch: create
~/.apexuse/STOPto halt all desktop mutations immediately
FAQ
Does ApexUse need an OpenAI, Anthropic, or Google API key?
No. apexuse-mcp is a pure local MCP stdio binary with zero built-in LLM calls. Your existing AI agent (Antigravity, Claude Code, Codex, Gemini CLI, Cursor, Windsurf, VS Code, OpenCode, etc.) drives it directly over MCP.
How does ApexUse stay fast and token-efficient compared to traditional Computer Use?
inspect_appbatches macOS AX attribute reads (AXUIElementCopyMultipleAttributeValues), omits@(x,y,wxh)bounds by default (include_bounds: false), exposesURL=and Chrome/Electron table structure, and auto-diffs repeat calls (diff: true->state_mode: "full" | "diff" | "unchanged") with zero image encoding.Passing
return_state: "diff"oncomputer,desktop, orrun_actionsexecutes the action and returns the updated AX diff with livee1..eNrefs (snapshot_active: true,snapshot_preserved: true) in one MCP round-trip — no extrainspect_appcall needed.set_valueandselect_textmutate verified inputs directly via native Accessibility instead of 10ms/character keystroke loops, whilekeep_snapshot(reuse_form_refs: true) preserves refs across form edits.verify_mode: "ax"verifiesverify_change: truetransitions strictly via Accessibility with zero screenshot overhead (30msearly-exit polling).visual_inspectandscreenshotdefault to scaled baseline JPEG (quality=80,max_width=1280, pure Rust) instead of huge PNGs, andocr="off"returns instant AX-only visual marks.computer(action="run_actions")chains up to 24 steps (including inlineset_value,wait_for, and semantictarget) inside a single model turn.
Does it hijack my physical mouse cursor while working?
On macOS, ApexUse renders an independent translucent AgentCursor overlay window and dispatches targeted events without warping your hardware cursor during normal visual feedback. On Windows, a layered click-through AgentCursor overlay tracks automated actions.
How is ApexUse different from Playwright or browser DevTools MCP servers? Browser MCPs only control a single automated browser tab via CDP. ApexUse controls the real desktop across native OS apps, Electron apps, terminals, dialogs, and user browsers (Chrome, Dia, Safari, Firefox, Edge).
Testing
# Rust unit & integration tests
cargo test --manifest-path rust/Cargo.toml
# Zero-dep npm launcher unit tests (node >= 18)
node --test npm/apexuse-mcp/test/launcher.test.js
# End-to-end MCP stdio & CLI integration tests (requires python3 mcp + pytest)
.venv/bin/pytest -qLayout
├── .agents/
│ ├── plugins/marketplace.json # Codex local plugin marketplace catalog
│ └── skills/apexuse/ # Skill pack (SKILL.md, agents/openai.yaml, references/)
├── .github/workflows/ci.yml # 3-OS CI matrix (macOS, Ubuntu Xvfb/AT-SPI, Windows)
├── .github/workflows/release.yml # Automated macOS (arm64/x86_64), Linux, Windows releases
├── agent-configs/README.md # Client setup snippets & auto-wiring targets (9 agents + plugin)
├── llms.txt # AI search & crawler index summary
├── npm/apexuse-mcp/ # Zero-dep npx launcher + postinstall banner (Node >= 18)
├── plugins/apexuse/ # Codex Desktop Plugin manifest, .mcp.json, and SVG icons
├── policy.yaml # Default direct policy
├── policy.autonomous.yaml # Autonomous direct preset
├── pyproject.toml # Python MCP E2E test configuration
├── server.json # Official MCP Registry manifest
├── rust/
│ ├── Cargo.toml # apexuse-mcp crate (0 external dependencies)
│ ├── build.rs # Compiles Objective-C macOS bridge (arm64/x86_64)
│ ├── assets/ # Embedded SKILL.md & plugin templates for crates.io
│ ├── native/macos_bridge.{h,m} # AXUIElement, SCKit, Vision OCR, AgentCursor, onboarding UI
│ └── src/
│ ├── config.rs # Persistent ~/.apexuse/config.json loader & validator
│ ├── driver/ # OsDriver trait + common.rs + macos.rs + windows.rs + linux.rs
│ ├── gateway.rs # Snapshots, policy, set_value, semantic target, run_actions
│ ├── installer.rs # Safe multi-agent + codex-plugin JSON/TOML auto-merger
│ ├── json.rs # Zero-dependency JSON parser/serializer
│ ├── main.rs # CLI entrypoint (stdio, doctor, onboard, probe, install, config, call)
│ ├── mcp.rs # JSON-RPC 2.0 MCP stdio server & tool schemas
│ ├── memory.rs # Structural workflow memory
│ ├── policy.rs # App/field security filters, rate limiter, confirmations
│ ├── probe.rs # Pure-Rust bounded live MCP stdio handshake probe
│ ├── som.rs # Set-of-Mark AX + OCR fusion
│ └── som_png.rs # Pure-Rust PNG & baseline JPEG codecs, scaler, SoM renderer
└── tests/test_rust_mcp.py # End-to-end MCP stdio, asset-sync & CLI integration testsRegistry & License
MIT License — see LICENSE
Official MCP Registry: mcp-name: io.github.Jackpkn/apexuse
Available Tools
6 toolscomputerB
AX-first semantic & Set-of-Mark interaction: action=inspect (supports diff, include_bounds, window, query), click, double_click, right_click, hover (accepts ref, mark, target: {query, role?, fresh?}, or x/y after unfiltered snapshot), drag (from_ref/from_mark/x1,y1 -> to_ref/to_mark/x2,y2), type (ref, mark, or target), set_value (direct native text assignment/clearing on verified editable ref, mark, or target; text='' clears), select_text (optional start/end offsets on verified editable ref, mark, or target), press_key, scroll (direction, amount, optional target ref/mark/x,y), run_actions (up to 24 chained steps including inline wait_for, inspect, set_value, select_text, target, and per-step verify_mode/diff/include_bounds), wait_for (local AX/OCR poll up to 60s, optional window/role), or confirm (token). Pass return_state='diff'|'full' on actions & run_actions to capture updated AX state inline and keep refreshed refs live without extra inspect_app round-trips; pass verify_mode='ax' with verify_change=true to skip screenshots. Also supports keep_snapshot, max_retries (0..=3), settle_ms, poll_interval_ms, retry_delay_ms, and require_change.
Inputs: action (required), arguments (required).
desktopB
Desktop-level operations: action=list_applications, launch_application, activate_application, open_url (instant http/https URL open in permitted browser/app), visual_click, double_click, right_click, hover, or drag (using mark, ref, target, or x/y coordinates). Supports return_state='none'|'diff'|'full' (eliminates extra inspect_app calls after activate/open_url/click), include_bounds, verify_change, verify_mode='auto'|'ax'|'visual' ('ax' skips screenshots), max_retries, settle_ms, poll_interval_ms, retry_delay_ms, and require_change.
Inputs: action (required), arguments (required).
inspect_appARead-only
AX-first semantic inspection of a permitted app bundle ID or 'desktop' (frontmost app). Auto-diffs repeat views (state_mode='full'|'diff'|'unchanged'|'filtered') to minimize tokens while keeping refs live; pass diff=false for full baseline, include_bounds=true for @(x,y,wxh), or query for filtered lookup. Returns compact accessibility tree with refs (e1, e2...) and learned workflow hints.
Inputs: app (required), diff, query, window, +1 more.
screenshotARead-only
Capture an unannotated screenshot of the largest window of a permitted running app after running safety preflight. Supports optional format='jpeg'|'png' (default 'jpeg'), quality (1..=100), and max_width (640..=2560).
Inputs: app (required), format, quality, max_width.
visual_inspectARead-only
Set-of-Mark (SoM) visual indexing for an app bundle ID or 'desktop' (full screen): captures window/screen, fuses Accessibility + Vision OCR boxes, overlays [m1]..[mN] badges, and returns annotated image (JPEG default or PNG) + clickable Mark IDs. Pass ocr='auto'|'fast'|'accurate'|'off' (default 'auto'), max_marks (1..=150, default 80), format='jpeg'|'png', quality (1..=100), and max_width (640..=2560).
Inputs: app (required), ocr, format, window, +3 more.
workflow_memoryC
Local structural app-workflow memory (never stores passwords, typed text, or set_value text): action=list, lookup, record, replay (executable macro replay with optional step_args), or clear.
Inputs: action (required), id, app, goal, +5 more.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 6 tools
There is real overlap: inspect_app duplicates computer's action=inspect, desktop's click/drag/hover duplicate computer's interaction actions, and visual_inspect vs screenshot both capture images. Descriptions do help by scoping computer to AX-first app interaction and desktop to app-launch/desktop-level work, but an agent could easily misselect between inspect_app and computer.inspect or between the two click surfaces.
Naming mixes conventions: inspect_app and visual_inspect are verb_noun, while computer, desktop, screenshot, and workflow_memory are bare nouns or noun_noun. There is no predictable pattern linking a tool's name to its scope or action, forcing agents to rely on descriptions rather than names.
Six tools is a sensible count for a macOS automation server and avoids a sprawl of single-action tools. The tradeoff is that computer and desktop are mega-tools bundling 15+ actions each, but the overall count is well within a reasonable scope.
The surface covers inspection (AX and visual), interaction (click/type/drag/key), app lifecycle (launch/activate/open_url), screenshots, and workflow memory/replay—a fairly complete automation loop. Minor gaps like window management (resize/move), clipboard, and scroll-only desktop operations exist but are largely workable around.
Maintenance
Related MCP Connectors
Connect AI assistants to your approved computer for files, commands, browser and desktop tasks.
Remote desktop MCP: let AI see, click, type and run terminal commands on your own Windows or Mac.
1Real desktops for AI agents, on machines you choose: screenshot, type, click, hire more agents.
Connect ChatGPT, Claude, Cursor or VS Code to your Windows PC: files, terminal, browser, apps.
Related MCP Servers
- AlicenseNot gradedqualityBmaintenanceLets AI agents see and control desktop applications through the accessibility layer, enabling clicking, typing, scrolling, dragging, and window/app management across macOS, Windows, and Linux entirely on the local machine.27MIT
- 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.24 PyPI4MIT
- AlicenseNot gradedqualityCmaintenanceEnables AI agents to safely and truthfully control local desktop applications via native accessibility trees, supporting element inspection and automation without proprietary binaries or fake success responses.Apache 2.0
- AlicenseAqualityBmaintenanceEnables AI agents to automate GUI interactions across Windows, Linux, macOS, Android, iOS, and browsers using structured platform APIs first, with vision grounding as a fallback for robust cross-platform computer use.17MIT