cua-bridge
Provides macOS Computer Use integration, enabling agents to inspect running applications and control macOS apps and browsers through Accessibility and Screen Recording.
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.
Gemini for Mac & Antigravity CLI Computer Use MCP
English | 简体中文
One-command macOS setup to enable codex-computer-use-mcp (cua_repl) for both Gemini for Mac (via a zero-dependency loopback HTTP-to-stdio MCP bridge for macOS App-Sandboxed apps) and Antigravity CLI (direct native stdio).
Client | Transport | One-command setup |
Gemini for Mac | Loopback HTTP gateway + lightweight stdio bridge |
|
Antigravity CLI | Direct native stdio ( |
|
Why direct stdio fails in Gemini for Mac
Adding codex-computer-use-mcp directly as a Local MCP (stdio) server in Gemini for Mac fails during initialization with:
EPERM: operation not permitted, lstat '/Applications'/Applications/Gemini.app runs inside a strict macOS App Sandbox (com.apple.security.app-sandbox). Any stdio child process spawned by Gemini inherits that sandbox and cannot inspect /Applications/ChatGPT.app or launch the signed Computer Use components (codex / node_repl / SkyComputerUseService)—even if you grant Full Disk Access or Accessibility in System Settings.
Related MCP server: VBridge
How it works
This bridge splits codex-computer-use-mcp into two zero-dependency Node.js 22+ layers:
flowchart LR
G["Gemini for Mac<br/>(App Sandbox / Default)"] -->|"stdio JSON-RPC"| B["bridge.sh / bridge.mjs<br/>Only needs ~/.local + ~/.nvm + loopback HTTP"]
B -->|"HTTP POST 127.0.0.1:18765/mcp<br/>Bearer Token Auth"| S["server.mjs<br/>macOS LaunchAgent (unsandboxed)"]
S -->|"stdio"| M["codex-computer-use-mcp<br/>(cua_repl: js / js_reset)"]
M -->|"Signed runtime"| Mac["macOS Apps & Browsers"]Server (
src/server.mjs): Runs as a userLaunchAgent, binds strictly to127.0.0.1:18765, requires a0600random Bearer token, exposes standard MCP Streamable HTTP (POST /mcp,GET /mcpSSE stream with keepalive,DELETE /mcp,Mcp-Session-Id), and hostscodex-computer-use-mcp.Bridge (
src/bridge.mjs/bridge.sh): A tiny stdio-to-Streamable-HTTP forwarder for Gemini for Mac (whoseCloud MCPtab only accepts remote HTTPS/OAuth URLs). It only reads~/.local/share/cua-http-mcp/tokenand talks to127.0.0.1:18765/mcp, which works out of the box with Gemini's Default sandbox setting (~/.local,~/.nvm, and outbound network are allowed by default). No app patching or sandbox disabling required.
Prerequisites
macOS with an unlocked GUI user session
Node.js >= 22
Official ChatGPT macOS app opened at least once with its Computer Use component enabled (see
codex-computer-use-mcprequirements)macOS Accessibility and Screen Recording permissions granted as required by Computer Use
Quick Start
git clone https://github.com/the-waste-land/gemini-mac-computer-use-bridge.git
cd gemini-mac-computer-use-bridgeOption 1: Gemini for Mac
bash scripts/install.shThe installer checks Node >= 22, installs (or reuses) codex-computer-use-mcp, generates a 0600 Bearer token, installs & loads ~/Library/LaunchAgents/com.local.cua-http-mcp.plist, and runs an end-to-end self-test (initialize → tools/list → computer_use_status).
Then in Gemini for Mac:
Open More → Customize → Connectors → Custom → Local MCP
Fill in:
Server Name:
cua-bridgeDescription:
Local Computer Use MCP via loopback HTTP bridgeCommand:
/Users/<you>/.local/share/cua-http-mcp/bridge.sh(printed byinstall.sh)Sandbox settings: keep
Default
Click Next → accept consent → Connect
Verify in a new chat:
@cua-bridge call computer_use_status and js (await cua.listApps()) to list my running macOS apps
If you previously addedcodex-computer-use-mcp directly as a Local MCP (e.g. computer-use), remove that old entry in Gemini for Mac. A sandbox-blocked direct MCP entry can hang during initialization and cause Gemini's entire MCP tool discovery to time out (25s), blocking @cua-bridge as well.
Override port or Node path if needed:CUA_BRIDGE_PORT=18765 CUA_NODE_BIN=/path/to/node bash scripts/install.sh
Option 2: Antigravity CLI
bash scripts/install-antigravity.shSince Antigravity CLI runs in an unsandboxed terminal, it connects over native stdio directly. The script backs up and merges computer-use into ~/.gemini/config/mcp_config.json and runs an end-to-end stdio self-test. Open a new Antigravity CLI session to use js, js_reset, and computer_use_status.
Security Model
The HTTP gateway binds strictly to
127.0.0.1(never exposed to LAN or public networks).Every
/mcprequest requiresAuthorization: Bearer <token>stored at~/.local/share/cua-http-mcp/token(dir700, file600).Neither
/Applications/Gemini.appnor macOS SIP/App Sandbox is modified.Computer Use grants direct UI control over your desktop and browsers—use only on your personal trusted Mac.
Operations & Uninstall
# Check gateway health
curl -s http://127.0.0.1:18765/health
# View logs
tail -n 30 ~/.local/share/cua-http-mcp/server.log ~/.local/share/cua-http-mcp/server.err.log
# Restart background gateway
launchctl kickstart -k "gui/$(id -u)/com.local.cua-http-mcp"
# Clear lingering Computer Use software cursor if needed
pkill -f MacOS/SkyComputerUseService
# Uninstall
bash scripts/uninstall.sh # Gemini for Mac bridge + LaunchAgent
bash scripts/install-antigravity.sh --uninstall # Antigravity CLI config entryCredits
Built on top of
tmustier/codex-computer-use-mcp.
License
MIT
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
This server cannot be deployed
Maintenance
Related MCP Connectors
Connect AI assistants to your approved computer for files, commands, browser and desktop tasks.
Securely control computers you explicitly pair through files, terminals, processes, screenshots, desktop UI/input, clipboard, browser automation, diagnostics, and document tools.
EXZA Remote — AI Computer Commander Your computer. Your control. Securely connect your own macOS, Windows or Linux computer to compatible AI clients, including ChatGPT and Claude. EXZA Remote provides 59 MCP tools for authorized file management, terminal operations, system monitoring, desktop automation and email workflows. GETTING STARTED 1. Create an EXZA Remote account. 2. Install the official computer connection client. 3. Pair your device using a temporary six-digit PIN. 4. Approve the connection on your computer. 5. Connect your preferred MCP client using EXZA OAuth. MCP ENDPOINT https://remote.exza.de/mcp TRANSPORT Streamable HTTP with OAuth 2.0 KEY FEATURES • 59 MCP tool interfaces • Secure computer and file access • Terminal commands and background jobs • File search, reading and editing • System monitoring and desktop automation • macOS, Windows and Linux support • Owner-controlled permissions and approvals COMPLETE INSTALLATION & DOCUMENTATION Detailed setup instructions, terminal installation commands, all 59 tools, troubleshooting and security information: https://github.com/exzade/EXZA-Remote/blob/main/docs/GLAMA_OVERVIEW.md Official website: https://remote.exza.de EXZA Remote is an independent, OAuth-protected service. Computer access requires individual account authorization and device-owner approval.
Use your own Windows, Mac or Linux computer from ChatGPT, Claude, Cursor or Gemini CLI: run commands, read, write and search files, run long processes. Your computer only makes an outgoing connection (no open ports or VPN). Read-only mode, allowed folders, blocked commands and an action log keep you in control. Free plan available.
Related MCP Servers
- AlicenseNot gradedqualityDmaintenanceEnables AI services like Claude and Cursor to remotely control a Mac by executing shell commands, managing files, and running AppleScript for UI automation. Access is secured through OAuth 2.0 authentication and encrypted tunnels to protect remote interactions.2MIT
- AlicenseNot gradedqualityCmaintenanceEnables authorized remote MCP clients to securely reach local Mac or Windows tools over OAuth, including shell commands, file read/write, background jobs, screenshots, UI control, and clipboard access. It can also expose configured Desktop MCP servers and optional Claude Code task delegation.MIT
- AlicenseNot gradedqualityCmaintenanceExposes a secure OAuth2 + SSE Model Context Protocol endpoint that lets Gemini Web read a local project's files, directory trees, search results, git status/diffs, and workspace info on a read-only basis. It also pairs the browser-side automation with a local bridge daemon so prompts and answers flow both ways between Gemini Web and Google Antigravity.2MIT
- AlicenseNot gradedqualityAmaintenanceEnables web-based AI clients such as Claude, ChatGPT, Grok, and Postman to securely operate a local machine through a single OAuth-gated MCP endpoint exposing 38 governed tools. Covers file read/write/edit, whitelisted shell commands, search, Git, SQLite, browser automation, DevTools, background tasks, localhost fetching, clipboard, notifications, port management, and Postman control.MIT