mac-use-mcp — Claude Code MCP server: setup
Lets an AI agent operate a macOS desktop through MCP, including screenshots, clicks, text entry, and UI inspection.
claude mcp add mac-use-mcp -- npx -y mac-use-mcpWhat mac-use-mcp does
mac-use-mcp gives an MCP client access to desktop actions on macOS. Its 18 tools cover screenshots, mouse clicks, keyboard input, application launching, window handling, clipboard work, and accessibility-tree inspection. An agent can use them to test or operate visible applications.
The server needs macOS 13+ and Node.js 22+. It uses stdio transport and starts with npx, so there is no build step or native dependency setup. Claude Code can register it with claude mcp add; Cursor, GitHub Copilot, and Gemini CLI use their respective MCP configuration or command-line setup.
macOS must grant the client Accessibility and Screen Recording permissions. Accessibility is required for mouse and keyboard actions, while Screen Recording enables screenshots. Because the server can control the screen and input devices, a sandboxed environment is the safer place to run it.
What it helps with
- automate clicks and text entry in macOS applications
- capture a screen or window for visual checks
- inspect application controls through the accessibility tree
- launch apps and navigate their menus
- test desktop UI workflows with an AI agent
Example prompts for the agent
- Connect
mac-use-mcpand take a screenshot of the current window. - Open the target app and fill its form using the required fields.
- Inspect the visible UI elements and verify the screen state.
How to install mac-use-mcp
Platform CLI
claude mcp add mac-use-mcp -- npx -y mac-use-mcpPlatform CLI
codex mcp add mac-use-mcp -- npx -y mac-use-mcpConfig file
{
"mcpServers": {
"mac-use-mcp": {
"command": "npx",
"args": [
"-y",
"mac-use-mcp"
]
}
}
}Config file
{
"servers": {
"mac-use-mcp": {
"type": "stdio",
"command": "npx",
"args": [
"-y",
"mac-use-mcp"
]
}
}
}Platform CLI
gemini mcp add mac-use-mcp npx -y mac-use-mcpStep by step, with commands for each platform: How to add an MCP server to Claude Code, Codex, Cursor, VS Code, Gemini CLI and more
Questions about mac-use-mcp
How do I install mac-use-mcp in Claude Code?
Run claude mcp add mac-use-mcp -- npx -y mac-use-mcp.
What does mac-use-mcp do?
It is an MCP server for controlling a macOS desktop. Agents can use it for screenshots, clicks, keyboard input, application launches, and UI element inspection.
Which macOS permissions does mac-use-mcp require?
The client needs Accessibility for mouse and keyboard control, plus Screen Recording for screenshots. The application may need a restart after permissions are granted.