computer-use-mac-mcp
MCP server for macOS desktop automation enabling screenshot, click, type, scroll, and more. Retina-aware, supports CJK text input and multi-monitor, works with any MCP client without API keys.
README
computer-use-mac-mcp
中文文档 | English
MCP server for macOS desktop automation — screenshot, click, type, scroll and more.
Gives Claude (or any MCP-compatible agent) the ability to see and control your Mac. Implements the standard mcp__computer-use__* tool interface so it works with Claude Desktop, Claude Code, Cursor, and any other MCP client — no API key required at the tool level.
Pure JS, no native addons. Uses screencapture, osascript (JXA/AppKit), and CoreGraphics CGEvent.
Highlights
- Standard MCP interface — plug into any MCP-compatible client, not locked to a specific AI provider
- Retina display aware — correctly scales screenshot-space coordinates to physical pixels
- CJK / Unicode text input — automatically routes non-ASCII text through clipboard paste (fixes garbled Chinese/Japanese/Korean input)
- Multi-monitor support —
switch_displaytool lets agents target any connected display - No native compilation — pure JS implementation, works with Node.js ≥ 18 or Bun ≥ 1.3
Requirements
- macOS
- Node.js ≥ 18 or Bun ≥ 1.3
- Screen Recording permission — System Settings → Privacy & Security → Screen Recording
- Accessibility permission — System Settings → Privacy & Security → Accessibility
Quick Start
# 1. Clone
git clone https://github.com/somethingforheheda/computer-use-mac-mcp.git
cd computer-use-mac-mcp
# 2. Install dependencies
npm install
# 3. Add to your MCP client config (see below)
Claude Code CLI
computer-use is a reserved name in Claude Code CLI. Use a different name:
claude mcp add -s user mac-control /path/to/node /path/to/computer-use-mac-mcp/index.js
Tools will be available as mcp__mac-control__screenshot, mcp__mac-control__left_click, etc.
Claude Desktop
Edit ~/Library/Application Support/Claude/claude_desktop_config.json:
{
"mcpServers": {
"computer-use": {
"type": "stdio",
"command": "node",
"args": ["/path/to/computer-use-mac-mcp/index.js"]
}
}
}
Claude Code / jarvis-cc
{
"computer-use": {
"type": "stdio",
"command": "node",
"args": ["/path/to/computer-use-mac-mcp/index.js"]
}
}
Available Tools (15)
| Tool | Description |
|---|---|
screenshot |
Capture the screen as JPEG |
left_click |
Left-click at (x, y) |
right_click |
Right-click at (x, y) |
middle_click |
Middle-click at (x, y) |
double_click |
Double-click at (x, y) |
left_click_drag |
Click and drag from one point to another |
mouse_move |
Move cursor without clicking |
scroll |
Scroll at (x, y) |
cursor_position |
Get current cursor coordinates |
type |
Type text — auto clipboard for CJK/Unicode |
key |
Press a key or combo (e.g. command+c, command+a) |
hold_key |
Hold a key for a specified duration |
zoom |
Capture and zoom a screen region |
request_access |
Declare which apps the agent will control |
switch_display |
Switch active display for multi-monitor setups |
Coordinate System
Coordinates are in screenshot-space pixels. Always call screenshot first — the server caches the display dimensions and uses them to correctly map click coordinates to physical pixels (including Retina 2× scaling).
Multi-monitor
# Switch to external display (0 = primary, 1 = secondary, ...)
switch_display { "display": 1 }
After switching, subsequent screenshot and click tools target the selected display.
How it works
Three packages under packages/:
| Package | Responsibility | Implementation |
|---|---|---|
computer-use-mcp |
MCP server, tool definitions, coordinate dispatch | MCP SDK + bindSessionContext |
computer-use-swift |
Screenshot, app listing, app activation | screencapture + osascript (JXA/AppKit) |
computer-use-input |
Mouse movement, clicks, scroll, keyboard | JXA + CoreGraphics CGEventCreateMouseEvent / CGEventCreateKeyboardEvent |
The entry point (index.js) wires these together and exposes them over stdio as an MCP server. No subprocess is spawned per tool call — everything runs in a single Node process.
Comparison
| this project | PallavAg/claude-computer-use-macos | |
|---|---|---|
| Language | JS (Node/Bun) | Python |
| Interface | MCP Server (any client) | Standalone script (Claude API only) |
| Retina support | ✅ | ❌ |
| CJK text input | ✅ auto clipboard | ❌ garbled output |
| Multi-monitor | ✅ switch_display |
❌ |
| Needs API key to run | ❌ | ✅ |
| Native addons | ❌ pure JS | ❌ pure Python |
License
MIT
推荐服务器
Baidu Map
百度地图核心API现已全面兼容MCP协议,是国内首家兼容MCP协议的地图服务商。
Playwright MCP Server
一个模型上下文协议服务器,它使大型语言模型能够通过结构化的可访问性快照与网页进行交互,而无需视觉模型或屏幕截图。
Magic Component Platform (MCP)
一个由人工智能驱动的工具,可以从自然语言描述生成现代化的用户界面组件,并与流行的集成开发环境(IDE)集成,从而简化用户界面开发流程。
Audiense Insights MCP Server
通过模型上下文协议启用与 Audiense Insights 账户的交互,从而促进营销洞察和受众数据的提取和分析,包括人口统计信息、行为和影响者互动。
VeyraX
一个单一的 MCP 工具,连接你所有喜爱的工具:Gmail、日历以及其他 40 多个工具。
graphlit-mcp-server
模型上下文协议 (MCP) 服务器实现了 MCP 客户端与 Graphlit 服务之间的集成。 除了网络爬取之外,还可以将任何内容(从 Slack 到 Gmail 再到播客订阅源)导入到 Graphlit 项目中,然后从 MCP 客户端检索相关内容。
Kagi MCP Server
一个 MCP 服务器,集成了 Kagi 搜索功能和 Claude AI,使 Claude 能够在回答需要最新信息的问题时执行实时网络搜索。
e2b-mcp-server
使用 MCP 通过 e2b 运行代码。
Neon MCP Server
用于与 Neon 管理 API 和数据库交互的 MCP 服务器
Exa MCP Server
模型上下文协议(MCP)服务器允许像 Claude 这样的 AI 助手使用 Exa AI 搜索 API 进行网络搜索。这种设置允许 AI 模型以安全和受控的方式获取实时的网络信息。