Provides native macOS computer control, including mouse and keyboard simulation, screenshot capture, display management, and application control.
Click on "Install 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-mcpOpen 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.
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
This server cannot be installed
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.