Install
openclaw skills install @dont-see-big-shark/remote-macos-computer-useSet up and use cua-driver (an MCP server) so an AI agent running on a remote/cloud host can drive a macOS desktop, with a persistent background daemon + reverse-SSH-tunnel wiring that survives reboots and stays in the background. Use when you want an agent on server A to click/type/capture on a Mac on another network, or to onboard a remote desktop onto any MCP-capable agent (Hermes, Claude Code, Codex, Cursor, OpenCode). Covers install, macOS TCC grants, remote login, reverse tunnel, per-agent MCP config, health checks, and safety (bounded mode).
openclaw skills install @dont-see-big-shark/remote-macos-computer-useConnect an agent running on a remote/cloud host to the desktop of a Mac on another network, so the agent can operate real macOS apps (open apps, click, type, screenshot) while the agent's memory/skills/schedules stay on the remote host.
cua-driver mcp). You are not writing a new MCP server.mcp__<server>__<tool> in the agent, e.g. mcp__mac_computer__list_apps, mcp__mac_computer__click, mcp__mac_computer__type_text.[ AI Agent on server ] --( mcp_servers: <server> )--> /usr/bin/ssh -T -p <revport> --( reverse tunnel )--> Mac sshd :22
|
cua-driver mcp --> CuaDriver.app daemon (TCC)
CuaDriver.app.~/.ssh/authorized_keys)./bin/bash -c "$(curl -fsSL https://cua.ai/driver/install.sh)").Privacy note: replace every
<...>placeholder with your own values. None of the scripts contain a real username or server address by default; you supply them via environment variables. The defaultREMOTE_USER=ubuntuis just the common cloud-image user and is not tied to anyone.
/bin/bash -c "$(curl -fsSL https://cua.ai/driver/install.sh)"
cua-driver doctor # verify install + permissions layout
cua-driver permissions grant # opens macOS prompt; grant Accessibility + Screen Recording
The grant must be for /Applications/CuaDriver.app (the app identity), not a terminal.
sudo launchctl enable system/com.openssh.sshd
sudo launchctl kickstart -k system/com.openssh.sshd
# or: System Settings -> General -> Sharing -> Remote Login -> ON
macOS recently tightened
systemsetup -setremotelogin onto require Full Disk Access. Thelaunchctl enable/kickstartpath avoids that. If sshd won't start, check/etc/ssh/sshd_configfor stray client options (e.g.ServerAliveInterval,ServerAliveCountMax) — they are invalid there and make sshd exit immediately.
On the server, generate a keypair, then add its public key to the Mac's ~/.ssh/authorized_keys:
ssh-keygen -t ed25519 -N "" -f ~/.ssh/id_ed25519_mac
ssh-copy-id -i ~/.ssh/id_ed25519_mac.pub -p <revport> <mac_user>@127.0.0.1 # only after tunnel is up
Or copy the public key manually into /Users/<mac_user>/.ssh/authorized_keys.
REMOTE_HOST=<server-ip> REMOTE_USER=<server_user> REVERSE_PORT=2299 \
bash ./scripts/setup-mac.sh
This installs three Login Items (~/Library/LaunchAgents):
com.trycua.driver — cua-driver daemon (RunAtLoad + KeepAlive).com.remote-macos.tunnel — reverse tunnel (keeps the server's <revport> -> Mac :22).com.remote-macos.keep-awake — caffeinate -dimsu so the Mac doesn't idle-sleep.Generate the exact config:
MAC_USER=<mac_user> REVERSE_PORT=2299 REMOTE_KEY=~/.ssh/id_ed25519_mac \
SERVER_NAME=mac_computer python3 ./scripts/gen-mcp-config.py
For Hermes (~/.hermes/config.yaml) the result goes under mcp_servers:. For other agents, adapt command/args to that client's stdio MCP form. Then reload:
/reload-mcp, or start a new session (existing sessions keep their old tool set).Note on tool naming: if an agent says it has no "mac_computer tool", it usually means the tools are named mcp__mac_computer__* and the session is stale — not that the server failed.
bash ./scripts/doctor-mac.sh # on the Mac: daemon, permissions, tunnel
# on the server:
hermes mcp test mac_computer # Hermes
# raw (after the tunnel is up):
ssh -p <revport> -i ~/.ssh/id_ed25519_mac <mac_user>@127.0.0.1 cua-driver mcp # then MCP initialize
Then ask the agent to run a read-only check:
Use
mcp__mac_computer__list_appsto list the macOS apps currently running. Do not use the agent's owncomputer_use(that drives the server, not the Mac).
RunAtLoad) and auto-restart (KeepAlive), so after a Mac reboot they come back (if the Mac auto-logs-in).sleep 5 + retry), so after the server reboots, the Mac reconnects within seconds.caffeinate -dimsu covers idle/display/system sleep but not a closed lid on battery.You are giving an agent GUI control of a machine. Default to bounded mode (limit to a reviewed set of apps) instead of standard (input to every app). cua-driver does this at the daemon level:
cua-driver serve --permission-mode bounded --capability-manifest <path> # in the daemon LaunchAgent
Also: require approval for destructive tools, keep the SSH key scoped to one account, and don't expose the tunnel/listener to the public internet (bind the reverse forward to 127.0.0.1 on the server, which is the default).
/reload-mcp) or start a brand-new session.Connection closed / no SSH banner on the Mac -> sshd config has invalid client options, or the service isn't enabled. Check /etc/ssh/sshd_config and sudo launchctl enable system/com.openssh.sshd.connect_to 127.0.0.1 port 22: failed -> Mac sshd not up, or the tunnel was established before Remote Login was enabled; restart the tunnel.cua-driver permissions grant; grants attach to the app bundle, so re-approve CuaDriver.app.scripts/setup-mac.sh — idempotent Mac-side setup (daemon, tunnel, keep-awake).scripts/doctor-mac.sh — health checks.scripts/gen-mcp-config.py — emits the mcp_servers fragment for the remote bridge.templates/ — the exact LaunchAgent plists and tunnel wrapper this skill installs.