macos-mcp
Local MCP server for macOS native apps: Mail, Calendar, Reminders, Notes, Messages, and Contacts. Enables reading and organizing your Mac life through a single stdio process using AppleScript/JXA.
README
macos-mcp
Local MCP server for macOS native apps: Mail, Calendar, Reminders, Notes, Messages, and Contacts. One stdio process, zero npm dependencies, Node 20+.
Windows and Linux are not supported. All tools talk to local apps via AppleScript/JXA. No Gmail API, no OAuth, no cloud credentials.
What it is
One MCP server = one mental model: read and organize your Mac life.
| Module | App | Prefix |
|---|---|---|
| Mail.app | mail_* |
|
| Calendar | Calendar.app | calendar_* |
| Reminders | Reminders.app | reminders_* |
| Notes | Notes.app | notes_* |
| Messages | Messages.app (chat.db) |
messages_* |
| Contacts | Contacts.app | contacts_* |
Email is draft-only. mail_draft_email opens a visible draft in Mail.app; it never sends. You review and send manually.
Requirements
- macOS with Mail, Calendar, Reminders, Notes, Messages configured
- Node.js ≥ 20
- Cursor (or any MCP client that supports stdio)
Install
git clone <your-repo-url> macos-mcp
cd macos-mcp
node scripts/install-mcp.js
Restart Cursor. The installer registers macos-local in ~/.cursor/mcp.json (backs up existing config to .bak).
Manual registration:
{
"mcpServers": {
"macos-local": {
"command": "node",
"args": ["/absolute/path/to/macos-mcp/bin/macos-mcp.js"]
}
}
}
Signatures (mail drafts)
bash scripts/install-mail-signatures.sh
Edit signatures/manifest.json and signatures/*.txt locally. Real signatures are gitignored.
macOS permissions
Grant in System Settings → Privacy & Security:
| Permission | Needed for |
|---|---|
| Automation — allow Cursor to control Mail, Calendar, Reminders, Notes, Contacts | JXA/AppleScript modules |
| Full Disk Access — Cursor (or Terminal during testing) | Messages module (~/Library/Messages/chat.db) |
On first tool call, macOS may prompt for Automation approval per app.
Tool index
Mail (mail_*)
| Tool | Description |
|---|---|
mail_list_accounts |
List Mail accounts |
mail_list_mailboxes |
List mailboxes (optional account filter) |
mail_list_messages |
List messages in mailbox |
mail_search_messages |
Search subject/sender |
mail_get_message |
Full message by id |
mail_save_attachments |
Save message attachments to a local directory |
mail_draft_email |
Open new compose draft (never sends) |
mail_draft_reply |
Open reply draft in thread (never sends) |
mail_archive_messages |
Move to All Mail |
mail_trash_messages |
Move to Trash |
mail_mark_read |
Mark read/unread |
mail_move_messages |
Move to mailbox |
Calendar (calendar_*)
| Tool | Description |
|---|---|
calendar_list_calendars |
List calendars |
calendar_list_events |
Events in date range |
calendar_search_events |
Search title/location |
calendar_get_event |
Full event |
calendar_create_event |
Create event (optional attendees email list) |
calendar_update_event |
Update event |
calendar_delete_event |
Delete event |
Reminders (reminders_*)
| Tool | Description |
|---|---|
reminders_list_lists |
List reminder lists |
reminders_list |
List reminders in a list |
reminders_search |
Search name/notes |
reminders_create |
Create reminder |
reminders_complete |
Mark complete |
reminders_delete |
Delete reminder |
Notes (notes_*)
| Tool | Description |
|---|---|
notes_list_folders |
List folders |
notes_list |
List notes |
notes_search |
Search title/body |
notes_get |
Get note body |
notes_create |
Create note |
notes_append |
Append to note |
On newer macOS, note body extraction may fail; notes_get returns body_unavailable: true when scripting is restricted.
Calendar queries can be slow (several seconds per calendar) on accounts with large histories. Pass calendar to narrow the search.
Messages (messages_*)
| Tool | Description |
|---|---|
messages_get_thread |
Thread by phone/email substring |
messages_list_chats |
Recent chats |
Requires Full Disk Access. Reads iMessage/SMS locally; no network.
Contacts (contacts_*)
| Tool | Description |
|---|---|
contacts_list |
List contacts (optional: missing email only) |
contacts_search |
Search by name/email/phone |
contacts_get |
Full contact card |
contacts_create |
Create contact |
contacts_update |
Update contact |
contacts_delete |
Delete contact |
contacts_import_csv |
Import Google Contacts CSV (upsert by email) |
Architecture
bin/macos-mcp.js → entrypoint
src/mcp/server.js → JSON-RPC MCP (protocol 2024-11-05)
src/mcp/transport.js → stdio NDJSON
src/mcp/tools.js → aggregates all module tools
src/runtime/jxa.js → generic JXA runner (Application per app)
src/runtime/applescript.js → AppleScript runner + draft email
src/mail/ → Mail module
src/calendar/ → Calendar module
...
JXA vs AppleScript
- JXA (
osascript -l JavaScript): read/list/search most app data; genericrunJxa(appName, body, args). - AppleScript:
mail_draft_email, calendar create/update/delete, and contacts create/update (JXAmakeis unreliable on modern Calendar.app and Contacts.app).
Response shapes: lists include count; domain keys vary (items, events, reminders, notes, chats, contacts). Errors throw and return MCP isError: true.
Mail.app quirks
- Saved drafts may retain a leading newline Mail adds on save; the compose window is usually correct.
- AppleScript does not auto-attach Mail.app signature prefs; this server appends from
signatures/files instead.
What it is NOT
- No Gmail API, Microsoft Graph, or OAuth
- No auto-send email
- No npm publish (
private: true) - No telemetry or network calls in server code
Development
npm start # runs stdio server (stderr: [macos-mcp] ready; N tools; macOS only)
Test a tool via MCP client or send JSON-RPC to stdin.
License
MIT
推荐服务器
Baidu Map
百度地图核心API现已全面兼容MCP协议,是国内首家兼容MCP协议的地图服务商。
Playwright MCP Server
一个模型上下文协议服务器,它使大型语言模型能够通过结构化的可访问性快照与网页进行交互,而无需视觉模型或屏幕截图。
Magic Component Platform (MCP)
一个由人工智能驱动的工具,可以从自然语言描述生成现代化的用户界面组件,并与流行的集成开发环境(IDE)集成,从而简化用户界面开发流程。
Audiense Insights MCP Server
通过模型上下文协议启用与 Audiense Insights 账户的交互,从而促进营销洞察和受众数据的提取和分析,包括人口统计信息、行为和影响者互动。
VeyraX
一个单一的 MCP 工具,连接你所有喜爱的工具:Gmail、日历以及其他 40 多个工具。
graphlit-mcp-server
模型上下文协议 (MCP) 服务器实现了 MCP 客户端与 Graphlit 服务之间的集成。 除了网络爬取之外,还可以将任何内容(从 Slack 到 Gmail 再到播客订阅源)导入到 Graphlit 项目中,然后从 MCP 客户端检索相关内容。
Kagi MCP Server
一个 MCP 服务器,集成了 Kagi 搜索功能和 Claude AI,使 Claude 能够在回答需要最新信息的问题时执行实时网络搜索。
e2b-mcp-server
使用 MCP 通过 e2b 运行代码。
Neon MCP Server
用于与 Neon 管理 API 和数据库交互的 MCP 服务器
Exa MCP Server
模型上下文协议(MCP)服务器允许像 Claude 这样的 AI 助手使用 Exa AI 搜索 API 进行网络搜索。这种设置允许 AI 模型以安全和受控的方式获取实时的网络信息。