macos-mcp-automation
Provides browser control tools to retrieve open tab titles and URLs and open URLs in Google Chrome.
Provides macOS system automation tools for managing applications, windows, system settings, notifications, screenshots, clipboard, and file search.
Provides browser control tools to retrieve open tab titles and URLs and open URLs in Safari.
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., "@macos-mcp-automation Show me my open browser tabs"
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 MCP Automation Server (macos-mcp-automation)
A Model Context Protocol (MCP) server providing rich macOS system automation, window management, and productivity tools.
Designed for AI agents, it allows tools like Claude Desktop to interact with your Mac, run AppleScripts, open applications, retrieve browser tabs, take silent screenshots, search files via Spotlight, adjust system settings, and more.
Quick Start (npx)
You can run this server directly via npx without installing it permanently:
{
"mcpServers": {
"macos-automation": {
"command": "npx",
"args": ["-y", "macos-mcp-automation"]
}
}
}Add the configuration above to your client configuration file, for example:
Claude Desktop:
~/Library/Application Support/Claude/claude_desktop_config.jsonCursor: Settings > Features > MCP
Related MCP server: mac-mcp-server
CLI Usage (Direct Terminal Commands)
In addition to starting an MCP server, this package works as a direct macOS desktop automation CLI. Running any command other than mcp triggers the action directly in your shell.
Examples:
Lock Screen:
npx macos-mcp-automation lockVolume control:
npx macos-mcp-automation volume 50(ornpx macos-mcp-automation volumeto print current volume)Notification:
npx macos-mcp-automation notify "Job complete!" "Build Agent"Take Screenshot:
npx macos-mcp-automation screenshot(saves to your Desktop)Open App:
npx macos-mcp-automation open "Spotify"Fetch active window:
npx macos-mcp-automation active-windowShow help guide:
npx macos-mcp-automation help
macOS Security & Permissions
Because this tool simulates keystrokes and controls applications:
When you run tools like
type_text,press_key_combination, orget_active_windowfor the first time, macOS will show a permission popup asking to grant the terminal/client Accessibility or Automation permissions.Grant these permissions in System Settings > Privacy & Security > Accessibility and Automation for your terminal or Claude Desktop.
Available Tools
The server exposes 17 high-level tools:
System & Window Automation
run_applescript: Execute any raw AppleScript on your system.open_app: Launch or focus any macOS application by name (e.g.,"Safari","Spotify","Terminal").quit_app: Quits or force-quits an application by name (e.g.,"Safari").list_apps: Returns a list of all currently open running applications.get_active_window: Retrieves the name of the active frontmost application and its window title.type_text: Simulates typing text character-by-character at the current cursor position.press_key_combination: Synthesizes key strokes and shortcuts (e.g.,["command", "ctrl"]+"q"to lock).
System Controls
take_screenshot: Captures a full screenshot silently (no sound) and returns it directly to the LLM agent as a base64-encoded PNG image content block.get_volume: Gets the current output volume percentage.set_volume: Sets the output volume percentage (0-100).adjust_brightness: Adjusts screen brightness up or down by a set number of steps.lock_screen: Instantly locks the macOS screen.sleep_mac: Puts the Mac to sleep.display_notification: Displays a native macOS banner notification with title, subtitle, and body text.
Productivity & Clipboard
clipboard_get: Reads the text content currently stored in the system clipboard.clipboard_set: Writes text content to the system clipboard.spotlight_search: Searches files instantly using native macOS Spotlight (mdfind) with optional directory restriction.
Browser Control
get_browser_tabs: Fetches titles and URLs of all open tabs from Google Chrome, Safari, or both.open_browser_url: Opens a URL in the system default browser or specifically Safari / Chrome.
Development & Local Testing
If you want to build and run the project locally:
1. Clone & Install Dependencies
git clone <repository-url>
cd macos_mcp
npm install2. Build the Project
We use tsup to bundle TypeScript into a single-file executable ESM bundle inside dist/index.js:
npm run build3. Run Locally (via absolute path)
Configure your MCP client to point to the local built file:
{
"mcpServers": {
"macos-automation-local": {
"command": "node",
"args": ["/Users/YOUR_USER/path/to/macos_mcp/dist/index.js"]
}
}
}License
This project is licensed under the MIT License.
Available Tools
21 toolsadjust_brightnessA
Adjusts screen brightness up or down by a specified number of steps.
Inputs: direction (required), steps.
clipboard_getA
Reads the text content currently stored in the macOS system clipboard.
Inputs: no named parameters.
clipboard_setA
Copies a text string to the macOS system clipboard.
Inputs: text (required).
create_email_draftA
Drafts and opens an email in Apple Mail with optional recipient ('to'), subject line, and body message content.
Inputs: to, body, subject.
create_noteA
Creates and saves a new note in the native Apple Notes application with a title, body content, and optional folder.
Inputs: title (required), body, folder.
display_notificationA
Displays a native macOS banner notification with title, subtitle, and body text.
Inputs: message (required), title, subtitle.
get_active_windowA
Gets the application name and window title of the frontmost active window.
Inputs: no named parameters.
get_browser_tabsA
Retrieves all open browser tab titles and URLs from Safari, Chrome, or both.
Inputs: browser.
get_volumeA
Gets the current macOS audio output volume percentage.
Inputs: no named parameters.
list_appsA
Lists all currently open visible user applications running on macOS.
Inputs: onlyVisible.
lock_screenA
Instantly locks the macOS user screen.
Inputs: no named parameters.
open_appA
Launches or brings to front a macOS application by name (e.g. Safari, Mail, Terminal, Spotify).
Inputs: appName (required).
open_browser_urlB
Opens a web URL link in the default browser, Safari, or Chrome.
Inputs: url (required), browser.
press_key_combinationB
Simulates pressing a key (enter, tab, space, escape, backspace) with optional modifiers (command, option, control, shift).
Inputs: key (required), modifiers.
quit_appA
Quits or force-closes a running macOS application by name.
Inputs: appName (required), force.
run_applescriptB
Executes raw AppleScript code on macOS for custom system automation.
Inputs: script (required).
set_volumeA
Sets the macOS audio output volume percentage (0 to 100).
Inputs: volume (required).
sleep_macA
Puts the macOS system to sleep.
Inputs: no named parameters.
spotlight_searchA
Searches the macOS file system for files using Spotlight index (mdfind).
Inputs: query (required), limit, onlyIn.
take_screenshotA
Captures a desktop screenshot silently and returns it to the client as an image.
Inputs: no named parameters.
type_textA
Simulates keyboard typing at the active text cursor position.
Inputs: text (required).
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 21 tools
Each tool targets a distinct macOS feature or action, such as clipboard get/set, app lifecycle, volume control, or keyboard input. The generic `run_applescript` is explicitly for custom automation and does not overlap with the high-level wrappers, so there is no real ambiguity between tools.
Most tools follow a clear verb_noun snake_case pattern (e.g., `open_app`, `set_volume`, `create_note`). The only deviation is `spotlight_search`, which is noun_verb rather than verb_noun, making it a minor inconsistency.
With 21 tools, the server is above the typical compact range but justifiably so for a broad macOS automation suite covering clipboard, app control, display, input, browser, and Apple app integration. Each tool has a distinct purpose, so the count feels appropriate rather than bloated.
The tools cover core automation workflows: app management, keyboard/mouse simulation, clipboard, screenshots, volume/brightness, lock/sleep, file search, window/browser access, and Apple app shortcuts. Minor gaps like a `get_brightness` tool or email sending are not critical dead ends for typical automation tasks.
Maintenance
Related MCP Connectors
Use your Mac, Windows or Linux computer from ChatGPT, Claude or Codex: files, commands, documents.
Connect AI assistants to your approved computer for files, commands, browser and desktop tasks.
Mac & Windows: let ChatGPT, Claude & Cursor use your email, calendar, iMessage, Teams, files.
- DNS-DATA RemoteDeprecatedcom.dns-data
Connect AI assistants to authorized Windows and macOS devices for files, commands, and management.
Related MCP Servers
- AlicenseBqualityDmaintenanceEnables AI agents to interact with macOS applications (Finder, Mail, Contacts, Reminders, Notes, Calendar, TextEdit) using AppleScript. Allows AI assistants to perform tasks like searching contacts, managing files, checking email, and creating reminders through natural language.241MIT
- AlicenseBqualityCmaintenanceEnables AI assistants to automate macOS through AppleScript and JXA by providing 44 tools for application management, window control, and UI interaction. It allows for comprehensive system control including screen capture, keyboard and mouse simulation, and system information retrieval.4415 npm1MIT
- AlicenseAqualityNot gradedmaintenanceProvides native macOS computer control tools including mouse and keyboard simulation, screenshot capture, and application management for MCP-compatible agents. It enables AI assistants to directly interact with the macOS operating system and installed apps through standard tool calls.2421 npm8MIT
- AlicenseAqualityDmaintenanceEnables AI agents to control macOS desktop apps via screenshots, mouse clicks, keyboard input, accessibility queries, and AppleScript.1112 npmMIT