faster-mac-use
Provides background-first computer-use automation for native macOS apps, including Accessibility-based element interaction, zero-focus background clicks and keystrokes, per-agent UID diffs, and Apple Silicon Vision OCR fallback for canvas/GPU-rendered windows.
This server does not currently have a deployable release on Glama. Follow the repository's setup instructions to install and configure it for your MCP client, including any required credentials and local dependencies.
Faster Mac Use (fmu)
Background-first, multi-cursor browser and native macOS computer-use engine for AI agents, modeled after and extending OpenAI Codex's cua_repl architecture.
Website & Interactive Benchmark Explorer: https://lifan-builds.github.io/faster-mac-use/ (
docs/index.html)Architecture & 5-Workload Benchmark Report:
docs/architecture_and_benchmarks.mdMarket Comparison & Positioning Brief:
docs/gtm.md
Why faster-mac-use?
Most computer-use tools force a painful choice:
Pixel screenshot loops (
computertool) hijack your physical mouse cursor, steal window focus, and burn 40k–80k tokens across 10–30 turns.Standard Accessibility/Playwright MCPs (
@playwright/mcp,chrome-devtools-mcp) inject 4,000–12,500 tokens of tool schemas upfront and return full ARIA trees on every click.Single-session REPLs (
cua_repl) are fast for one agent, but serialize multi-agent workflows and fall back to screenshots on custom-rendered macOS windows.
faster-mac-use combines a 268-token single-tool MCP/CLI schema, a stateful async cua_repl sandbox, persistent @u1..@uN / @a1..@aN element UIDs with pre-registered table folding, churn-free +/~/- diffs, stale-observation masking, and true multi-cursor parallel execution across unfocused Chrome "🤖 Agent" tab groups and native macOS Accessibility + Apple Silicon Vision.framework OCR — verified at 0.0 px physical cursor movement and 0 focus changes.
Workload |
| OpenAI Codex |
| Anthropic Pixel CUA |
A. Enterprise SaaS Console (10 ops) | 1,290 tok / 79 ms (WebMCP)2,024 tok / 118 ms (DOM Diff) | 5,732 tok / 339 ms | 231,125 tok / 1,850 ms | 83,215 tok / 3,400 ms |
B. macOS Native Calculator (11 ops) | 1,264 tok / 94 ms | 1,499 tok / 188 ms | 48,477 tok / 2,694 ms ( | — |
C. Hybrid Web + macOS (14 ops) | 2,176 tok / 306 ms | 2,434 tok / 531 ms | 129,010 tok / 3,200 ms | — |
D. 3-Agent Multi-Cursor Swarm (25 ops) | 1,510 tok / 256 ms (2 turns) | 15,848 tok / 954 ms (6 turns) | 293,950 tok / 4,850 ms | 430,800 tok / 7,600 ms |
E. Long-Horizon 30-Op + Window OCR | 4,581 tok / 434 ms (0 vision tok) | 8,352 tok / 858 ms | 400,725 tok / 6,100 ms | 620,535 tok / 9,200 ms |
Related MCP server: macbot-mcp
Core Architecture
Tier 1 — Native Browser Engine (
BrowserEngine)Drives Chrome in unfocused, per-agent color-coded
"🤖 Agent"Tab Groups (active: false) viaextension/background.jsand a thread-safe Playwright worker (fmu-pw-worker) that avoids Chrome 136+/144+'s default-profileDevToolsActivePortmodal popup.Enables per-tab background focus and lifecycle emulation (
Emulation.setFocusEmulationEnabled({enabled: true})+Page.setWebLifecycleState({state: "active"})) sodocument.hasFocus() === true,requestAnimationFramestays at 60fps, and focus-dependent dropdowns work while you work elsewhere.Assigns persistent in-page
WeakMap/WeakRefelement identities (@u1..@uN) with Pre-Registered Table Row Folding (foldTables), indexing all rows inuidToRefso agents can target folded rows by label or UID while cutting initial dense table snapshots by >2.5x.Emits per-agent compact
+/~/-UID deltas with CRC-32 unchanged short-circuiting (= unchanged (crc=...)) and detects + executes WebMCP (navigator.modelContext) tools directly (tab.callTool(name, args)).Intercepts
<input type="file">uploads via CDP (DOM.setFileInputFiles) in exact step sequence so native macOSNSOpenPaneldialogs never steal focus.
Tier 2 — Native macOS Accessibility & Vision OCR Fallback (
fmu_ax.swift/MacNativeEngine)Concurrent, thread-safe Unix-domain socket daemon (
/tmp/fmu-ax.sock, binarybin/fmu-ax) keeping a warm 4,000-elementAXUIElementLRU cache, PID/window cache, per-agent+/~/-diff baselines, and per-agent virtual cursors (VirtualCursorState) across turns.Batches accessibility attribute fetches with
AXUIElementCopyMultipleAttributeValuesand skips redundant pre-action walks when baseline state is already cached.Lazy accessibility wakeup (
AXManualAccessibility = true/AXEnhancedUserInterface = true) only for target background PIDs.Stable
@a1..@aNUIDs (CFHash+ structural fallback),+/~/-UID diffs, and zero-focus background actions (AXPress$\rightarrow$AXConfirm$\rightarrow$ backgroundCGEvent.postToPidclick fallback, plus 16-char UTF-16 batchedCGEvent.postToPidkeystrokes).Built-in Apple Silicon
Vision.framework(VNRecognizeTextRequest) +CGWindowListCreateImageOCR fallback (op: "ocr"/app.ocr()) for GPU/canvas windows with 0 LLM vision tokens.
Tier 3 — Unified Multi-Cursor / Multi-Agent Stateful REPL, Warm Daemon & Context Hygiene (
FasterMacUseRuntime)Compact single-tool schema (268 tokens) supporting OpenAI Codex-style stateful
cua_replscripts (cua.createBrowserTab,cua.getTab,cua.getApp,cua.getState,cua.getCursors), 1-trip declarativestepsbatches, and concurrent multi-agent swarms ({"parallel": [{"agent": "agent-1", "code": "..."}, ...]}).Per-agent isolated
AgentSession(agent/cursorparameter) with independent REPL handle namespaces, independentContextWindowTrackerstale-snapshot masking, and independent virtual cursor(x, y)coordinates (tab.moveCursor/app.moveCursor).Concurrent persistent runtime daemon (
/tmp/fmu-runtime.sock) keeps Playwright browser tabs,WeakMapUIDs, andcua_replhandles warm across parallel CLI/MCP invocations (~79–125 ms for a 10-action web workflow; ~256 ms for a 3-agent 25-action parallel swarm).BackgroundIntrusionGuardpolls CoreGraphics (CGEventGetLocation+CGEventSourceSecondsSinceLastEventType) andlsappinfo frontat 50Hz to prove0.0 pxcursor displacement and0automated focus changes.
Quick Start
1. Install & Build the Native Swift Daemon
git clone https://github.com/lifan-builds/faster-mac-use.git
cd faster-mac-use
pip install -e .
swiftc -O src/native/fmu_ax.swift -o bin/fmu-ax(Note: if bin/fmu-ax is not pre-built, MacNativeEngine automatically compiles src/native/fmu_ax.swift on first run.)
2. Add to Your MCP Client (Claude Code, Codex, Cursor, Antigravity)
{
"mcpServers": {
"faster-mac-use": {
"command": "/path/to/faster-mac-use/bin/fmu",
"args": ["mcp"]
}
}
}3. CLI Usage (./bin/fmu)
# Native macOS Calculator in background (zero focus steal)
./bin/fmu '{"surface":"app","app":"Calculator","steps":[{"op":"key","name":"escape"},{"op":"click","name":"7"},{"op":"click","name":"Multiply"},{"op":"click","name":"6"},{"op":"click","name":"Equals"}]}'
# Codex-style stateful cua_repl script
./bin/fmu '{"code":"let tab = await cua.createBrowserTab(\"chrome\", \"https://example.com\", {sessionName: \"🤖 Agent\"});"}'
# Multi-cursor / multi-agent parallel execution across Chrome tabs + native macOS apps
./bin/fmu '{"parallel":[{"agent":"agent-1","code":"let t = await cua.createBrowserTab(\"chrome\", \"https://example.com\"); await t.move(\"More information\");"},{"agent":"agent-2","code":"let a = await cua.getApp(\"Calculator\"); await a.pressKey(\"escape\"); await a.click(\"8\");"}]}'4. Run Unit & Integration Tests
python3 tests/test_fmu.py5. Run the 5-Workload Competitor Benchmark Suite
PYTHONPATH=src python3 benchmarks/run_benchmarks.pyResults are written to benchmarks/results/latest_benchmark.md and benchmarks/results/latest_benchmark.json.
License
MIT © Lifan Chen
This server cannot be deployed
Maintenance
Related MCP Connectors
Give AI agents a real cloud Chrome: open sessions, navigate, read pages, click, type and screenshot.
Let AI agents use your real, signed-in Chrome: tabs, clicks, forms, screenshots and video.
AI-powered browser automation — navigate, click, fill forms, and extract data from any website.
Operate Linux, macOS and Windows from your LLM. Every action runs through an auditable allowlist.
Related MCP Servers
- AlicenseNot gradedqualityDmaintenanceProvides native macOS desktop automation for AI agents, enabling screen capture, mouse/keyboard control, window management, and iOS/Android simulator control in both foreground and background modes without focus stealing.4MIT
- AlicenseNot gradedqualityCmaintenanceEnables AI agents to control macOS applications through the Accessibility API, AppleScript, and CGEvents, providing structured text output of UI elements and actions without needing screenshots.MIT
- 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.16MIT
- AlicenseNot gradedqualityAmaintenanceLets any AI agent operate desktop apps on macOS, Windows and Linux in the background through the accessibility tree, including iPhone Mirroring on macOS. It shows the agent numbered elements plus a window screenshot, with built-in safety rules.2MIT