mcp-macos
mcp-macos
A safe-by-default Model Context Protocol server that lets an agent observe and operate a Mac — read files, list processes and apps, take screenshots (read-only); write files, set the clipboard, post notifications, open things (read-write); and, behind explicit opt-ins, run commands / AppleScript, delete to Trash, kill processes and drive the GUI (admin).
It starts read-only. Every high-impact power needs both admin mode and its own flag, and the most dangerous ones ask the human to approve each call. Part of the dockndevai MCP server suite — one governance model across all of them.
Pure Node +
osascript/screencapture— no native add-ons. macOS only.
What it gives an agent
The server starts read-only (see Safe by default); higher-capability tools are only registered when you raise the mode.
Tool | For | Needs mode |
| macOS version, hardware, memory, load, uptime | read-only |
| browse & read files (path-allowlisted) | read-only |
| running processes by CPU/mem | read-only |
| read the clipboard | read-only |
| running apps; the active one | read-only |
| capture the screen as a PNG | read-only |
| create/overwrite a file (confirms on overwrite) | read-write |
| set clipboard, notify, open a file/URL/app | read-write |
| run a program (argv, no shell) | admin + |
| run AppleScript / JXA | admin + |
| signal a process | admin + |
| move a path to the Trash | admin + |
| drive the GUI | admin + |
Install
npx -y @dockndevai/mcp-macosRequires macOS and Node ≥ 22. click/move_mouse also need cliclick (brew install cliclick).
Configure
{
"mcpServers": {
"macos": {
"command": "npx",
"args": ["-y", "@dockndevai/mcp-macos"],
"env": {
"MACOS_MODE": "read-only"
}
}
}
}See docs/CLIENTS.md for Claude Code / Cursor / Codex / VS Code / Windsurf snippets, and .env.example for every supported variable.
Safe by default
This server can drive an entire Mac, so the access model (enforced by src/security.ts) is deliberately strict — defence in depth, not documentation:
Question | Setting | Default | Notes |
What can it do at all? |
|
|
|
Which paths can it touch? |
| (anywhere) | Comma-separated roots. When set, any file op outside them is refused. |
Which paths are read-only forever? |
| system + secrets |
|
Can it run commands? |
|
| Gates |
Restrict which programs? |
| (any) | When set, |
Can it delete? |
|
| Gates |
Can it drive the GUI? |
|
| Gates |
Preview without doing |
|
| Mutating tools validate + log intent, then return. |
Audit trail |
|
| JSON line to stderr per guarded operation ( |
Interactive confirmation | (automatic) | — |
|
See SECURITY.md.
macOS permissions
The host process (your terminal / MCP client) must be granted, in System Settings → Privacy & Security:
Screen Recording — for
screenshot.Accessibility — for
type_text/key_press/click/move_mouse.Automation (per-app prompts) — for
run_applescriptand app control.Files and Folders / Full Disk Access — to read/write outside the default sandbox.
You'll be prompted the first time each is needed; nothing works around a permission you haven't granted.
Developing
npm install
npm run build
MACOS_MODE=read-only node dist/index.js
# introspect the tool list:
echo '{"jsonrpc":"2.0","id":1,"method":"tools/list","params":{}}' | node dist/index.jsLicence
MIT