
Local-first Apple Mail MCP. Dead fast. Dead simple.
概览
Read-only MCP server for Apple Mail on macOS. Also works as a CLI tool. Need an AI agent to safely search and read Apple Mail on your Mac? This project provides a clean, read-only MCP layer over Apple Mail’s native storage — fast index-based searches, on‑demand body hydration from .emlx, and zero write access. It gives an LLM or AI agent fast local access to Apple Mail metadata, message bodies, and attachment text . Apple Mail already contains the data an agent needs, but it is buried in a local SQLite index and scattered .emlx files. This project exposes that storage through a small, intent-driven MCP interface so an agent can: - locate messages by subject, date range, sender, participant, mailbox, or account; - fetch a full message including metadata, recipients, body, and attachment summary; - extract readable text from supported attachments; - operate completely and .
README
以下为原文 README 节选,完整内容请查看原文。
Rusty Apple Mail MCP Server
TL;DR
Read-only MCP server for Apple Mail on macOS. Also works as a CLI tool.
Need an AI agent to safely search and read Apple Mail on your Mac? This project provides a clean, read-only MCP layer over Apple Mail’s native storage — fast index-based searches, on‑demand body hydration from .emlx, and zero write access.
It gives an LLM or AI agent fast local access to Apple Mail metadata, message bodies, and attachment text without AppleScript and without IMAP/POP/EWS network calls.
Why this matters
Apple Mail already contains the data an agent needs, but it is buried in a local SQLite index and scattered .emlx files.
This project exposes that storage through a small, intent-driven MCP interface so an agent can:
- locate messages by subject, date range, sender, participant, mailbox, or account;
- fetch a full message including metadata, recipients, body, and attachment summary;
- extract readable text from supported attachments;
- operate completely locally and read-only.
In practice, it empowers AI workflows to search and read your mail archive safely and quickly, without relying on Mail.app automation like AppleScript (which damn slow and throws timeouts regularly) or network protocols.
What the server can do
The current tool set is intentionally compact:
| Tool | What it does |
|---|---|
search_messages |
Search by subject, dates, sender, participant, account, or mailbox |
list_accounts |
Discover account identifiers; set include_mailboxes=true for combined account+mailbox discovery |
get_message |
Read one message through a bounded content window; recipients omitted by default (include_recipients=true to include) |
get_attachment_content |
Extract readable attachment text through a bounded content window |
Installation
Prerequisites
- macOS
- Apple Mail installed and synced at least once
- Rust toolchain (
rustup,cargo)
Note — macOS Full Disk Access required
Apple Mail’s data directory (
~/Library/Mail) is protected by macOS TCC (Transparency, Consent, and Control). The MCP server process must have Full Disk Access to read the Envelope Index database.Grant Full Disk Access to the application that runs the MCP server:
- Open System Settings → Privacy & Security → Full Disk Access
- Click + and add the application (e.g., your terminal emulator, VS Code, Zed, Cursor)
- Ensure the toggle is enabled
安装
npx -y @modelcontextprotocol/inspector ./target/release/rusty_apple_mail_mcp