AppleScript Automation MCP

AppleScript Automation MCP

A local MCP server that exposes macOS automation actions (AppleScript + CLIs) as tools, enabling MCP clients on your Mac to control apps, system settings, and more.

Category
访问服务器

README

AppleScript Automation MCP

A local MCP server that exposes macOS automation actions (AppleScript + a few CLIs) as tools, so any MCP client running on your Mac (Claude Desktop, Cursor, etc.) can drive them.

It runs locally over stdio — osascript needs the real machine, so this can't be a remote/hosted server. Non-destructive only: no delete/erase/shutdown/trash.

Quickstart

macOS, Python 3.10+. Clone and run the installer — it sets up a venv and wires the server into Claude Desktop for you:

git clone https://github.com/anmolol117/applescript-automation-mcp.git
cd applescript-automation-mcp
bash install.sh

Then quit Claude Desktop completely (Cmd-Q) and reopen it. That's it — the rest of this README is for manual setup, HTTP mode, and permissions.

install.sh backs up your existing claude_desktop_config.json (to .bak) and merges in the applescript server without touching other servers.

Install (manual)

pip install -r requirements.txt        # or: pip install "mcp>=1.2.0"
python server.py                       # sanity check; Ctrl-C to stop

Python 3.10+.

Connect a client

Claude Desktop (local). Install into a venv, then point the config at that venv's Python (Claude Desktop launches with a minimal environment, so bare python3 usually won't find mcp):

python3 -m venv .venv
.venv/bin/pip install -r requirements.txt

Edit ~/Library/Application Support/Claude/claude_desktop_config.json with absolute paths for both the interpreter and the script:

{
  "mcpServers": {
    "applescript": {
      "command": "/ABSOLUTE/PATH/applescript-automation-mcp/.venv/bin/python",
      "args": ["/ABSOLUTE/PATH/applescript-automation-mcp/server.py"]
    }
  }
}

Quit Claude Desktop completely and reopen it. Connection status and logs live under Settings → Developer. Restart after any config edit.

Other MCP clients (Cursor, etc.) take the same command/args shape.

Run as an HTTP URL

The same file can serve over HTTP instead of stdio, for URL-based clients:

MCP_TRANSPORT=streamable-http python3 server.py
# serves at http://127.0.0.1:8000/mcp

Override MCP_HOST / MCP_PORT if needed. This still runs on your Mac — it's a local URL, not a hosted one.

Using with Claude connectors — read this first

Claude custom connectors expect a public HTTPS MCP endpoint. This server controls your Mac via osascript, so it can only ever run on your Mac — a hosted connector on Anthropic's servers would have no Mac to control and every tool would fail. There is no way to make this a normal hosted connector.

Two real options:

  1. Local client (recommended). Use the stdio config above with a client that runs on your Mac (Claude Desktop, Cursor). No URL, no tunnel, nothing exposed to the internet.
  2. Tunnel the local HTTP server (advanced, risky). Run the HTTP mode and expose it with a tunnel (e.g. cloudflared tunnel --url http://localhost:8000 or ngrok http 8000), then give Claude the public …/mcp URL. This works only while your Mac and the tunnel stay up, and it exposes full control of your Mac to a public URL — anyone who reaches it can run these tools. Only do this behind authentication you add yourself, and never leave it running.

Push to GitHub

git init && git add . && git commit -m "AppleScript automation MCP server"
git branch -M main
git remote add origin https://github.com/anmolol117/applescript-automation-mcp.git
git push -u origin main

The repo is the source; users clone it and connect via stdio (option 1). A GitHub URL is not itself an MCP endpoint.

Permissions (required)

The first time a tool controls an app, macOS prompts for permission. Approve them, or pre-grant under System Settings → Privacy & Security:

  • Automation — the client app (or the terminal launching the server) must be allowed to control Messages, Music, Photos, Contacts, System Events, etc.
  • Accessibility — needed by tools that send keystrokes (search_photos, search_music_track).
  • Screen Recording — needed for screenshot.

If a tool returns a permission error, it's one of these grants.

Tools

Actions: run_applescript, open_app, close_app, set_volume, mute, unmute, toggle_dark_mode, lock_screen, set_clipboard, notify, say, open_url, search_google, search_youtube, screenshot, compose_mail, send_imessage, facetime_call, create_reminder, maps_directions, search_photos, music_playpause, music_next, music_previous, search_music_track, run_shortcut.

Read-only: frontmost_app, list_running_apps, get_volume, is_muted, battery_status, get_ip, get_datetime, disk_usage, memory_stats, get_clipboard, lookup_contact, now_playing, list_shortcuts.

Notes

  • run_applescript refuses destructive scripts (delete/erase/shutdown/etc.).
  • run_shortcut is the escape hatch: build anything in the Shortcuts app — Focus modes, HomeKit, timers — and call it by name. Input passing isn't wired up; add -i <file> in run_shortcut if a shortcut needs input.
  • send_imessage uses the classic service type = iMessage selector, which can break on some macOS versions if no iMessage account is active; check Messages is signed in if it errors.
  • Every tool returns {ok, output, error} and never hangs — subprocess calls time out instead of blocking the client.

推荐服务器

Baidu Map

Baidu Map

百度地图核心API现已全面兼容MCP协议,是国内首家兼容MCP协议的地图服务商。

官方
精选
JavaScript
Playwright MCP Server

Playwright MCP Server

一个模型上下文协议服务器,它使大型语言模型能够通过结构化的可访问性快照与网页进行交互,而无需视觉模型或屏幕截图。

官方
精选
TypeScript
Magic Component Platform (MCP)

Magic Component Platform (MCP)

一个由人工智能驱动的工具,可以从自然语言描述生成现代化的用户界面组件,并与流行的集成开发环境(IDE)集成,从而简化用户界面开发流程。

官方
精选
本地
TypeScript
Audiense Insights MCP Server

Audiense Insights MCP Server

通过模型上下文协议启用与 Audiense Insights 账户的交互,从而促进营销洞察和受众数据的提取和分析,包括人口统计信息、行为和影响者互动。

官方
精选
本地
TypeScript
VeyraX

VeyraX

一个单一的 MCP 工具,连接你所有喜爱的工具:Gmail、日历以及其他 40 多个工具。

官方
精选
本地
graphlit-mcp-server

graphlit-mcp-server

模型上下文协议 (MCP) 服务器实现了 MCP 客户端与 Graphlit 服务之间的集成。 除了网络爬取之外,还可以将任何内容(从 Slack 到 Gmail 再到播客订阅源)导入到 Graphlit 项目中,然后从 MCP 客户端检索相关内容。

官方
精选
TypeScript
Kagi MCP Server

Kagi MCP Server

一个 MCP 服务器,集成了 Kagi 搜索功能和 Claude AI,使 Claude 能够在回答需要最新信息的问题时执行实时网络搜索。

官方
精选
Python
e2b-mcp-server

e2b-mcp-server

使用 MCP 通过 e2b 运行代码。

官方
精选
Neon MCP Server

Neon MCP Server

用于与 Neon 管理 API 和数据库交互的 MCP 服务器

官方
精选
Exa MCP Server

Exa MCP Server

模型上下文协议(MCP)服务器允许像 Claude 这样的 AI 助手使用 Exa AI 搜索 API 进行网络搜索。这种设置允许 AI 模型以安全和受控的方式获取实时的网络信息。

官方
精选