Install
openclaw skills install mac-compute-useControl macOS applications via Accessibility API through an MCP server. Open apps, click buttons, type text, press keys, scroll, and read UI state. Use when:...
openclaw skills install mac-compute-useControl macOS GUI through the Accessibility API via MCP.
brew tap reedburns/mcp-server-macos-use
brew install mcp-server-macos-use
mcporter config add macos-use --transport stdio --command $(which mcp-server-macos-use)
Grant Accessibility permission:
System Settings → Privacy & Security → Accessibility → add mcp-server-macos-use
Verify:
mcporter list macos-use --schema
All tools are called via mcporter call macos-use.<tool> key=value.
Open/activate an app and get its UI tree.
mcporter call macos-use.macos-use_open_application_and_traverse identifier="Google Chrome"
mcporter call macos-use.macos-use_open_application_and_traverse identifier="com.apple.finder"
mcporter call macos-use.macos-use_open_application_and_traverse identifier="TextEdit"
Returns: PID, element count, visible interactive elements, and a JSON file path with full UI tree.
Click at coordinates (from UI tree) and get updated state.
mcporter call macos-use.macos-use_click_and_traverse pid=408 x=701 y=73 width=102 height=41
x, y: top-left corner of the element (from traversal)width, height: optional, when provided click lands at centerType text into the focused app.
mcporter call macos-use.macos-use_type_and_traverse pid=408 text="Hello world"
Press a key with optional modifiers.
mcporter call macos-use.macos-use_press_key_and_traverse pid=408 keyName=Return
mcporter call macos-use.macos-use_press_key_and_traverse pid=408 keyName=a modifierFlags='["Command"]'
mcporter call macos-use.macos-use_press_key_and_traverse pid=408 keyName=Tab
mcporter call macos-use.macos-use_press_key_and_traverse pid=408 keyName=Escape
Valid modifiers: CapsLock, Shift, Control, Option, Command, Function, NumericPad, Help.
Scroll within an app window.
mcporter call macos-use.macos-use_scroll_and_traverse pid=408 x=500 y=400 deltaY=3
mcporter call macos-use.macos-use_scroll_and_traverse pid=408 x=500 y=400 deltaY=-3
deltaY positive = scroll down, negative = scroll updeltaX optional, for horizontal scrollGet current UI state without performing any action.
mcporter call macos-use.macos-use_refresh_traversal pid=408
Typical automation flow:
Each tool returns a compact summary with:
status: success/errorpid: process ID (use for subsequent calls)file: path to full JSON with all elements (use grep or python3 to search)visible_elements: key interactive elements currently visible, with coordinatesWhen you need to find a specific element, grep the JSON file:
grep -i "search text" /tmp/macos-use/<file>.json
Or parse with Python:
python3 -c "
import json
with open('/tmp/macos-use/<file>.json') as f:
data = json.load(f)
for e in data.get('traversal',{}).get('elements',[]):
text = (e.get('text') or '').strip()
if text and 'search' in text.lower():
print(f'[{e[\"role\"]}] ({e[\"x\"]},{e[\"y\"]} {e.get(\"width\",\"?\")}x{e.get(\"height\",\"?\")}) {text}')
"
--output json for machine-readable results when chaining commandsrefresh_traversal if the UI didn't update in the diff/tmp/macos-use/ — these files are temporary