Control your Mac MCP Server
Open-source MCP server that executes AppleScript on macOS, giving AI agents full control over Mac applications and system features.
AppleScript MCP (peakmojo/applescript-mcp) is a lightweight Model Context Protocol server that exposes a single applescript_execute tool. The tool runs arbitrary AppleScript code on the host Mac, which means any "scriptable" macOS application or system service can be driven by an LLM, including Notes, Calendar, Contacts, Messages, Mail, Finder, Safari, Apple Music, and the shell (via do shell script).
The project is deliberately minimal: the author notes the core is under 100 lines of code. Instead of wrapping each Mac capability behind its own tool, it relies on the model to author AppleScript or JXA snippets and pipe them through osascript. This trades discoverability for flexibility: anything you can script on macOS is reachable through the same single tool.
It ships with both a Node.js entry point (@peakmojo/applescript-mcp on npm) and a Python entry point runnable via uvx. Remote execution over SSH is also supported so the server can run in a container or on a different host while still driving a target Mac.
Tools
| Tool | Description |
|---|---|
applescript_execute |
Executes AppleScript (or JXA) code on macOS to interact with Mac applications and system features such as Notes, Calendar, Contacts, Messages, Mail, Finder, Safari, Music, and the shell. Returns the script's stdout. |
Prerequisites
- macOS (the server uses the system
osascriptbinary) - Node.js (for the npm install) or
uv/uvx(for the Python install) - For remote/SSH execution: SSH enabled on the target Mac and credentials available
Install via npm (Node.js)
No install step is required when using npx. Add the server to your MCP client config:
{
"mcpServers": {
"applescript_execute": {
"command": "npx",
"args": ["@peakmojo/applescript-mcp"]
}
}
}
Install via uvx (Python)
Run directly from the GitHub repo without cloning:
{
"mcpServers": {
"applescript_execute": {
"command": "uvx",
"args": [
"--from",
"git+https://github.com/peakmojo/applescript-mcp",
"mcp-server-applescript"
]
}
}
}
Remote execution over SSH
To drive a Mac from a container or remote host, pass SSH connection arguments:
--remoteHost <host> --remoteUser <user> --remotePassword <password>
Permissions
macOS will prompt for Automation and Accessibility permissions the first time the client controls another app (Messages, Calendar, System Events, etc.). Approve these prompts in System Settings, Privacy and Security, Automation.
- Create reminders, calendar events, or Notes entries from a chat conversation ("add a reminder to call John tomorrow at 10am").
- Read and triage Messages or Mail, draft replies, and send them through the native Apple apps.
- Search local files via Spotlight, then open, move, or rename them in Finder.
- Query system status (battery percent, disk space, running apps, current Music track) for status dashboards or alerts.
- Drive Safari for lightweight browser automation: open URLs, read the current tab's title or selection, or save bookmarks.
- "Create a calendar event called Dentist on Friday at 3pm in the Home calendar."
- "Search Spotlight for PDFs modified in the last week and list their paths."
- "Send an iMessage to Alice saying I'm running 10 minutes late."
- "What's my battery percentage and how much free disk space is on the boot volume?"
- "Get the URL and page title of the active Safari tab and add it to Notes under a folder called Reading List."
- One tool covers the entire macOS scripting surface, so capabilities grow with whatever the model can write in AppleScript or JXA.
- Tiny, auditable codebase (under 100 lines of core logic).
- Ships both Node.js (
npx) and Python (uvx) entry points, plus optional SSH remoting for containerized setups. - No API keys, accounts, or cloud dependencies; everything runs locally against
osascript.
- Executing arbitrary AppleScript is powerful and dangerous: a misbehaving model can delete files, send messages, or run shell commands via
do shell script. There is no fine-grained permissioning. - Discoverability is low. Because there is only one tool, the model must already know (or guess) the right AppleScript dialect for each app.
- Community-maintained, not affiliated with Apple. macOS version or app updates can break specific scripts without notice.
- steipete/macos-automator-mcp: adds a library of 200+ pre-built AppleScript and JXA recipes on top of the raw execution model.
- joshrutkowski/applescript-mcp: an alternative AppleScript MCP that exposes more granular per-app tools instead of a single execute call.
- ashwwwin/automation-mcp: focused on mouse, keyboard, screen, and window control rather than AppleScript.