/install mac-compute-use
Mac Compute Use
Control macOS GUI through the Accessibility API via MCP.
Setup
- Install the MCP server:
brew tap reedburns/mcp-server-macos-use
brew install mcp-server-macos-use
- Register with mcporter:
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
Tools
All tools are called via mcporter call macos-use.\x3Ctool> key=value.
open_application_and_traverse
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_and_traverse
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 center
type_and_traverse
Type text into the focused app.
mcporter call macos-use.macos-use_type_and_traverse pid=408 text="Hello world"
press_key_and_traverse
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_and_traverse
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
deltaYpositive = scroll down, negative = scroll updeltaXoptional, for horizontal scroll
refresh_traversal
Get current UI state without performing any action.
mcporter call macos-use.macos-use_refresh_traversal pid=408
Workflow Pattern
Typical automation flow:
- Open app → get PID and visible elements
- Read the visible_elements in the response summary — these are interactive elements with coordinates
- Click/type/press using coordinates from the UI tree
- Read the response — it shows what changed (diff) and new visible elements
- Repeat until task is complete
Reading the Response
Each tool returns a compact summary with:
status: success/errorpid: process ID (use for subsequent calls)file: path to full JSON with all elements (usegreporpython3to search)visible_elements: key interactive elements currently visible, with coordinates
When you need to find a specific element, grep the JSON file:
grep -i "search text" /tmp/macos-use/\x3Cfile>.json
Or parse with Python:
python3 -c "
import json
with open('/tmp/macos-use/\x3Cfile>.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}')
"
Tips
- Always use
--output jsonfor machine-readable results when chaining commands - After clicking, wait a moment then
refresh_traversalif the UI didn't update in the diff - Use app name ("Google Chrome"), bundle ID ("com.google.Chrome"), or path to open apps
- Coordinates are absolute screen positions — if the window moves, refresh the traversal
- The server writes traversal JSON to
/tmp/macos-use/— these files are temporary
- 确保已安装 OpenClaw(本地或 Docker 部署)
- 在对话框中输入安装命令:
/install mac-compute-use - 安装完成后,直接呼叫该 Skill 的名称或使用
/mac-compute-use触发 - 根据 Skill 的参数说明提供必要输入,即可获得结构化输出
Mac Compute Use 是什么?
Control macOS applications via Accessibility API through an MCP server. Open apps, click buttons, type text, press keys, scroll, and read UI state. Use when:... 它是一个面向 Claude Code / OpenClaw 的 AI Agent Skill 插件,目前累计下载 722 次。
如何安装 Mac Compute Use?
在 OpenClaw 或 Claude Code 对话框中运行命令「/install mac-compute-use」即可一键安装,无需额外配置。
Mac Compute Use 是免费的吗?
是的,Mac Compute Use 完全免费(开源免费),可自由下载、安装和使用。
Mac Compute Use 支持哪些平台?
Mac Compute Use 跨平台运行,可在任意部署了 OpenClaw / Claude Code 的环境中使用(cross-platform)。
谁开发了 Mac Compute Use?
由 Evgeniy(@reg2005)开发并维护,当前版本 v0.1.0。