Apple Mail MCP
@imdinu
Apple Mail MCP server with full-coverage FTS5 body search. Reliable on large mailboxes where AppleScript-based servers timeout.
Overview
What is Apple Mail MCP?
Apple Mail MCP is a Model Context Protocol server that provides full-coverage body search for Apple Mail on macOS. It uses an FTS5 index to reliably search large mailboxes where AppleScript-based servers timeout. It offers 8 tools for reading, searching, and extracting email content, and is designed for users who need fast, reliable access to their Apple Mail data through MCP-compatible clients.
How to use Apple Mail MCP?
Install with pipx install apple-mail-mcp, then add the server to your MCP client configuration with the command apple-mail-mcp. Optionally build the search index with apple-mail-mcp index --verbose (requires Full Disk Access for Terminal). Customize defaults by running apple-mail-mcp init to generate a config file, or use APPLE_MAIL_* environment variables. All tools are also available as standalone CLI commands (e.g., apple-mail-mcp search "query").
Key features of Apple Mail MCP
- Full-coverage body search via FTS5 index
- 8 tools: list accounts, mailboxes, get emails, search, extract links and attachments
- ~3ms single email fetch via disk-first .emlx reading
- ~1ms list accounts and ~5ms 50-email listing via direct SQLite reads
- Reliable on large mailboxes (tested on ~73K messages)
- CLI commands for all tools (JSON output)
Use cases of Apple Mail MCP
- Search entire mailbox body content for keywords or phrases
- Extract email attachments programmatically
- List accounts and mailboxes for navigation
- Retrieve email links for further processing
- Integrate Apple Mail data into AI workflows via MCP clients
FAQ from Apple Mail MCP
What makes Apple Mail MCP different from other Apple Mail MCP servers?
It is the only server with full-coverage body search. Most competitors do not support body search at all; the one that does (BastianZim) only scans the 5000 most recent messages. Apple Mail MCP’s FTS5 index covers the entire mailbox.
What are the runtime requirements?
Python 3.11+, macOS, and Full Disk Access for Terminal when building the search index. No other external dependencies.
How does Apple Mail MCP handle large mailboxes?
It uses a disk-first .emlx reading strategy and direct SQLite reads from the Envelope-Index, avoiding AppleScript/JXA timeouts. Tested reliably on a ~73K message mailbox.
What transports and authentication does it use?
It uses the standard MCP stdio transport. No authentication is required; it reads the local Apple Mail database.
Where does the email data live?
Data is read directly from the local Apple Mail database and .emlx files. The FTS5 search index is built locally and stored on disk.