desktop-mcp
Controls the WhatsApp desktop app through macOS accessibility and synthetic input to read chats, type messages, and send them safely, with guards such as trusted chats and draft protection.
This server does not currently have a deployable release on Glama. Follow the repository's setup instructions to install and configure it for your MCP client, including any required credentials and local dependencies.
desktop-mcp
Guarded macOS desktop control for Claude Code in the terminal: read an app's accessibility tree, screenshot its window, click, type and scroll, via MCP.
It drives apps the way an accessibility tool does (macOS Accessibility API + synthetic keyboard and mouse events). It never modifies the apps it controls. It ships with a WhatsApp skill that teaches Claude Code to send messages safely through the WhatsApp desktop app.
Safety model
Guard | What it does |
Allowlist | Only bundle ids in |
Hard blocklist | Terminals, IDEs, the Claude app, macOS password prompts/login window, Keychain/Passwords and password managers. Cannot be overridden by config (Claude must never approve its own permission prompts or enter passwords). |
Frontmost check | Input events are only posted after verifying the target app is frontmost. |
Hit test | Coordinate clicks are refused if another app's window covers the point. |
Confirmation | Return/Enter, |
Trusted chats | WhatsApp chats in |
Draft protection |
|
Focus watch | While typing, it checks after every character that the same field still has focus, and stops at once if not. |
Human pacing | Randomised per-key timing (longer after spaces/punctuation, occasional pauses) and a delay after every click. |
One at a time | A lock serialises all actions, including while a dialog is open. |
Audit log | Every action goes to |
Window-only screenshots | Captures the target app's window, never the whole screen. |
Related MCP server: screenmcp-claude-plugin
Setup
Requires macOS and uv.
git clone https://github.com/Jenish-1235/desktop-mcp && cd desktop-mcp
uv sync
# 1. Config: you edit this, not Claude
mkdir -p ~/.config/desktop-mcp
cp config.example.toml ~/.config/desktop-mcp/config.toml
# 2. Register with Claude Code (user scope)
claude mcp add desktop -s user -- uv --directory "$PWD" run desktop-mcp
# 3. Optional: install the WhatsApp skill for all Claude Code sessions
mkdir -p ~/.claude/skills && cp -r skills/whatsapp ~/.claude/skills/macOS permissions, for the terminal app that runs
claude(iTerm, Ghostty, Terminal, ...): System Settings → Privacy & Security → Accessibility and Screen Recording. Restart the terminal.In Claude Code, ask it to run
check_setup.
After changing the server code, reload it with /mcp → desktop → Reconnect. Config changes
apply immediately.
Recommended: stop Claude from editing its own config
Add to ~/.claude/settings.json:
{
"permissions": {
"deny": [
"Edit(~/.config/desktop-mcp/**)",
"Write(~/.config/desktop-mcp/**)",
"Bash(osascript:*)"
]
}
}Config
See config.example.toml:
Key | Default | Meaning |
|
| Bundle ids Claude may control ( |
|
| Allow every app except the hard blocklist. |
|
| Exact chat names (as in "Messages in chat with …") that send without a dialog. Your own chat is |
|
| Median seconds per keystroke (0–0.5), randomised. |
|
| Seconds to wait after each click (0–5). |
Tools
check_setup, list_apps, open_app, ui_tree, screenshot, click_element, click,
type_text, press_key, scroll.
Prefer ui_tree + click_element: element refs are exact and cost far fewer tokens than
images. Use screenshot + click for apps with poor accessibility support.
Limits & known gaps
Coordinates assume the window doesn't move between
screenshotandclick(it checks the window id, not position).Keycodes are ANSI US layout;
type_textuses Unicode events so typing works on any layout.Risky-click detection is label based. Unlabelled icon buttons won't trigger a dialog unless they're activated with Return.
Trusted chats match by name, so a group renamed to a trusted name would also count.
Claude Code's Bash tool can still run arbitrary
osascript/cliclick; the deny rules above close the obvious path.Web apps installed as Chrome apps (e.g. YouTube Music) are owned by Chrome; for websites, the Claude in Chrome extension is the better tool.
WhatsApp: keep it to occasional messages to people who know you. This doesn't change ban risk from volume or spam reports.
Dev
uv run pytestLicense
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
This server cannot be deployed
Maintenance
Related MCP Connectors
Let Claude, ChatGPT and other agents use your Android phone: see the screen, tap, type, open apps.
Use your Mac, Windows or Linux computer from ChatGPT, Claude or Codex: files, commands, documents.
Mac & Windows: let ChatGPT, Claude & Cursor use your email, calendar, iMessage, Teams, files.
Let your AI see your screen, click, type and run commands on your own Windows, Mac or Linux PC.
Related MCP Servers
- AlicenseNot gradedqualityDmaintenanceEnables high-speed native macOS automation for Claude by interacting directly with the Accessibility API, AppleScript, and UI trees instead of using screenshots. It allows users to read app states, click elements, and type text semantically across any macOS application.11 npm13MIT
- AlicenseNot gradedqualityDmaintenanceEnables Claude to control the local desktop via screenshot, mouse, keyboard, and clipboard operations.MIT
- AlicenseAqualityBmaintenanceEnables Claude Code to read and operate macOS app interfaces through the accessibility tree, pressing buttons, setting text fields, typing with IME support, sending shortcuts, scrolling, dragging, and capturing screenshots. It drives background apps without moving the mouse or stealing focus from the user's current work.1216 npmMIT
- AlicenseNot gradedqualityBmaintenanceEnables Claude Code to drive macOS apps in the background through the computer-use engine bundled with the ChatGPT desktop app, sending clicks, drags, keystrokes, menu bar and notification interactions to target apps while the user's cursor, windows and other work stay untouched.6MIT