macos-mcp-tools
A collection of MCP servers for Apple macOS apps (Mail, Contacts, Notes, Memory, Messages, Calendar, Reminders) enabling AI assistants to read, search, create, and update data via JXA, SQLite, and EventKit.
README
@hachitogo/macos-mcp-tools
MCP servers for macOS: Apple Mail, Contacts, Notes, Memory, Messages, Calendar Events, and Reminders.
The project uses a hybrid approach: JXA/osascript for macOS app automation, and direct read-only SQLite access where it is faster and more reliable. In practice this matters most for Apple Mail reads, where pure osascript approaches tended to time out on non-trivial queries. Calendar Events and Reminders use a compiled Swift binary (EventKitCLI) that interfaces directly with Apple's EventKit framework.
What It Provides
mail: read/search Apple Mail and perform selected message actionscontacts: read and update Apple Contacts via JXAnotes: read and update Apple Notes via JXAmemory: local SQLite-backed structured memory storemessages: read/search/send Apple Messages (iMessage and SMS)events: read, create, update, and delete Apple Calendar events via EventKitreminders: read, create, update, and delete Apple Reminders with lists, subtasks, tags, recurrence, and location triggers via EventKit
Architecture
flowchart LR
Client["MCP Client\nClaude Desktop / OpenCode"] --> CLI["bunx @hachitogo/macos-mcp-tools <subcommand>"]
CLI --> Mail["mail server"]
CLI --> Contacts["contacts server"]
CLI --> Notes["notes server"]
CLI --> Memory["memory server"]
CLI --> Messages["messages server"]
CLI --> Events["events server"]
CLI --> Reminders["reminders server"]
Mail --> MailDB["Apple Mail SQLite\nEnvelope Index"]
Mail --> JXA["JXA / osascript"]
Contacts --> JXA
Notes --> JXA
Memory --> MemoryDB["SQLite in local data dir"]
Messages --> MsgDB["Messages SQLite\nchat.db"]
Messages --> JXA
Events --> EventKitCLI["EventKitCLI\nSwift binary"]
Reminders --> EventKitCLI
EventKitCLI --> EventKit["Apple EventKit\nCalendars + Reminders"]
Requirements
- macOS
- Bun 1.0+
- Optional:
pdftotextfor PDF attachment text extraction - Full Disk Access for the terminal app (required by the messages server to read
~/Library/Messages/chat.db) - Xcode Command Line Tools (required to rebuild the EventKitCLI Swift binary from source; not needed if using the prebuilt binary)
Install Bun with Homebrew:
brew install oven-sh/bun/bun
Optional dependency for PDF extraction:
brew install poppler
Quick Start
1. Verify the CLI locally
bunx @hachitogo/macos-mcp-tools mail
Each subcommand starts one standalone MCP server on stdio:
bunx @hachitogo/macos-mcp-tools mail
bunx @hachitogo/macos-mcp-tools contacts
bunx @hachitogo/macos-mcp-tools notes
bunx @hachitogo/macos-mcp-tools memory
bunx @hachitogo/macos-mcp-tools messages
bunx @hachitogo/macos-mcp-tools events
bunx @hachitogo/macos-mcp-tools reminders
2. Configure Claude Desktop
Add entries like this to your Claude Desktop MCP config:
{
"mcpServers": {
"apple_mail": {
"command": "bunx",
"args": ["@hachitogo/macos-mcp-tools", "mail"]
},
"apple_contacts": {
"command": "bunx",
"args": ["@hachitogo/macos-mcp-tools", "contacts"]
},
"apple_notes": {
"command": "bunx",
"args": ["@hachitogo/macos-mcp-tools", "notes"]
},
"memory": {
"command": "bunx",
"args": ["@hachitogo/macos-mcp-tools", "memory"]
},
"apple_messages": {
"command": "bunx",
"args": ["@hachitogo/macos-mcp-tools", "messages"]
},
"apple_events": {
"command": "bunx",
"args": ["@hachitogo/macos-mcp-tools", "events"]
},
"apple_reminders": {
"command": "bunx",
"args": ["@hachitogo/macos-mcp-tools", "reminders"]
}
}
}
3. Configure OpenCode
Add entries like this to your OpenCode MCP config:
{
"mcp": {
"apple_mail": {
"type": "local",
"command": ["bunx", "@hachitogo/macos-mcp-tools", "mail"]
},
"apple_contacts": {
"type": "local",
"command": ["bunx", "@hachitogo/macos-mcp-tools", "contacts"]
},
"apple_notes": {
"type": "local",
"command": ["bunx", "@hachitogo/macos-mcp-tools", "notes"]
},
"memory": {
"type": "local",
"command": ["bunx", "@hachitogo/macos-mcp-tools", "memory"]
},
"apple_messages": {
"type": "local",
"command": ["bunx", "@hachitogo/macos-mcp-tools", "messages"]
},
"apple_events": {
"type": "local",
"command": ["bunx", "@hachitogo/macos-mcp-tools", "events"]
},
"apple_reminders": {
"type": "local",
"command": ["bunx", "@hachitogo/macos-mcp-tools", "reminders"]
}
}
}
Servers
Uses a hybrid implementation: direct read-only SQLite queries for fast message reads and searches, plus JXA for actions like fetching bodies, listing attachments, and mutating message state.
Tools: unread_emails, mark_emails_read, fetch_email_body, mark_emails_junk, mark_emails_not_junk, flag_emails, list_email_attachments, fetch_email_attachment, search_emails, extract_email_links, send_email, reply_email, forward_email
Contacts
CRUD for Apple Contacts people and groups via JXA.
Tools: contacts_people, contacts_groups
Notes
Full CRUD for Apple Notes folders and notes, plus search, via JXA.
Tools: list_folders, create_folder, list_notes, get_note, create_note, update_note, move_note, append_to_note, delete_note, delete_folder, search_notes
Memory
Structured memory store with subject-action-object triples, aliases, and duration queries.
Tools: create_entry, update_entry, get_entry, search_entries, query_last_occurrence, query_duration_since
Messages
Hybrid implementation: direct read-only SQLite queries against ~/Library/Messages/chat.db for reading and searching, plus JXA for sending messages. Supports both 1:1 and group chat sending. Inspired by @griches/apple-messages-mcp (MIT).
Tools: list_chats, get_messages, search_messages, get_participants, send_message
Events
Manages Apple Calendar events via a compiled Swift binary using EventKit. Supports full CRUD with structured locations, alarms, recurrence rules, and availability status.
Tools: calendar_events, calendar_calendars
Reminders
Manages Apple Reminders via EventKit. Supports full CRUD with subtasks (stored as checklists in notes), tags (native #tag format), priority levels, location triggers, alarms, and recurrence rules.
Tools: reminders_tasks, reminders_lists, reminders_subtasks
Configuration
Data Directory
memory stores its SQLite database at:
MACOS_TOOLS_DATA_DIRif set~/.local/share/macos-tools/otherwise
Example:
MACOS_TOOLS_DATA_DIR=/path/to/data bunx @hachitogo/macos-mcp-tools memory
Mail Account Classification
The mail server may create config/email.json locally to classify accounts. This file is treated as generated local state and is ignored by git.
Testing
-
Unit tests:
bun test -
Type checks:
bun run typecheck -
Opt-in integration tests:
bun run test:integration -
Opt-in live macOS app smoke tests:
bun run test:integration:apps -
Swift binary rebuild:
bun run build:swift(requires Xcode Command Line Tools)
Integration tests are isolated and non-destructive. The default opt-in suite uses temporary data directories so it does not touch real memory databases. The live macOS app smoke tests are also read-only, but they do connect to your local Mail, Contacts, Notes, and Messages data and therefore remain separately opt-in.
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 模型以安全和受控的方式获取实时的网络信息。