$git clone https://github.com/peakmojo/applescript-mcpA Model Context Protocol (MCP) server that lets you run AppleScript code to interact with Mac. This MCP is intentionally designed to be simple, straightforward, intuitive, and require minimal setup.
| 1 | # AppleScript MCP Server (Dual access: python and node.js) |
| 2 | |
| 3 | [](https://www.npmjs.com/package/@peakmojo/applescript-mcp) [](https://opensource.org/licenses/MIT) |
| 4 | |
| 5 | ## Overview |
| 6 | |
| 7 | A Model Context Protocol (MCP) server that lets you run AppleScript code to interact with Mac. This MCP is intentionally designed to be simple, straightforward, intuitive, and require minimal setup. |
| 8 | |
| 9 | I can't believe how simple and powerful it is. The core code is <100 line of code. |
| 10 | |
| 11 | <a href="https://glama.ai/mcp/servers/@peakmojo/applescript-mcp"> |
| 12 | <img width="380" height="200" src="https://glama.ai/mcp/servers/@peakmojo/applescript-mcp/badge" alt="AppleScript Server MCP server" /> |
| 13 | </a> |
| 14 | |
| 15 | https://github.com/user-attachments/assets/b85e63ba-fb26-4918-8e6d-2377254ee388 |
| 16 | |
| 17 | ## Features |
| 18 | |
| 19 | * Run AppleScript to access Mac applications and data |
| 20 | * Interact with Notes, Calendar, Contacts, Messages, and more |
| 21 | * Search for files using Spotlight or Finder |
| 22 | * Read/write file contents and execute shell commands |
| 23 | * Remote execution support via SSH |
| 24 | |
| 25 | ## Example Prompts |
| 26 | |
| 27 | ``` |
| 28 | Create a reminder for me to call John tomorrow at 10am |
| 29 | ``` |
| 30 | |
| 31 | ``` |
| 32 | Add a new meeting to my calendar for Friday from 2-3pm titled "Team Review" |
| 33 | ``` |
| 34 | |
| 35 | ``` |
| 36 | Create a new note titled "Meeting Minutes" with today's date |
| 37 | ``` |
| 38 | |
| 39 | ``` |
| 40 | Show me all files in my Downloads folder from the past week |
| 41 | ``` |
| 42 | |
| 43 | ``` |
| 44 | What's my current battery percentage? |
| 45 | ``` |
| 46 | |
| 47 | ``` |
| 48 | Show me the most recent unread emails in my inbox |
| 49 | ``` |
| 50 | |
| 51 | ``` |
| 52 | List all the currently running applications on my Mac |
| 53 | ``` |
| 54 | |
| 55 | ``` |
| 56 | Play my "Focus" playlist in Apple Music |
| 57 | ``` |
| 58 | |
| 59 | ``` |
| 60 | Take a screenshot of my entire screen and save it to my Desktop |
| 61 | ``` |
| 62 | |
| 63 | ``` |
| 64 | Find John Smith in my contacts and show me his phone number |
| 65 | ``` |
| 66 | |
| 67 | ``` |
| 68 | Create a folder on my Desktop named "Project Files" |
| 69 | ``` |
| 70 | |
| 71 | ``` |
| 72 | Open Safari and navigate to apple.com |
| 73 | ``` |
| 74 | |
| 75 | ``` |
| 76 | Tell me how much free space I have on my main drive |
| 77 | ``` |
| 78 | |
| 79 | ``` |
| 80 | List all my upcoming calendar events for this week |
| 81 | ``` |
| 82 | |
| 83 | ## Usage with Claude Desktop |
| 84 | |
| 85 | ### Node.js |
| 86 | ```json |
| 87 | { |
| 88 | "mcpServers": { |
| 89 | "applescript_execute": { |
| 90 | "command": "npx", |
| 91 | "args": [ |
| 92 | "@peakmojo/applescript-mcp" |
| 93 | ] |
| 94 | } |
| 95 | } |
| 96 | } |
| 97 | ``` |
| 98 | |
| 99 | ### Python (uvx) |
| 100 | |
| 101 | No clone needed — run directly from the git repo: |
| 102 | |
| 103 | ```json |
| 104 | { |
| 105 | "mcpServers": { |
| 106 | "applescript_execute": { |
| 107 | "command": "uvx", |
| 108 | "args": [ |
| 109 | "--from", |
| 110 | "git+https://github.com/peakmojo/applescript-mcp", |
| 111 | "mcp-server-applescript" |
| 112 | ] |
| 113 | } |
| 114 | } |
| 115 | } |
| 116 | ``` |
| 117 | |
| 118 | ### Python (local development) |
| 119 | |
| 120 | For local development, clone the repo and use `uv` to run from source: |
| 121 | |
| 122 | ``` |
| 123 | brew install uv |
| 124 | git clone https://github.com/peakmojo/applescript-mcp.git |
| 125 | ``` |
| 126 | |
| 127 | ```json |
| 128 | { |
| 129 | "mcpServers": { |
| 130 | "applescript_execute": { |
| 131 | "command": "uv", |
| 132 | "args": [ |
| 133 | "--directory", |
| 134 | "/path/to/your/repo", |
| 135 | "run", |
| 136 | "mcp-server-applescript" |
| 137 | ] |
| 138 | } |
| 139 | } |
| 140 | } |
| 141 | ``` |
| 142 | |
| 143 | ## Development |
| 144 | |
| 145 | ### Setup |
| 146 | |
| 147 | ```bash |
| 148 | brew install uv |
| 149 | uv sync --dev |
| 150 | ``` |
| 151 | |
| 152 | ### Run all checks (in parallel) |
| 153 | |
| 154 | ```bash |
| 155 | uv run check |
| 156 | ``` |
| 157 | |
| 158 | This runs linting, formatting, type checking, and tests with 100% coverage — all in parallel. |
| 159 | |
| 160 | ### Individual commands |
| 161 | |
| 162 | ```bash |
| 163 | uv run lint # ruff linter |
| 164 | uv run format # ruff auto-format |
| 165 | uv run typecheck # pyrefly type checker |
| 166 | uv run test # pytest with 100% coverage enforcement |
| 167 | ``` |
| 168 | |
| 169 | ## Docker Usage |
| 170 | |
| 171 | When running in a Docker container, you can use the special hostname `host.docker.internal` to connect to your Mac host: |
| 172 | |
| 173 | ### Configuration |
| 174 | ```json |
| 175 | { |
| 176 | "mcpServers": { |
| 177 | "applescript_execute": { |
| 178 | "command": "npx", |
| 179 | "args": [ |
| 180 | "@peakmojo/applescript-mcp", |
| 181 | "--remoteHost", "host.docker.internal", |
| 182 | "--remoteUser", "yourusername", |
| 183 | "--remotePassword", "yourpassword" |
| 184 | ] |
| 185 | } |
| 186 | } |
| 187 | } |
| 188 | ``` |
| 189 | |
| 190 | This allows your Docker container to execute AppleScript on the Mac host system. Make sure: |
| 191 | |
| 192 | 1. SSH is enabled on your Mac (System Settings → Sharing → Remo |