computer-use-mac-mcp
Provides desktop automation for macOS, enabling AI agents to capture screenshots, control mouse and keyboard, and manage multi-monitor setups.
Click on "Deploy Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@computer-use-mac-mcp Take a screenshot of my main display"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
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 displayNo native compilation — pure JS implementation, works with Node.js ≥ 18 or Bun ≥ 1.3
Related MCP server: Computer Use MCP Server
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.jsTools 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 |
| Capture the screen as JPEG |
| Left-click at |
| Right-click at |
| Middle-click at |
| Double-click at |
| Click and drag from one point to another |
| Move cursor without clicking |
| Scroll at |
| Get current cursor coordinates |
| Type text — auto clipboard for CJK/Unicode |
| Press a key or combo (e.g. |
| Hold a key for a specified duration |
| Capture and zoom a screen region |
| Declare which apps the agent will control |
| 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 |
| MCP server, tool definitions, coordinate dispatch | MCP SDK + |
| Screenshot, app listing, app activation |
|
| Mouse movement, clicks, scroll, keyboard | JXA + CoreGraphics |
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 | ||
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 | ✅ | ❌ |
Needs API key to run | ❌ | ✅ |
Native addons | ❌ pure JS | ❌ pure Python |
License
MIT
Available Tools
15 toolscursor_positionA
Get the current cursor position as {x, y} in screenshot coordinates.
Inputs: no named parameters.
double_clickA
Double-click the left mouse button at the specified coordinates.
Inputs: x (required), y (required).
hold_keyC
Hold one or more keys for a duration.
Inputs: key (required), duration_ms.
keyA
Press a key or key combination. Use "+" to combine modifiers, e.g. "ctrl+c", "command+shift+z". Named keys: escape, return, tab, space, delete, up, down, left, right, f1–f12. IMPORTANT: On macOS, always prefer "command" over "ctrl" for standard shortcuts — e.g. use "command+a" (select-all), "command+c" (copy), NOT "ctrl+a"/"ctrl+c". "ctrl+a" and similar ctrl-shortcuts may trigger third-party app global hotkeys.
Inputs: text (required), repeat.
left_clickA
Click the left mouse button at the specified coordinates.
Inputs: x (required), y (required), modifiers.
left_click_dragA
Click and drag the mouse from start_coordinate to coordinate.
Inputs: coordinate (required), start_coordinate.
middle_clickB
Click the middle mouse button at the specified coordinates.
Inputs: x (required), y (required).
mouse_moveA
Move the mouse cursor to the specified coordinates without clicking.
Inputs: x (required), y (required).
request_accessA
Request permission to control specific applications. Call this FIRST before any other computer-use tool. The user will approve or deny access for each app.
Inputs: apps (required).
right_clickA
Click the right mouse button at the specified coordinates.
Inputs: x (required), y (required).
screenshotA
Take a screenshot of the current state of the screen. Returns a JPEG image. Call this frequently to observe what is on screen.
Inputs: no named parameters.
scrollC
Scroll the mouse wheel at the specified coordinates.
Inputs: x (required), y (required), vertical_distance, horizontal_distance.
switch_displayA
Switch the active display for subsequent screenshots and actions.
Inputs: display (required).
typeB
Type text at the current cursor position. Works with any Unicode text.
Inputs: text (required).
zoomA
Take a zoomed-in screenshot of the area around the specified coordinate.
Inputs: coordinate (required).
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 15 tools
Each tool targets a distinct action: separate mouse clicks, dragging, mouse movement, scrolling, text input, key combos, key holding, and screen observation. The only near-overlap is type/key, but type is for Unicode text while key is for shortcuts and named keys, so the boundary is clear.
Most tools follow a lowercase snake_case action-oriented pattern like left_click, mouse_move, hold_key, and request_access. A few names are noun-style or bare verbs—key, screenshot, cursor_position—making the pattern slightly inconsistent, but they are still readable and predictable.
15 tools is well-scoped for a computer-use MCP server covering mouse, keyboard, screen capture, display switching, and permission handling. Each tool serves a distinct and justified purpose without redundancy.
The toolkit covers the core computer-use loop thoroughly: observe via screenshot/zoom, inspect cursor state, perform mouse actions, input text and keyboard shortcuts, hold keys, drag, scroll, and manage permissions/displays. There are no dead ends for common GUI automation workflows.
Maintenance
Related MCP Connectors
Screenshots, PDFs, image editing, QR codes, email validation and more through one hosted MCP server.
A remote MCP server to convert HTML documents (URL or raw source) to PDF or screenshots
MCP server to assist with JxBrowser development.
Remote MCP access to authorized Mac and Windows computers, with consent and STOP controls.
Related MCP Servers
- AlicenseNot gradedqualityDmaintenanceAn open-source local MCP server for macOS that provides desktop control tools (click, type, scroll, etc.) callable from any MCP-aware client.11MIT
- AlicenseNot gradedqualityDmaintenanceA production-grade macOS MCP server exposing 33 tools for full desktop automation, including mouse, keyboard, screenshot, clipboard, and window control.1MIT
- AlicenseNot gradedqualityDmaintenanceStandalone MCP server that gives AI agents full GUI control over macOS — screenshots, mouse, keyboard, apps, clipboard, and multi-display — with zero private dependencies.20MIT
- AlicenseBqualityDmaintenanceMCP server that enables AI to fully control macOS — mouse, keyboard, terminal, screenshots, window management, UI element detection, and provides AI-optimized information reporting.36MIT