claude-background-control
Supports interacting with Electron app content using real mouse clicks (CoreGraphics) when accessibility-based control is insufficient.
Provides control of the macOS GUI through accessibility APIs and fallback real input, enabling UI inspection, clicking, setting values, typing, keyboard shortcuts, menu navigation, scrolling, dragging, screenshots, and app activation.
Click on "Deploy 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., "@claude-background-control fill the subject in Mail with 'Meeting notes'"
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.
claude-background-control
An MCP server that lets Claude Code use your Mac's GUI: read what's on
screen, click things, and type. It uses only built-in macOS tools
(osascript, screencapture, sips), so there are no native npm
dependencies to break on install.
It goes through the accessibility tree first. That way it can press buttons and fill in text fields in background apps without moving your mouse or taking focus away from what you're doing. Real mouse and keyboard events are only the fallback.
Install
claude mcp add computer-control -- npx -y claude-background-controlRequires macOS and Node 20+ (development needs 22.18+ to run the TypeScript tests directly).
Related MCP server: Desktop Pilot MCP
Permissions (first run)
macOS has to allow the app that runs Claude Code (Terminal, iTerm, the Claude app, …):
System Settings → Privacy & Security → Accessibility: turn it on for that app. Every tool except
screenshotneeds this.System Settings → Privacy & Security → Screen & System Audio Recording: turn it on for that app. Needed for
screenshot.Restart that app.
If a permission is missing, the error names the exact app and path
macOS expects. That isn't always the app you see. Claude Code inside the
Claude desktop app, for example, needs the grant on
~/Library/Application Support/Claude/claude-code/<version>/claude.app,
which you add with + and Cmd+Shift+G. Because that path includes the
version number, a Claude Code update can require granting it again.
Tools
Tool | What it does |
| Lists UI elements of the app's windows with an id, role, label, value, and frame. Start here. |
| Presses a button or focuses a field via accessibility, with no mouse movement. Falls back to a real click. |
| Sets a text field's value directly. Works in background apps and with any language. |
| Types into the focused field by pasting, so Korean and other IME input comes through correctly. The whole clipboard (images, files, rich text) is restored afterwards. |
| Sends key codes like |
| Waits until a matching element appears, or disappears with |
| Real mouse click (CoreGraphics) for canvas or Electron content. |
| Walks the menu bar by item names, e.g. |
| Mouse-wheel scroll by lines, at a point or wherever the cursor is. |
| Left-button drag: select text, move things, resize. |
| PNG of the main screen, a region, or one app's front window, even if other windows cover it. Image pixels equal screen points. For a window, add the reported origin to get click coordinates. |
| Launches an app or brings it to the front. |
app is the process name (e.g. "TextEdit"). If you leave it out, the
frontmost app is used. When a label or role matches in several windows,
the frontmost window wins. If it's still ambiguous, you get a list of
ids to choose from.
Develop
npm install
npm test # pure-logic unit tests
npm run buildAfter changing src/mac.ts, run the manual GUI checklist in
scripts/smoke-test.md.
Limits
Main display only.
inspectdoesn't descend into leaf-like roles such as buttons and static text.With Stage Manager on, a background app's window is only a side-strip thumbnail, so
screenshot(app)warns and suggestsactivate_appfirst.
Design notes: docs/superpowers/specs/2026-09-30-computer-control-mcp-design.md
Available Tools
12 toolsactivate_appAIdempotent
Launch or bring an app to the front (needed before type/key, which go to the frontmost app).
Inputs: name (required).
clickADestructive
Real mouse click at screen coordinates (points). Fallback for content without accessibility info.
Inputs: x (required), y (required), button, clicks.
click_elementADestructive
Press a button/link or focus a text field by id or label. Uses accessibility actions (no mouse movement) and falls back to a real click at the element center.
Inputs: id, app, role, label.
dragBDestructive
Drag with the left mouse button from (x1, y1) to (x2, y2): select text, move items, resize.
Inputs: x1 (required), x2 (required), y1 (required), y2 (required).
inspectARead-onlyIdempotent
List UI elements (id, role, label, value, frame) of an app's windows via the accessibility tree. The preferred way to find what to click. Pass find to get only matching elements instead of the whole tree.
Inputs: app, find, maxDepth, maxNodes.
keyADestructive
Press a key or combo in the frontmost app, e.g. "return", "cmd+s", "cmd+shift+t", "esc", "down". repeat presses it several times.
Inputs: combo (required), repeat.
screenshotARead-onlyIdempotent
Capture as PNG: the main screen, a region (x, y, w, h), or one app's front window (app), even if other windows cover it. Image pixels equal screen points; for a window, add the reported origin to get screen coordinates for click.
Inputs: h, w, x, y, +1 more.
scrollB
Scroll with the mouse wheel, at (x, y) if given, else wherever the cursor is.
Inputs: direction (required), x, y, amount.
set_valueADestructiveIdempotent
Set a text field's value directly through accessibility. Works in background apps and with any language, without touching the keyboard or clipboard.
Inputs: value (required), id, app, role, +1 more.
typeADestructive
Type text into the focused element of the frontmost app (via paste, so Korean and other IME text work; the clipboard, images included, is restored). Prefer set_value for plain text fields.
Inputs: text (required).
wait_forARead-onlyIdempotent
Wait until an element matching find (role or label, like inspect find) appears in the app, or disappears with gone=true. Use after actions that open dialogs, load pages, or show spinners.
Inputs: find (required), app, gone, timeout.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 12 tools
Most tools target clearly distinct actions (drag, key, scroll, inspect, screenshot, wait_for), and the descriptions actively steer between the overlapping pairs: type vs set_value (frontmost/paste vs background/accessibility) and click vs click_element (raw coordinates vs accessibility target). These pairs remain somewhat confusable at a glance, but the guidance resolves them, so only minor ambiguity remains.
Everything is snake_case, but the convention is mixed: some names are verbs (drag, type, click, scroll, inspect) while others are bare nouns (menu, key, screenshot) or noun-verbs (click_element, set_value). It stays readable, but there is no single predictable verb_noun pattern.
12 tools is well-scoped for a desktop GUI automation surface, with each tool covering a distinct primitive (input, navigation, inspection, capture) and none appearing redundant.
The set covers a broad automation lifecycle: launch/activate, inspect, click/type/key/set_value, scroll/drag, wait, and screenshot, with accessibility and coordinate fallbacks. Minor gaps exist (e.g. right-click/context menus, hover), but agents can work around them.
Maintenance
Related MCP Connectors
Use your Mac, Windows or Linux computer from ChatGPT, Claude or Codex: files, commands, documents.
Your AI apps as one team: hand work to Codex or Claude Code on your Mac, with a shared logbook.
Mac & Windows: let ChatGPT, Claude & Cursor use your email, calendar, iMessage, Teams, files.
Let your AI agent control real iPhones: screenshots, tap, swipe, type and open apps.
Related MCP Servers
- AlicenseNot gradedqualityDmaintenanceEnables Claude to see and interact with any macOS application using natural language commands. Perfect for testing Mac applications, UI automation, and app development with AI assistance.34MIT
- 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.12 npm12MIT
- AlicenseAqualityCmaintenanceEnables Claude to inspect and drive native macOS app UIs during development via an in-process view tree and screenshot renderer, without requiring screen recording permission.7MIT
- AlicenseNot gradedqualityBmaintenanceEnables controlling macOS apps in the background, letting Claude Code or Codex act on native app UI elements without foregrounding them.1MIT