Zero-dependency macOS desktop automation for AI agents. 18 tools via MCP. macOS 13+.
io.github.antbotlab/mac-use-mcp (MCP Server)
This MCP server provides zero-dependency macOS desktop automation for AI agents. It enables agent-driven control of mouse, keyboard, and screen, using 18 tools exposed via MCP. It supports macOS 13+ and is described as giving agents “eyes and hands” for clicking, typing, taking screenshots, and inspecting.
🛠️ Key Features
Zero-dependency macOS desktop automation via MCP
18 tools available through MCP
Mouse, keyboard, and screen control
Capabilities include click, type, screenshot, and inspect
Platform support: macOS 13+
🚀 Use Cases
Desktop automation workflows run by AI agents
Agent interactions requiring UI input and visual capture (click/type/screenshot)
Screen-based inspection during automated tasks
⚡ Developer Benefits
Standardized MCP interface for integrating with AI agents
Tool-based access (18 tools) for common desktop operations
⚠️ Limitations
Full control over mouse, keyboard, and screen
Warning to use in a sandboxed environment to protect privacy and prevent accidental data loss
This tool has full control over mouse, keyboard, and screen. Please use in a sandboxed environment to protect your privacy and avoid accidental data loss by your agents. You are responsible for any actions performed through this tool.
Zero-native-dependency macOS desktop automation via MCP.
Give AI agents eyes and hands on macOS — click, type, screenshot, and inspect any application.
Use Cases
Automated UI testing — click buttons, verify element states with get_ui_elements, validate screen content via screenshot
Desktop workflow automation — launch apps with open_application, fill forms with type_text, navigate menus via click_menu
Screenshot-based monitoring — capture screen regions periodically with screenshot for visual diffing or alerting
Accessibility inspection — query UI element trees with get_ui_elements for QA and compliance checks
AI agent computer use — give LLMs eyes and hands on macOS via screenshot, click, type_text, and more
Why mac-use-mcp?
Just works — npx mac-use-mcp and grant two macOS permissions. No node-gyp, no Xcode tools, no build step.
18 tools, one server — screenshots, clicks, keystrokes, window management, accessibility inspection, and clipboard.
macOS 13+ on Intel and Apple Silicon — no native addons, no architecture headaches.
Install
Requirements: macOS 13+ and Node.js 22+. The server communicates over stdio transport.
This package only works on macOS. It will refuse to install on other operating systems.
No build steps. No native dependencies. Just run:
bash
npx mac-use-mcp
npx will prompt to install the package on first run. Use npx -y mac-use-mcp to skip the confirmation.
TIP
Model selection matters. Desktop automation involves screenshot–action loops that add up in token usage. A fast model with solid reasoning, good vision, and reliable tool calling is recommended:
Model
Provider
Gemini 3 Flash
Google
Claude Sonnet 4.6
Anthropic
GPT-5 mini
OpenAI
MiniMax-M2.5
MiniMax
Kimi K2.5
Moonshot AI
Qwen3.5
Alibaba
GLM-4.7
Zhipu AI
Permission Setup
mac-use-mcp requires two macOS permissions to function. Grant them once and you're set.
Accessibility
Required for mouse and keyboard control.
Open System Settings > Privacy & Security > Accessibility
Click the + button
Add your MCP client application (e.g., Claude Desktop, your terminal emulator)
Ensure the toggle is enabled
Screen Recording
Required for screenshots.
Open System Settings > Privacy & Security > Screen Recording
Click the + button
Add your MCP client application
Ensure the toggle is enabled
Restart the application if prompted
Verify permissions
After granting both permissions and configuring your MCP client (see next section), use the check_permissions tool to confirm everything is working:
Swift binary handles mouse input (CGEvent), screen capture (CGWindowListCreateImage), window enumeration (CGWindowListCopyWindowInfo), and UI element queries (Accessibility API)
AppleScript handles keyboard input (System Events key code), window focus, and menu clicks
Node.js MCP server orchestrates everything over stdio, translating MCP tool calls into system operations
No native Node.js addons — the Swift binary is pre-compiled and ships with the npm package
Serial execution queue prevents race conditions between system operations
Known Limitations
Screen Recording prompt on Sequoia: macOS 15 shows a monthly system prompt asking to reconfirm Screen Recording access. This is an OS-level behavior and cannot be suppressed.
Secure input fields: Password fields and other secure text inputs block synthetic keyboard events. This is a macOS security feature.
Keyboard input on macOS 26+: CGEvent keyboard synthesis is silently blocked. Keyboard input uses AppleScript (System Events key code) as a workaround, which may behave differently in some edge cases.
System dialogs: Some system-level dialogs (e.g., FileVault unlock, Login Window) cannot be interacted with programmatically due to macOS security restrictions.
Headless / CI: Requires a graphical session. Headless macOS environments (e.g., standard GitHub Actions runners) are not supported.
Troubleshooting
Permission prompts keep appearing
Grant Accessibility and Screen Recording permissions to your terminal app in System Settings > Privacy & Security. A restart of the terminal may be required.
macOS Sequoia permission dialogs
macOS 15 (Sequoia) introduced stricter permission prompts. Allow the prompts when they appear. The check_permissions tool can verify your current permission status.
Secure input fields
Some password fields and secure text inputs block programmatic key events. This is a macOS security feature. Use clipboard_write + press_key("cmd+v") as a workaround.
Screen recording shows black screenshots
Ensure Screen Recording permission is granted to your terminal app (not just Accessibility). Restart the terminal after granting.
Related Projects
Playwright MCP — Browser automation via accessibility tree. Complements mac-use-mcp for web-only tasks.
Peekaboo — macOS screen automation with ScreenCaptureKit. Requires macOS 15+ and a Swift build.