mcp-macos-cua
Provides GUI automation capabilities for macOS, allowing control of any desktop app through screenshots, mouse clicks, keyboard input, accessibility queries, and AppleScript.
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., "@mcp-macos-cuaopen Safari and search for today's weather"
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.
mcp-macos-cua
A macOS Computer Use Agent (CUA) — an MCP server that gives AI agents full GUI automation capabilities on macOS.
Control any desktop app through screenshots, mouse clicks, keyboard input, accessibility queries, and AppleScript.
Optimized for Claude Code — includes a ready-to-use
/cuaskill with automatic permission bootstrap. Also works as a standalone MCP server with any MCP-compatible agent.
Features
Tool | Description |
| Capture full screen or specific app window (auto-detects display scale factor) |
| Open and activate any macOS application |
| Click at screen coordinates (single, double, left, right) |
| Type text into the frontmost app |
| Press keys/combos ( |
| Scroll in any direction at current or given position |
| Inspect accessibility tree of an app window |
| Click buttons/elements by name via accessibility |
| Execute arbitrary AppleScript |
| Get current cursor position |
| Move cursor to coordinates |
Related MCP server: Automation MCP
Prerequisites
macOS (required — uses macOS-specific APIs)
Node.js 18+
cliclick —
brew install cliclickAccessibility permissions — System Settings > Privacy & Security > Accessibility (grant to your terminal app)
Screen Recording permissions — System Settings > Privacy & Security > Screen Recording (grant to your terminal app)
Python 3 with pyobjc-framework-Quartz — usually pre-installed on macOS; if not:
pip3 install pyobjc-framework-Quartz
You may need to restart your terminal after granting macOS permissions.
Installation
Option A: Claude Code Plugin (Recommended)
The plugin gives you the full experience: an MCP server, a /cua skill with guided CUA loop, and automatic permission bootstrap.
From the marketplace — run these commands inside Claude Code:
/plugin marketplace add bradthebeeble/claude-plugins
/plugin install mcp-macos-cua@bradthebeeble-pluginsFrom local source — for development/testing (from the shell):
claude --plugin-dir /path/to/mcp-macos-cuaAfter installing, start using it immediately:
/mcp-macos-cua:cua open Safari and search for today's weatherAuto-permissions: On first use, the /cua skill detects whether CUA tool permissions are configured. If not, it asks once to allow all CUA tools — no more per-tool prompts for the rest of the project.
Option B: Any MCP-Compatible Agent (npx)
The MCP server is published on npm and works with any agent that supports the Model Context Protocol — no plugin system required.
Add this to your MCP client config:
{
"mcpServers": {
"cua": {
"command": "npx",
"args": ["-y", "mcp-macos-cua"]
}
}
}npx downloads the package and all dependencies automatically on first run, and caches them for subsequent calls.
Where to put this config:
Agent | Config location |
Claude Code |
|
Cursor | Settings > MCP > Add server |
Windsurf | MCP settings |
Claude Desktop |
|
Custom | Your MCP client config file |
Note for Claude Code users: Using the MCP server directly (without the plugin) gives you the raw tools but not the
/cuaskill, the guided CUA loop, or the auto-permission bootstrap. To avoid per-tool permission prompts, add"mcp__cua__*"topermissions.allowin.claude/settings.local.json.
Option C: Clone and Run
For development or when you want to run the server directly:
git clone https://github.com/bradthebeeble/mcp-macos-cua.git
cd mcp-macos-cua
npm install
node server/index.jsThe server communicates via stdio — connect your MCP client to the process.
System Prompt for Non-Plugin Usage
When using the MCP server without the Claude Code plugin (Options B or C), your agent needs instructions on how to use the tools effectively. Add this to your agent's system prompt:
You are a Computer Use Agent (CUA) on macOS. Interact with the GUI using the cua MCP tools.
## CUA Loop
1. Screenshot - Take a screenshot to see current state
2. Analyze - Determine what action to take next
3. Act - Use the appropriate tool (click, type_text, key_press, etc.)
4. Verify - Screenshot again to confirm it worked
5. Repeat or Report - Continue or summarize results
## Coordinate System
The screenshot tool returns a display scale factor (e.g. 2x for Retina, 1x for standard).
Divide screenshot pixel positions by this scale factor to get correct tool coordinates.
Example: if scale factor is 2x and you see a button at pixel (800, 400) in the screenshot,
click at coordinates (400, 200).
## Available Tools
- screenshot - Capture screen (optionally a specific app)
- open_app - Open and activate an application
- click - Click at coordinates (x, y in screen points)
- type_text - Type text into frontmost app
- key_press - Press keys/combos (e.g. "cmd+c", "return", "cmd+shift+a")
- scroll - Scroll in a direction at a position
- get_ui_elements - Inspect accessibility tree of an app
- click_ui_element - Click an element by name via accessibility
- run_applescript - Execute arbitrary AppleScript
- get_mouse_position - Get current cursor position
- move_mouse - Move cursor to coordinates
## Tips
- Always start with a screenshot before acting
- Prefer click_ui_element (accessibility) over coordinate click when possible
- Use get_ui_elements to discover clickable elements by name
- Use key_press for keyboard shortcuts (faster than navigating menus)
- Use scroll with x,y to scroll within a specific area
- Use run_applescript as escape hatch for complex multi-step automationUsage
The CUA Loop
Whether via the /cua skill or a custom system prompt, the agent follows a Screenshot > Analyze > Act > Verify > Repeat loop:
Takes a screenshot to see the current screen state
Analyzes what action to take next
Executes the action (click, type, etc.)
Takes another screenshot to verify the result
Repeats until the task is complete
Coordinate System
The screenshot tool automatically detects the display scale factor (2x for Retina, 1x for standard displays) and returns it with every screenshot. Divide screenshot pixel positions by this factor to get correct tool coordinates.
Examples (Claude Code plugin)
/mcp-macos-cua:cua open Slack and send "hello" to the #general channel
/mcp-macos-cua:cua take a screenshot of Safari
/mcp-macos-cua:cua open Notes and create a grocery list
/mcp-macos-cua:cua open System Settings and enable Dark ModeTools Reference
screenshot
Param | Type | Required | Description |
| string | No | App name to screenshot. Omit for full screen. |
Returns the screenshot image and the display scale factor.
click
Param | Type | Required | Description |
| number | Yes | X coordinate in screen points |
| number | Yes | Y coordinate in screen points |
| number | No | 1 (single) or 2 (double). Default: 1 |
| string | No |
|
type_text
Param | Type | Required | Description |
| string | Yes | Text to type into frontmost app |
key_press
Param | Type | Required | Description |
| string | Yes | Key combo like |
scroll
Param | Type | Required | Description |
| string | Yes |
|
| number | No | Scroll steps. Default: 3 |
| number | No | Coordinates to scroll at (moves mouse first) |
open_app
Param | Type | Required | Description |
| string | Yes | Application name (e.g. |
get_ui_elements
Param | Type | Required | Description |
| string | Yes | Application process name |
| string | No |
|
click_ui_element
Param | Type | Required | Description |
| string | Yes | Application process name |
| string | Yes | e.g. |
| string | Yes | Name/title of the element |
| string | No | Parent path. Default: |
run_applescript
Param | Type | Required | Description |
| string | Yes | AppleScript code to execute |
get_mouse_position
No parameters. Returns current cursor position.
move_mouse
Param | Type | Required | Description |
| number | Yes | X coordinate in screen points |
| number | Yes | Y coordinate in screen points |
Adding to a Team Marketplace
To distribute the Claude Code plugin within your team, add it to a Claude Code plugin marketplace:
Create or locate your team's
marketplace.jsonAdd the plugin entry:
{
"plugins": [
{
"name": "mcp-macos-cua",
"description": "macOS Computer Use Agent - GUI automation via screenshots, clicks, typing, accessibility, and AppleScript",
"source": "github:bradthebeeble/mcp-macos-cua"
}
]
}Team members can then install from inside Claude Code:
/plugin marketplace add your-org/your-marketplace-repo
/plugin install mcp-macos-cua@your-marketplaceTroubleshooting
"cliclick not found" — Install with brew install cliclick
Clicks land in wrong position — Check the scale factor returned by screenshot. Divide pixel coordinates by that factor.
"not allowed assistive access" — Grant Accessibility permissions in System Settings > Privacy & Security > Accessibility to your terminal app. Restart the terminal after granting.
Scroll not working — Install pyobjc: pip3 install pyobjc-framework-Quartz
Permission prompts on every CUA tool call (Claude Code) — The auto-permission bootstrap only runs via the /cua skill (plugin install). If using manual MCP config, add "mcp__cua__*" to permissions.allow in .claude/settings.local.json.
MCP server not starting — Verify npx -y mcp-macos-cua runs from your terminal. Check that Node.js 18+ is installed.
Security
This tool has full GUI control over your Mac. It can click, type, and run AppleScript as your user. Only use it in trusted environments and review what the agent is doing via the screenshot-verify loop.
License
MIT
Maintenance
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
Related MCP Servers
- FlicenseAqualityDmaintenanceProvides native macOS computer control tools including mouse and keyboard simulation, screenshot capture, and application management for MCP-compatible agents. It enables AI assistants to directly interact with the macOS operating system and installed apps through standard tool calls.248
- Alicense-qualityDmaintenanceEnables AI assistants to automate macOS desktop tasks including mouse control, keyboard input, screenshots, window management, and UI interaction.7415MIT
- Flicense-qualityBmaintenancemacOS desktop automation enabling AI agents to screenshot, switch apps and tabs, click, type, and scroll. Offers two trust levels: read-only screenshot and full UI control.
- Alicense-qualityDmaintenanceProvides 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.3MIT
Related MCP Connectors
Let ChatGPT, Claude & Cursor use your Mac: email, calendar, iMessage, Teams, files. Local, free.
AI-powered browser automation — navigate, click, fill forms, and extract data from any website.
MCP connector that lets ChatGPT list, search, and run your Apple Shortcuts via a local Mac agent
Latest Blog Posts
- Who's Calling? MCP Hosts Are an Identity Blind Spot (And the Spec Knows It)By Om-Shree-0709 on .mcpAgent IdentityOAuth 2.1
- Your AI Chatbot Just Exposed Your CEO's Salary to an InternBy Om-Shree-0709 on .Agent IdentityMCP SecurityOAuth Delegation
- Why MCP Servers Need Execution Sandboxing (And Why Your Current Stack Isn't Enough)By Om-Shree-0709 on .Agentic AiPrompt InjectionWebAssembly
MCP directory API
We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/bradthebeeble/mcp-macos-cua'
If you have feedback or need assistance with the MCP directory API, please join our Discord server