MCP server for macOS desktop automation via the Accessibility API.
Copy the AI prompt to install this server into Claude Code, Cursor, or another agent β or use 1-click editor setup below.
π‘ Paste into ~/Library/Application Support/Claude/claude_desktop_config.json (macOS) or %APPDATA%\Claude\claude_desktop_config.json (Windows)
macOS-MCP is a lightweight, open-source Model Context Protocol server that bridges AI agents and the macOS operating system. It enables seamless automation of macOS through LLMs via tasks such as file navigation, application control, UI interaction, browser automation, and system operations.
Works with Any LLM (Vision Optional)
Unlike traditional automation tools, macOS-MCP doesn't require computer vision, fine-tuned models, or specialized setup. Works seamlessly with any LLMβClaude, GPT, Gemini, or others.
Native macOS Integration
Interacts natively with macOS UI elements using the Accessibility API. Opens apps, controls windows, simulates user input, and captures desktop state without workarounds.
Rich Toolset for Automation
Complete toolkit for keyboard/mouse operations, window management, UI state capture, interactive element extraction from the accessibility tree, and AppleScript execution.
Lightweight and Open-Source
Minimal dependencies with full source code available under MIT license. Easy setup and deployment.
Smart Context Awareness
Automatically detects application state (Launchpad, Control Center, Spotlight). Scans menu bar, dock, desktop, and system UI elements intelligently.
Customizable and Extensible
Easily extend with custom tools or modify behavior to suit your specific automation needs.
pip install uv or curl -LsSf https://astral.sh/uv/install.sh | shRun the server directly:
Run it as a background service that starts now and at every login:
This installs a launchd Launch Agent at ~/Library/LaunchAgents/com.macos-mcp.server.plist.
Use macos-mcp uninstall to remove it. Logs are written to ~/.macos-mcp/server.log
and ~/.macos-mcp/server.error.log.
| Transport | Flag | Use Case |
|---|---|---|
stdio (default) | --transport stdio | Direct connection from MCP clients like Claude Desktop, Cursor, etc. |
sse | --transport sse --host HOST --port PORT | Network-accessible via Server-Sent Events |
streamable-http | --transport streamable-http --host HOST --port PORT | Network-accessible via HTTP streaming (recommended for production) |
macOS-MCP requires Accessibility and Screen Recording permissions to function properly.
/usr/bin/python3 or the Python version managed by UV)~/.local/bin/uv if installed locally, or the Python environment UV manages)For uvx users: Grant permissions to your terminal application and Python, as uvx runs Python packages from UV's cache.
If the interpreter binary is greyed out / unselectable in the "+" picker (a known issue with UV-managed Python symlinks, e.g. .venv/bin/python3.12 β ~/.local/share/uv/python/...): don't try to add it manually. Instead, just start the server β since v0.3.10 it calls AXIsProcessTrustedWithOptions with the prompt option on startup, which asks macOS to show its native consent dialog and auto-register the running process for you. Approve that dialog and restart the server.
If you're launched as a subprocess by a parent that already holds Accessibility access (e.g. certain Claude Desktop configurations), and permission checks still fail spuriously, set MACOS_MCP_SKIP_PERMISSION_CHECK=1 to downgrade the check to a warning instead of exiting.
The Snapshot tool requires Screen Recording permissions to capture screenshots:
Note: If the Snapshot tool fails, verify both permissions are granted in System Settings.
Install Claude Desktop
Edit ~/Library/Application Support/Claude/claude_desktop_config.json:
Claude Desktop's claude_desktop_config.json only supports stdio-based server
entries. To connect to a running macOS-MCP HTTP server (e.g. one started with
macos-mcp install --transport streamable-http), use
mcp-remote as a stdio-to-HTTP
bridge.
This is especially useful when running multiple Claude Desktop instances
(e.g. via Parall) β a single persistent HTTP server
handles all of them, avoiding the overhead of spawning a separate macos-mcp
process per session.
1. Start the HTTP server (one-time setup):
2. Configure Claude Desktop to connect via mcp-remote:
3. Restart Claude Desktop.
If you have multiple Claude Desktop instances (e.g. Parall clones), add the
same mcpServers entry to each instance's claude_desktop_config.json. All
instances will share the single background server.
A migration script is included for bulk reconfiguration β see
scripts/stdio-to-http-reconfig.sh.
With authentication (recommended when binding to 0.0.0.0):
Navigate to ~/.gemini and open settings.json
Add the server config:
Install Claude Code
Add to your project configuration or use the MCP marketplace integration
Pi does not ship with built-in MCP support, but macOS-MCP can be installed as a Pi package. The package starts this MCP server over stdio and exposes convenient Pi tools that wrap the existing macOS-MCP tools.
One-line global setup:
After install, restart Pi or run:
Try without installing:
Local checkout setup:
If you copied only the extension into another Pi project, run Pi from the macOS-MCP checkout or set:
The extension exposes these Pi tools:
| Pi Tool | Purpose |
|---|---|
mac_snapshot | Read current macOS UI state through the existing Snapshot tool. |
mac_app | Launch, switch, move, or resize macOS applications/windows. |
mac_click | Click coordinates returned by mac_snapshot. |
mac_type | Type text at coordinates returned by mac_snapshot. |
mac_shortcut | Run keyboard shortcuts such as command+c or command+space. |
mac_scroll | Scroll at the current pointer or coordinates. |
mac_wait | Wait for UI changes/loading. |
Recommended agent workflow:
mac_snapshot first.mac_click, mac_type, and mac_scroll.The extension auto-detects the macOS-MCP checkout when installed as a Pi package. If you use a manually copied extension, set MACOS_MCP_ROOT=/path/to/MacOS-MCP.
Tau does not ship with built-in MCP support. This repo includes a project-local Tau extension at .tau/extensions/macos-mcp/ that starts the macOS-MCP server over stdio and exposes Tau-native tools that wrap the existing macOS-MCP tools.
Local checkout setup:
Tau auto-discovers project extensions under .tau/extensions/*/ when run from the checkout, and installs the extension's own dependencies (declared in manifest.json) automatically on first load. If Tau is already running, use /reload.
If you copied only the extension into another Tau project, run Tau from the macOS-MCP checkout or set:
The extension exposes these Tau tools:
| Tau Tool | Purpose |
|---|---|
mac_snapshot | Read current macOS UI state through the existing Snapshot tool. |
mac_app | Launch, switch, or resize macOS applications/windows. |
mac_click | Click coordinates returned by mac_snapshot. |
mac_type | Type text at coordinates returned by mac_snapshot. |
mac_shortcut | Run keyboard shortcuts such as command+c or command+space. |
mac_scroll | Scroll at the current pointer or coordinates. |
mac_wait | Wait for UI changes/loading. |
Recommended agent workflow:
mac_snapshot first.mac_click, mac_type, and mac_scroll.The extension auto-detects the macOS-MCP checkout. If you use a manually copied extension, set MACOS_MCP_ROOT=/path/to/MacOS-MCP.
Any client supporting the Model Context Protocol can integrate macOS-MCP by configuring the uvx macos-mcp command in their MCP server settings.
macOS-MCP provides a comprehensive toolset for desktop automation:
| Tool | Purpose |
|---|---|
| Click | Click at coordinates with support for left, right, and double-click |
| Type | Type text at cursor position, optionally clearing existing text |
| Scroll | Scroll vertically or horizontally in focused window or regions |
| Move | Move mouse pointer or drag to coordinates |
| Shortcut | Press keyboard shortcuts (Cmd+C, Cmd+Tab, etc.) |
| App | Launch applications, manage windows (resize/move), switch between apps. Supports app names and bundle IDs |
| Desktop | Create a new Mission Control Space (virtual desktop) via Accessibility, verifying the space count increased |
| Shell | Execute commands or AppleScript. Use mode='osascript' for AppleScript |
| Scrape | Extract and convert webpage content to Markdown format |
| Wait | Pause execution for a defined duration |
Requires Authorization: Bearer your_token header on all requests.
Restricts connections to specified CIDR ranges.
For MCP clients that use OAuth (e.g. Claude Desktop) instead of a static API key:
Claude Desktop config (via mcp-remote bridge β see Integration Options):
Note: Claude Desktop's
claude_desktop_config.jsondoes not support"type": "http"or"url"entries directly. Usemcp-remoteas shown above, or add the server via Settings β Connectors β Add custom connector in the Claude Desktop UI.
The OAuth server exposes:
GET /.well-known/oauth-authorization-server β server metadata (RFC 8414)GET /oauth/authorize β Authorization Code + PKCE (S256 required)POST /oauth/token β token exchange (client secret required)POST /oauth/register β disabled; clients must be pre-provisionedDynamic client registration is disabled. Redirect URIs must be loopback http(s) only.
Auth key and OAuth can coexist β both are accepted as valid Bearer tokens.
The Scrape tool blocks: private IPs, loopback, link-local, credentials-in-URLs, non-HTTP schemes.
~/.macos-mcp/config.toml)Instead of passing flags every time, store your configuration in ~/.macos-mcp/config.toml. CLI flags always override config file values.
Search order:
--config /path/to/config.toml~/.macos-mcp/config.tomlstdio β local only, no security needed:
SSE β network access with auth and IP restriction:
Streamable HTTP β network access with auth and TLS (recommended for production):
Available tool names: App, Shell, Snapshot, Click, Type, Scroll, Move, Shortcut, Wait, Scrape, Notification
Place your cert and key files in the same directory:
Generate a self-signed cert directly into that directory:
All variables are optional. Set them via the env key in claude_desktop_config.json.
| Variable | Default | Description |
|---|---|---|
ANONYMIZED_TELEMETRY | true | Set to false to disable anonymous usage telemetry. No personal data, tool arguments, or outputs are ever collected. |
MACOS_MCP_AUTH_KEY | (none) | Bearer token required on all HTTP requests. Alternative to --auth-key CLI flag. |
MACOS_MCP_IP_ALLOWLIST | (none) | Comma-separated list of allowed client IPs or CIDR ranges. Alternative to --ip-allowlist CLI flag. |
MACOS_MCP_SSL_CERTFILE | (none) | Path to TLS certificate file (.pem). Must be provided with MACOS_MCP_SSL_KEYFILE. |
MACOS_MCP_SSL_KEYFILE | (none) | Path to TLS private key file (.pem). Must be provided with MACOS_MCP_SSL_CERTFILE. |
Example claude_desktop_config.json (remote with auth + TLS):
macOS-MCP collects anonymous usage data to help improve the server. No personal information, tool arguments, or outputs are tracked.
To disable telemetry, set ANONYMIZED_TELEMETRY to false:
β οΈ Important Security Notice: macOS-MCP operates with full Accessibility API permissions and executes real system operations without sandboxing. It can perform permanent, irreversible actions.
Before using macOS-MCP:
β Do NOT use on:
For detailed security guidance, see SECURITY.md.
We welcome contributions! Please see CONTRIBUTING.md for:
macOS-MCP is licensed under the MIT License - see LICENSE for details.
macOS-MCP is built with excellent open-source projects:
If you use macOS-MCP in your research or project, please cite:
Questions or Issues? Open an issue or check SECURITY.md for security concerns.
Showcase your server listing on GitHub or your project documentation. Embed this dynamic SVG badge to highlight official listing status and live engagement.
[](https://allmcps.com/mcp/macos-mcp)<a href="https://allmcps.com/mcp/macos-mcp"><img src="https://allmcps.com/api/badge/macos-mcp?style=directory" alt="MacOS MCP on AllMCPs" /></a>