mac-use-mcp
Enables automation of Google Chrome on macOS, including focusing windows, capturing screenshots, and performing UI actions through system-level automation.
Provides comprehensive tools for macOS desktop automation, allowing AI agents to control the mouse and keyboard, capture screenshots, manage windows, and interact with the Accessibility API.
Enables automation of Safari on macOS, allowing for window management, screen capture, and simulated user interactions via mouse and keyboard control.
mac-use-mcp

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 viascreenshotDesktop workflow automation — launch apps with
open_application, fill forms withtype_text, navigate menus viaclick_menuScreenshot-based monitoring — capture screen regions periodically with
screenshotfor visual diffing or alertingAccessibility inspection — query UI element trees with
get_ui_elementsfor QA and compliance checksAI agent computer use — give LLMs eyes and hands on macOS via
screenshot,click,type_text, and more
Related MCP server: MacWright
Why mac-use-mcp?
Just works —
npx mac-use-mcpand 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:
npx mac-use-mcp
npxwill prompt to install the package on first run. Usenpx -y mac-use-mcpto skip the confirmation.
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 | |
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:
> check_permissions
✓ Accessibility: granted
✓ Screen Recording: grantedMCP Client Configuration
claude mcp add mac-use-mcp -- npx mac-use-mcpAdd to ~/Library/Application Support/Claude/claude_desktop_config.json:
{
"mcpServers": {
"mac-use-mcp": {
"command": "npx",
"args": ["mac-use-mcp"]
}
}
}Add to ~/.codex/config.toml:
[mcp_servers.mac-use]
command = "npx"
args = ["-y", "mac-use-mcp"]Or via CLI:
codex mcp add mac-use -- npx -y mac-use-mcpAdd to ~/.gemini/antigravity/mcp_config.json:
{
"mcpServers": {
"mac-use-mcp": {
"command": "npx",
"args": ["mac-use-mcp"]
}
}
}Add to ~/.gemini/settings.json:
{
"mcpServers": {
"mac-use-mcp": {
"command": "npx",
"args": ["mac-use-mcp"]
}
}
}Add to .vscode/mcp.json in your workspace (or open the Command Palette and run MCP: Open User Configuration for global setup):
{
"servers": {
"mac-use-mcp": {
"command": "npx",
"args": ["mac-use-mcp"]
}
}
}Add to ~/.cursor/mcp.json (global) or .cursor/mcp.json (project-level):
{
"mcpServers": {
"mac-use-mcp": {
"command": "npx",
"args": ["mac-use-mcp"]
}
}
}Add to ~/.codeium/windsurf/mcp_config.json:
{
"mcpServers": {
"mac-use-mcp": {
"command": "npx",
"args": ["mac-use-mcp"]
}
}
}Open Cline's MCP settings (in the Cline extension panel, click the MCP servers icon), then add:
{
"mcpServers": {
"mac-use-mcp": {
"command": "npx",
"args": ["mac-use-mcp"]
}
}
}Add to ~/.aws/amazonq/mcp.json:
{
"mcpServers": {
"mac-use-mcp": {
"command": "npx",
"args": ["mac-use-mcp"]
}
}
}Tools
This Node.js MCP server exposes 18 tools for mouse, keyboard, and screen control to any MCP-compatible client.
Screen
Tool | Description |
| Capture the screen, a region, or a window by title (PNG or JPEG) |
| Get display count, resolution, origin, and scale factor for each display |
| Get current cursor coordinates |
Input
Tool | Description |
| Click at screen coordinates with button, click count, and modifier options |
| Move the cursor to a position |
| Scroll up, down, left, or right at a position |
| Drag from one point to another over a configurable duration |
| Type text at the cursor position (supports Unicode, CJK, and emoji) |
| Press a key or key combination (e.g., |
Window & App
Tool | Description |
| List all visible windows with positions and sizes |
| Activate an app and bring a specific window to the front |
| Launch an application by name |
| Click a menu bar item by path (e.g., "File > Save As...") |
App names support fuzzy matching — "chrome" resolves to "Google Chrome", "code" to "Code", etc.
Accessibility
Tool | Description |
| Query UI elements via Accessibility API — find buttons, text fields, and other controls by role or title |
Clipboard
Tool | Description |
| Read the current system clipboard as plain text |
| Write text to the system clipboard |
Utility
Tool | Description |
| Pause for a specified duration (in milliseconds, 0–10 000, default 500) |
| Verify Accessibility and Screen Recording access |
Examples
Common workflow patterns using mac-use-mcp tools:
Screenshot a specific window
1. focus_window({ app: "Safari" })
2. screenshot({ mode: "window", window_title: "Safari" })Click a button in a dialog
1. get_ui_elements({ app: "Finder", role: "AXButton" })
→ finds "OK" button at position (500, 300)
2. click({ x: 500, y: 300 })Automate a menu action
1. open_application({ name: "TextEdit" })
2. click_menu({ app: "TextEdit", path: "Format > Make Plain Text" })Copy text between apps
1. focus_window({ app: "Safari" })
2. press_key({ key: "cmd+a" }) # select all
3. press_key({ key: "cmd+c" }) # copy
4. focus_window({ app: "Notes" })
5. press_key({ key: "cmd+v" }) # pasteHow It Works
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 clicksNode.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
Grant Accessibility and Screen Recording permissions to your terminal app in System Settings > Privacy & Security. A restart of the terminal may be required.
macOS 15 (Sequoia) introduced stricter permission prompts. Allow the prompts when they appear. The check_permissions tool can verify your current permission status.
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.
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.
awesome-mcp-servers — Curated list of MCP servers across the ecosystem.
Contributing
See CONTRIBUTING.md for development setup and guidelines.
Security
To report a vulnerability, see SECURITY.md.
Support
Found a bug? Open an issue
Have a feature idea? Open an issue
Like the project? Give it a star — it helps others discover mac-use-mcp.
License
MIT © 2026 antbotlab
macOS is a trademark of Apple Inc., registered in the U.S. and other countries and regions.
Available Tools
18 toolscheck_permissionsARead-only
Check whether macOS Accessibility and Screen Recording permissions are granted. Returns status for each permission and instructions for any that are missing.
Inputs: no named parameters.
clickADestructive
Click at the specified screen coordinates. Supports left/right/middle button, single/double/triple click, and modifier keys. Do not narrate visual observations or coordinate calculations. Brief task progress updates are acceptable.
Inputs: x (required), y (required), button (required), click_count (required), +1 more.
clipboard_readARead-only
Read the current contents of the macOS clipboard as plain text.
Inputs: no named parameters.
clipboard_writeA
Write text to the macOS clipboard.
Inputs: text (required).
dragADestructive
Drag from one screen coordinate to another over a specified duration.
Best practices for window dragging:
Always call focus_window on the target app immediately BEFORE dragging to ensure the window is frontmost. Without this, the drag may land on a different overlapping window and silently fail.
Start coordinates must land on the window's title bar — use the far-right edge of the title bar to avoid traffic-light buttons and any center toolbar icons.
Use a duration of 600–1000 ms. Too short and macOS may not recognize it as a drag gesture.
Do not narrate visual observations or coordinate calculations. Brief task progress updates are acceptable.
Inputs: start_x (required), start_y (required), end_x (required), end_y (required), +1 more.
focus_windowA
Activate an application and optionally raise a specific window by title. App name supports fuzzy matching.
Inputs: app (required), title.
get_cursor_positionARead-only
Get the current mouse cursor position in screen coordinates.
Inputs: no named parameters.
get_screen_infoARead-only
Retrieve display configuration: number of displays, per-display resolution, origin, and scale factor.
Inputs: no named parameters.
get_ui_elementsARead-only
Query visible UI elements of an application via macOS Accessibility API. Returns element roles, titles, positions (screen coordinates), sizes, and states. May return text content from visible UI elements including sensitive data (passwords in non-secure fields, messages, etc.). Positions are in logical screen coordinates — pass directly to click tool. Coverage varies: native apps expose rich trees; Electron/web apps may expose partial trees; games/custom UIs may expose nothing. Requires Accessibility permission.
Inputs: max_depth (required), app, role, title.
list_windowsARead-only
List visible windows with their app name, title, ID, position, size, and minimized state. Optionally filter by application name. App name supports fuzzy matching (case-insensitive, partial names like 'chrome' for 'Google Chrome').
Inputs: app.
move_mouseA
Move the mouse cursor to the specified screen coordinates without clicking. Do not narrate visual observations or coordinate calculations. Brief task progress updates are acceptable.
Inputs: x (required), y (required).
open_applicationADestructive
Launch an application by name or bundle identifier. App name supports fuzzy matching (e.g. 'chrome' → 'Google Chrome').
Inputs: name (required).
press_keyADestructive
Simulate a key press with optional modifiers. Accepts a key combo string like "cmd+c", "ctrl+shift+F5", or "Return". Modifiers: cmd, ctrl, shift, opt/alt.
Inputs: key (required).
screenshotARead-only
Capture a screenshot of the macOS screen. Supports full screen, a rectangular region, or a specific window by title. Returns a base64-encoded image with dimension metadata. Do not narrate visual observations or coordinate calculations. Brief task progress updates are acceptable.
Inputs: mode (required), max_dimension (required), format (required), ruler (required), +5 more.
scrollB
Scroll at the specified screen coordinates in the given direction. Do not narrate visual observations or coordinate calculations. Brief task progress updates are acceptable.
Inputs: x (required), y (required), direction (required), amount (required).
type_textADestructive
Type text at the current cursor position using clipboard paste. Supports full Unicode including CJK characters and emoji. Temporarily replaces clipboard contents. Non-text clipboard content (images, files) will be lost permanently. If secure input is active (e.g. password fields), returns a note suggesting clipboard_write + press_key("cmd+v") as an alternative.
Inputs: text (required).
waitARead-only
Pause execution for a specified duration. Useful for waiting between UI operations.
Inputs: duration_ms (required).
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 18 tools
Each tool has a clearly distinct purpose with no significant overlap. For example, click handles screen coordinate clicks, click_menu handles menu navigation, and drag handles dragging gestures, all serving unique functions. Even clipboard_read and clipboard_write are clearly separated from type_text, which uses clipboard paste for typing.
All tool names follow a consistent snake_case verb_noun pattern, such as check_permissions, click_menu, and get_screen_info. There are no deviations in naming conventions, making the set predictable and easy to understand.
With 18 tools, the server provides comprehensive coverage for macOS UI automation, including input simulation, window management, clipboard operations, and system queries. Each tool serves a specific, necessary function without redundancy, fitting well within the typical 3-15 range for such a domain.
The toolset offers complete coverage for macOS UI automation, including permissions checking, mouse/keyboard input, window/app control, clipboard management, and system information retrieval. There are no obvious gaps; tools like wait and type_text address edge cases, ensuring agents can handle full workflows without dead ends.
Maintenance
Related MCP Connectors
Free public MCP for AI agents — 193 tools, 44 workflows. No API key.
Screenshot, diff, audit and sitemap-capture any web page — 5 MCP tools for AI agents.
Web scraping, browser automation, screenshots and AI data extraction for AI agents via MCP.
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 macOS that enables AI agents to control the desktop GUI through keyboard input, mouse actions, and screen captures. It provides stable low-level primitives for UI automation and agent-driven desktop workflows.MIT
- 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 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
- AlicenseNot gradedqualityDmaintenanceFull computer control for AI agents on macOS — see, click, type, scroll via MCP. Works with any app, all processing on-device with PII protection.MIT