macos-computer-use-mcp
Provides native macOS computer control, including mouse and keyboard simulation, screenshot capture, display management, and application control.
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., "@macos-computer-use-mcp Open the Notes app and type 'Buy milk and eggs'"
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.
macos-computer-use-mcp
A standalone MCP server providing native macOS computer control — mouse, keyboard, screenshots, and app management — for any MCP-compatible agent.
Demo
https://github.com/user-attachments/assets/130bee07-1f87-4291-8483-fc47ec51e493
Screenshot & Click in action — The MCP server grants app access, captures a 2560×1664 native screenshot, clicks on-screen elements, and opens URLs — all orchestrated through standard MCP tool calls from a coding agent.
Related MCP server: macos-desktop-control
Compatibility
Works with any client that supports the Model Context Protocol, including:
Claude Code (
claude mcp add)OpenAI Codex (
~/.codex/config.toml)Cursor (
~/.cursor/mcp.json)Any other MCP-compatible agent or IDE
How It Works
The server exposes macOS system control as MCP tools. Under the hood it uses macOS native modules for low-level input simulation and system APIs:
@ant/computer-use-input— Low-level mouse and keyboard event injection@ant/computer-use-swift— macOS native APIs for display management, app control, and screenshots
The MCP server process communicates over stdio, so any agent can spawn it as a subprocess and call its tools via the standard JSON-RPC protocol.
Available Tools (24)
Tool | Description |
| Request Accessibility permission for an app |
| Capture the full screen |
| Zoom into a screen region |
| Left-click at coordinates |
| Right-click at coordinates |
| Middle-click at coordinates |
| Double-click at coordinates |
| Triple-click at coordinates |
| Type a string of text |
| Press a key or key combination |
| Get current mouse position |
| Move the cursor to coordinates |
| Scroll at coordinates |
| Drag from one point to another |
| Left-click and drag |
| Get screen dimensions |
| List all connected displays |
| Get the currently active application |
| List all installed applications |
| Open an application by name or bundle ID |
| Close an application |
| Bring an application to the foreground |
| Get accessibility tree for screen content |
| Wait for a specified duration |
Installation
curl -fsSL https://raw.githubusercontent.com/Zooeyii/macos-computer-use-mcp/main/install.sh | bashOr manually:
git clone https://github.com/Zooeyii/macos-computer-use-mcp.git ~/.local/share/macos-computer-use-mcp
cd ~/.local/share/macos-computer-use-mcp
npm install
npm run buildConfiguration
Claude Code
claude mcp add -s user computer-use-standalone node $HOME/.local/share/macos-computer-use-mcp/dist/cli.jsOr add to ~/.claude/mcp.json:
{
"computer-use-standalone": {
"type": "stdio",
"command": "node",
"args": ["$HOME/.local/share/macos-computer-use-mcp/dist/cli.js"]
}
}OpenAI Codex
Add to ~/.codex/config.toml:
[mcp_servers.computer-use-standalone]
command = "node"
args = ["$HOME/.local/share/macos-computer-use-mcp/dist/cli.js"]Or via CLI:
codex mcp add computer-use-standalone -- node $HOME/.local/share/macos-computer-use-mcp/dist/cli.jsCursor
Add to ~/.cursor/mcp.json:
{
"mcpServers": {
"computer-use-standalone": {
"command": "node",
"args": ["$HOME/.local/share/macos-computer-use-mcp/dist/cli.js"]
}
}
}Requirements
macOS (Darwin) — macOS-only due to native module dependencies
Node.js 18+
Accessibility Permission — Required for mouse/keyboard control
System Settings → Privacy & Security → Accessibility
Screen Recording Permission — Required for screenshots
System Settings → Privacy & Security → Screen Recording
Architecture
MCP Client (Claude Code / Codex / Cursor / any agent)
│
│ stdio (JSON-RPC / MCP protocol)
│
▼
macos-computer-use-mcp (this server)
│
├── MCP Server
│ └── Tool handler
│
├── Tool Definitions
│ ├── Input tools (click, drag, scroll, type, key)
│ ├── Screen tools (screenshot, zoom, display info)
│ └── App tools (open, close, focus, list)
│
└── Executor
│
├── @ant/computer-use-input.node
│ └── Mouse / keyboard event injection
│
└── @ant/computer-use-swift
└── macOS native APIs
├── App management
├── Display control
└── Screenshot captureProject Structure
macos-computer-use-mcp/
├── src/
│ ├── cli.ts # MCP server entry point
│ ├── tools.ts # Tool definitions
│ └── executor.ts # Platform implementations
├── install.sh # One-line installer
├── package.json
├── tsconfig.json
├── tsup.config.ts
└── README.mdDevelopment
# Install dependencies
npm install
# Build
npm run build
# Run directly
node dist/cli.js
# Type-check only
npm run typecheckDisclaimer
This project is for educational and research purposes.
Native module interfaces are based on publicly observable runtime behavior.
Use at your own risk. Only run in trusted environments — computer use grants full control of your mouse, keyboard, and screen.
License
MIT
Available Tools
24 toolscomputer_batchA
Execute a sequence of actions in ONE tool call. Each individual tool call requires a model→API round trip (seconds); batching a predictable sequence eliminates all but one. Use this whenever you can predict the outcome of several actions ahead — e.g. click a field, type into it, press Return. Actions execute sequentially and stop on the first error. The frontmost application must be in the session allowlist at the time of this call, or this tool returns an error and does nothing. The frontmost check runs before EACH action inside the batch — if an action opens a non-allowed app, the next action's gate fires and the batch stops there. Mid-batch screenshot actions are allowed for inspection but coordinates in subsequent clicks always refer to the PRE-BATCH full-screen screenshot.
Inputs: actions (required).
cursor_positionA
Get the current mouse cursor position. Returns image-pixel coordinates relative to the most recent screenshot, or logical points if no screenshot has been taken.
Inputs: no named parameters.
double_clickA
Double-click at the given coordinates. Selects a word in most text editors. The frontmost application must be in the session allowlist at the time of this call, or this tool returns an error and does nothing.
Inputs: coordinate (required), text.
hold_keyA
Press and hold a key or key combination for the specified duration, then release. The frontmost application must be in the session allowlist at the time of this call, or this tool returns an error and does nothing. System-level combos require the systemKeyCombos grant.
Inputs: text (required), duration (required).
keyA
Press a key or key combination (e.g. "return", "escape", "cmd+a", "ctrl+shift+tab"). The frontmost application must be in the session allowlist at the time of this call, or this tool returns an error and does nothing. System-level combos (quit app, switch app, lock screen) require the systemKeyCombos grant — without it they return an error. All other combos work.
Inputs: text (required), repeat.
left_clickA
Left-click at the given coordinates. The frontmost application must be in the session allowlist at the time of this call, or this tool returns an error and does nothing.
Inputs: coordinate (required), text.
left_click_dragA
Press, move to target, and release. The frontmost application must be in the session allowlist at the time of this call, or this tool returns an error and does nothing.
Inputs: coordinate (required), start_coordinate.
left_mouse_downA
Press the left mouse button at the current cursor position and leave it held. The frontmost application must be in the session allowlist at the time of this call, or this tool returns an error and does nothing. Use mouse_move first to position the cursor. Call left_mouse_up to release. Errors if the button is already held.
Inputs: no named parameters.
left_mouse_upA
Release the left mouse button at the current cursor position. The frontmost application must be in the session allowlist at the time of this call, or this tool returns an error and does nothing. Pairs with left_mouse_down. Safe to call even if the button is not currently held.
Inputs: no named parameters.
list_granted_applicationsA
List the applications currently in the session allowlist, plus the active grant flags and coordinate mode. No side effects.
Inputs: no named parameters.
middle_clickA
Middle-click (scroll-wheel click) at the given coordinates. The frontmost application must be in the session allowlist at the time of this call, or this tool returns an error and does nothing.
Inputs: coordinate (required), text.
mouse_moveA
Move the mouse cursor without clicking. Useful for triggering hover states. The frontmost application must be in the session allowlist at the time of this call, or this tool returns an error and does nothing.
Inputs: coordinate (required).
open_applicationA
Bring an application to the front, launching it if necessary. The target application must already be in the session allowlist — call request_access first.
Inputs: app (required).
read_clipboardA
Read the current clipboard contents as text. Requires the clipboardRead grant.
Inputs: no named parameters.
request_accessA
Request user permission to control a set of applications for this session. Must be called before any other tool in this server. The user sees a single dialog listing all requested apps and either allows the whole set or denies it. Call this again mid-session to add more apps; previously granted apps remain granted. Returns the granted apps, denied apps, and screenshot filtering capability.
Inputs: apps (required), reason (required), clipboardRead, clipboardWrite, +1 more.
right_clickA
Right-click at the given coordinates. Opens a context menu in most applications. The frontmost application must be in the session allowlist at the time of this call, or this tool returns an error and does nothing.
Inputs: coordinate (required), text.
screenshotA
Take a screenshot of the primary display. On this platform, screenshots are NOT filtered — all open windows are visible. Input actions targeting apps not in the session allowlist are rejected. Returns an error if the allowlist is empty. The returned image is what subsequent click coordinates are relative to.
Inputs: save_to_disk.
scrollA
Scroll at the given coordinates. The frontmost application must be in the session allowlist at the time of this call, or this tool returns an error and does nothing.
Inputs: coordinate (required), scroll_amount (required), scroll_direction (required).
switch_displayA
Switch which monitor subsequent screenshots capture. Use this when the application you need is on a different monitor than the one shown. The screenshot tool tells you which monitor it captured and lists other attached monitors by name — pass one of those names here. After switching, call screenshot to see the new monitor. Pass "auto" to return to automatic monitor selection.
Inputs: display (required).
triple_clickA
Triple-click at the given coordinates. Selects a line in most text editors. The frontmost application must be in the session allowlist at the time of this call, or this tool returns an error and does nothing.
Inputs: coordinate (required), text.
typeA
Type text into whatever currently has keyboard focus. The frontmost application must be in the session allowlist at the time of this call, or this tool returns an error and does nothing. Newlines are supported. For keyboard shortcuts use key instead.
Inputs: text (required).
waitA
Wait for a specified duration.
Inputs: duration (required).
write_clipboardA
Write text to the clipboard. Requires the clipboardWrite grant.
Inputs: text (required).
zoomA
Take a higher-resolution screenshot of a specific region of the last full-screen screenshot. Use this liberally to inspect small text, button labels, or fine UI details that are hard to read in the downsampled full-screen image. IMPORTANT: Coordinates in subsequent click calls always refer to the full-screen screenshot, never the zoomed image. This tool is read-only for inspecting detail.
Inputs: region (required), save_to_disk.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 24 tools
Each tool targets a distinct action (e.g., click types, keyboard, screenshots, clipboard, application control). The many click tools are clearly differentiated by modifiers (double, triple, right, drag, press/release), and composite actions like computer_batch occupy their own niche.
All tool names use lowercase with underscores for multi-word names (e.g., left_click_drag, list_granted_applications). Simple actions use short single words (key, type, wait). The pattern is uniform and predictable.
24 tools is on the higher end, but each tool covers a necessary primitive for computer control (clicks, keyboard, screenshots, clipboard, app management, batching). The count is justified given the breadth of actions an agent might need.
The tool set covers all major interaction primitives: mouse, keyboard, screenshots (full and zoomed), display switching, clipboard, application launching, permissions management, and batching. There are no obvious gaps for basic computer use tasks.
Related MCP Connectors
Automate 1,000+ services from any MCP-compatible AI agent: build Applets, run actions and queries.
MCP server for your apps' tools and custom tools, plus hosted AI agents and approval-gated workflows
MCP connector that lets ChatGPT list, search, and run your Apple Shortcuts via a local Mac agent
214 tools for AI agents over one MCP endpoint: image, video, audio, 3D, data, storage, mail, GPUs.
Related MCP Servers
- AlicenseNot gradedqualityDmaintenanceAn MCP server for reliable native macOS desktop control from AI agents, providing 72 tools for screenshots, mouse, keyboard, scroll, clipboard, window management, and more.MIT
- AlicenseNot gradedqualityDmaintenanceProvides native macOS desktop automation for AI agents, enabling screen capture, mouse/keyboard control, window management, and iOS/Android simulator control in both foreground and background modes without focus stealing.6MIT
- AlicenseAqualityDmaintenanceEnables AI agents to control macOS desktop apps via screenshots, mouse clicks, keyboard input, accessibility queries, and AppleScript.1111 npmMIT
- AlicenseNot gradedqualityDmaintenanceProvides 146 MCP tools for AI agents to control macOS, including screenshots, mouse, keyboard, window management, app automation, file system, OCR, and built-in app semantics like Calendar, Mail, Safari, Music, Messages. Enables full control over macOS through natural language.2MIT