MacOS skill lets agents control a Mac like a human: taking screenshots, clicking and typing, opening apps, managing files, and reading system state. It communicates with the Definable Desktop Bridge — a lightweight Swift app that exposes macOS capabilities over a local HTTP API.
Setup
1. Build and run the Desktop Bridge
- Generates a random auth token and writes it to
~/.definable/bridge-token(chmod 600) - Checks Accessibility and Screen Recording permissions
- Listens on
http://127.0.0.1:7777
2. Install the Python package
desktop extra adds websockets for the optional DesktopInterface. The bridge client uses httpx, which is already a core dependency.
Quick Start
~/.definable/bridge-token automatically — no token configuration required.
Constructor Parameters
str
default:"\"127.0.0.1\""
Bridge hostname. Change only if the bridge runs on a different host.
int
default:7777
Bridge port.
Optional[str]
default:"None"
Bearer token for bridge authentication. If
None, automatically reads from ~/.definable/bridge-token.Optional[Set[str]]
default:"None"
App allowlist. When set, only app names in this set can be targeted by tools. Apps in both
allowed_apps and blocked_apps are blocked (blocked takes precedence).Set[str]
default:"set()"
App blocklist. App names in this set are always rejected, regardless of
allowed_apps.bool
default:true
Expose the
run_applescript tool. Disable when scripting access is not needed.bool
default:true
Expose
write_file and move_file tools. read_file and list_files are always available.bool
default:true
Expose input simulation tools:
click, type_text, press_key, scroll, drag, set_clipboard, click_element, set_element_value.Tools Reference
Screen (always available)
Input (requires enable_input=True)
Apps (always available)
Windows (always available)
Accessibility (always available)
Files (always readable; write requires enable_file_write=True)
Clipboard (always available)
System (always available)
AppleScript (requires enable_applescript=True)
Tool Counts
Safety Controls
App Allowlisting
App Blocklisting
Read-Only Mode
allowed_apps and blocked_apps both contain the same app, blocked_apps wins (security-first).
Required macOS Permissions
Grant these in System Settings → Privacy & Security before using the bridge:
The
/health endpoint reports current permission status:
Remote Control via Telegram
Control your Mac remotely using the MacOS skill + Telegram interface:Using BridgeClient Directly
definable/definable/interfaces/desktop/bridge_client.py for the full API.
DesktopInterface (Local Chat)
TheDesktopInterface provides a local WebSocket server for direct chat without an external messaging platform:
{"text": "your message"}.
Bridge API Reference
The bridge exposes a JSON HTTP API onhttp://127.0.0.1:7777. All endpoints require Authorization: Bearer <token>. See the Desktop Bridge README for the full endpoint reference.