macos-computer-use
Allows controlling Google Chrome by finding and clicking text, capturing window screenshots, listing windows, and sending input directly to Chrome processes.
Provides full desktop automation on macOS, including screen capture, OCR-based text recognition, and input simulation without moving the physical mouse or keyboard.
Allows launching and controlling Safari, including text-based interaction and screen capture.
Allows launching and controlling Slack, including text-based interaction and screen capture.
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., "@macos-computer-useFind and click the 'Login' button on the current screen"
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.
๐ macOS Computer Use (MCP Server)
An ultra-fast, native Model Context Protocol (MCP) server that gives LLMs and autonomous agents visual inspection and fail-closed desktop automation on macOS.
Built with a compiled Swift core leveraging Apple's native CoreGraphics, Vision OCR (VNRecognizeTextRequest), and Accessibility APIs for semantic background actions. Untargeted input remains an explicit global CoreGraphics fallback.
โก Key Highlights
๐ฏ Native Apple Vision OCR (
find_text/click_text): Finds visible text with explicitexact,word,prefix, orsubstringmatching and refuses ambiguous clicks unless an occurrence is selected.๐ก๏ธ Fail-Closed Targeting:
windowIdis authoritative. Invalid IDs and app/window mismatches return errors instead of falling back to another window or the full display.๐ Safe by Default: Global pointer/keyboard input, foreground app activation, and custom AppleScript are disabled unless the MCP process starts with
MACOS_COMPUTER_USE_UNSAFE=1.๐ฉบ Permission Preflight:
get_capabilitiesreports Accessibility, Screen Recording, and event-synthesis readiness without calling macOS permission request APIs.โฟ Background Accessibility Actions: Inspect controls, set values, press semantic actions, and target editable controls without activating their application.
โฑ๏ธ Semantic Background Waiting: Waits for Accessibility controls to appear without taking a screenshot or requiring Screen Recording.
๐ฑ๏ธ Live Agent Cursor: Clicks and scrolling glide a distinctive, click-through cursor overlay to the target, show success or failure feedback, and fade when idle without moving your physical pointer.
๐๏ธ Matching Screenshot Cursor (
mark_cursor): Returned action screenshots render the same agent cursor at the target coordinate.โก Reactive UI Synchronization (
wait_for_text): Replaces blindsleep()timeouts with a high-speed OCR polling loop that resolves the instant dynamic autocomplete dropdowns, modals, or state changes appear.๐ผ๏ธ Window-Isolated Screen Capture: Captures target application buffers cleanly in the background (
screencapture -l <wid> -o -x) without bringing the window to the front or capturing overlapping windows.
Related MCP server: ScreenHand
๐ ๏ธ Tools Exposed
Tool | Description | Key Parameters |
| Finds OCR text, glides the live cursor to it, resolves ambiguity, and invokes the matching Accessibility control. |
|
| Inspects on-screen or window-specific text and returns exact bounding boxes and logical coordinates. |
|
| Reactively polls the target window/screen until expected text appears (autocomplete dropdowns, toasts, sheets). |
|
| Captures the entire display or a specific background application window with optional virtual cursor rendering. |
|
| Reports permission readiness, platform details, and the active safe/unsafe policy without requesting access. | None |
| Lists open application windows, process IDs ( |
|
| Reads semantic controls from an exact background window. Values are private by default and require |
|
| Waits for one or more semantic controls in an exact background window. |
|
| Sets a semantic control value while checking that the target stayed in the background. |
|
| Performs |
|
| Glides the live cursor to |
|
| Uses verified application-targeted delivery when a target and semantic selector are supplied. |
|
| Posts supported keys to a semantic editable control in |
|
| Glides the live cursor to the target and adjusts an AX scrollbar. Untargeted global scrolling requires unsafe mode. |
|
| Launches in the background by default. |
|
| Returns the frontmost application from | None |
| Runs custom AppleScript only when unsafe mode is enabled; omitted from the default tool list. |
|
๐ Installation & Setup
Run with npx
Configure an MCP client to download, build, and launch the latest public package:
{
"mcpServers": {
"macos-computer-use": {
"command": "npx",
"args": ["-y", "macos-computer-use-mcp"]
}
}
}The package includes an ad-hoc-signed universal Swift helper for Apple Silicon and Intel Macs, so npx does not require a local Swift compiler or install-script approval.
The default configuration exposes semantic background automation and read-only inspection. For workflows that intentionally need global pointer/keyboard input, foreground activation, or arbitrary AppleScript, opt in explicitly:
{
"mcpServers": {
"macos-computer-use": {
"command": "npx",
"args": ["-y", "macos-computer-use-mcp"],
"env": {
"MACOS_COMPUTER_USE_UNSAFE": "1"
}
}
}
}1. Prerequisites
macOS 13.0+ (Apple Silicon or Intel)
Node.js 20+
Xcode Command Line Tools only when building from source:
xcode-select --install
2. Clone & Build
git clone https://github.com/johnexzy/macos-computer-use.git
cd macos-computer-use
npm install
npm run build๐ Capability-Based macOS Permissions
Only grant the permission needed by the tools you use. macOS attributes the permission to the host application running the MCP server (Terminal, OpenCode, Cursor, VS Code, and so on):
Accessibility: Required for semantic inspection and actions. It does not require Screen Recording.
Screen & System Audio Recording: Required only for screenshots and Vision OCR tools such as
screenshot,find_text,click_text, andwait_for_text.Event synthesis: Unsafe-mode global CoreGraphics clicks, typing, key presses, and scrolling require event-posting access. Semantic Accessibility actions do not use this global fallback.
Automation: Can be requested by macOS only when unsafe mode is enabled and
run_applescriptsends an event to another application. Core input and background tools use the native helper instead of System Events.
Call get_capabilities before protected operations. Permission inspection uses Apple's preflight APIs and does not open a permission prompt. If access is absent, screenshot/OCR and global input paths return SCREEN_RECORDING_PERMISSION_REQUIRED or INPUT_POSTING_PERMISSION_REQUIRED before dispatch. Grant access manually in System Settings, then reconnect the MCP if the host still holds stale privacy state.
macOS can still require the host app to be restarted after a newly granted privacy permission. This is enforced by macOS; the server does not repeatedly prompt or request unrelated permissions.
Background UI automation is cooperative: macOS can address Accessibility elements in another process, but an application may ignore targeted keyboard events or change its identifiers in a later release. These tools return explicit unsupported/unconfirmed errors in those cases instead of activating the app or reporting a false success.
๐ MCP Configuration
Add this server to your MCP client configuration:
Antigravity / Claude Desktop / Cursor / Windsurf
Add to your mcp_config.json / claude_desktop_config.json:
{
"mcpServers": {
"macos-computer-use": {
"command": "node",
"args": ["/absolute/path/to/macos-computer-use/server.mjs"]
}
}
}๐งช Testing the Native Swift Helper Directly
You can test the native binary directly from your terminal:
# Display resolution and scaling
./native_helper size
# List active Chrome windows in Z-order
./native_helper list_windows "Google Chrome"
# Find a button or text on screen with Apple Vision OCR in ~30ms
./native_helper find_text "Search" "Google Chrome"
# Reactively wait for dynamic text to appear
./native_helper wait_for_text "quantum" "Google Chrome" nil 5.0Run the automated fail-closed and matching regressions:
npm testVerify semantic inspection against a background Calculator window:
npm run test:background -- CalculatorWith Calculator and System Settings open, run the live native-app smoke suite. The test opts into unsafe mode because it uses AppleScript to create and clean up TextEdit fixtures:
npm run test:liveMutating tool results include an execution object with a versioned contract, delivery method, verification level, foreground-preservation state, and target. Coordinate-based actions retain status: "delivered_unverified"; verify consequential post-state with semantic inspection, OCR, or a screenshot.
The MCP server starts one cursor overlay process lazily on the first click or scroll and stops it when the MCP connection closes. The overlay never intercepts mouse input, joins all Spaces and full-screen windows, and reports cursorOverlay.status: "unavailable" without blocking the requested action if AppKit cannot display it.
๐ฆ Publishing
Pushes to main run the npm publishing workflow. To release a new version, update the version in package.json and package-lock.json before merging. Versions that already exist on npm are tested and skipped.
๐ License
MIT ยฉ John Oba
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections. Dates show when Glama detected each change.
No tool schema history has been recorded yet.
This server cannot be installed
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 Connectors
Personal assistant MCP server with search, execute, packages, jobs, secrets, and integrations.
MCP server for visual regression testing: triage a PR's UI diffs from your coding agent.
9118MCP connector that lets ChatGPT list, search, and run your Apple Shortcuts via a local Mac agent
Let ChatGPT, Claude & Cursor use your Mac: email, calendar, iMessage, Teams, files. Local, free.
Related MCP Servers
- AlicenseNot gradedqualityFmaintenanceAn experimental MCP server providing full control over the macOS user interface through mouse, keyboard, and window management tools. It enables AI assistants to automate desktop tasks by utilizing native accessibility APIs and OCR for real-time screen comprehension.7Creative Commons Zero v1.0 Universal
- AlicenseNot gradedqualityFmaintenanceAn open-source MCP server for macOS and Windows that provides native desktop control via Accessibility APIs, OCR, and Chrome CDP. It enables AI agents to interact with applications, manage browser sessions, and automate workflows with high-speed native UI actions.3313AGPL 3.0
- AlicenseNot gradedqualityDmaintenanceA production-grade macOS MCP server exposing 33 tools for full desktop automation, including mouse, keyboard, screenshot, clipboard, and window control.1MIT
- FlicenseAqualityDmaintenanceMCP server for macOS desktop automation enabling screenshot, click, type, scroll, and more. Retina-aware, supports CJK text input and multi-monitor, works with any MCP client without API keys.154-
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/johnexzy/macos-computer-use'
If you have feedback or need assistance with the MCP directory API, please join our Discord server