apple-mail-mcp
Provides read-only access to Apple Mail accounts, enabling email search and retrieval from the local macOS Mail database.
Allows accessing Gmail accounts configured in Apple Mail, supporting search and reading of Gmail emails.
Allows accessing iCloud email accounts configured in Apple Mail, supporting search and reading of iCloud emails.
Click on "Install Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@apple-mail-mcpfind unread emails from last week"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
Apple Mail MCP Server
A lightweight, read-only MCP server for Apple Mail on macOS.
Reads directly from Mail's local SQLite database and .emlx files — no
AppleScript needed for reading. Designed for large mailboxes (tested with
290K+ messages across multiple accounts).
Features
Fast search — SQL-level filtering pushed down to SQLite, not Python-side iteration
Pagination —
offset/limitsupport for large result setsDeterministic file lookup —
.emlxfiles located via a cached directory map, norglobper messageRead-only — no send capability, no AppleScript, minimal attack surface
Minimal dependencies — just the
mcpSDK and Python stdlibMulti-account support — works with iCloud (IMAP), Exchange (EWS), Gmail, and other accounts configured in Mail.app
Related MCP server: email-mcp
Tools
Tool | Description |
| List configured mail accounts |
| List all folders with message counts and unread counts |
| Search / filter by sender, subject, date range, mailbox, read status. Paginated. |
| Fetch full content of a single email by ID (including To, CC, body) |
Installation
With uvx (recommended)
Add to your Claude Desktop config (~/Library/Application Support/Claude/claude_desktop_config.json):
{
"mcpServers": {
"apple-mail": {
"command": "uvx",
"args": [
"--from",
"git+https://github.com/BastianZim/apple-mail-mcp",
"apple-mail-mcp"
]
}
}
}Restart Claude Desktop after saving.
From source
git clone https://github.com/BastianZim/apple-mail-mcp
cd apple-mail-mcp
uv run apple-mail-mcpRequirements
macOS 10.15+ (Catalina or later)
Python 3.10+
Apple Mail configured with at least one account
Full Disk Access for the process running the server (see below)
macOS permissions
Apple Mail's database lives in ~/Library/Mail/, which macOS protects.
You must grant Full Disk Access to the process that runs the MCP server.
For Claude Desktop using uvx:
Open System Settings → Privacy & Security → Full Disk Access
Click the + button
Add the
uvxbinary (typically at/opt/homebrew/bin/uvx)Restart Claude Desktop
Without this, the server will fail with unable to open database file.
Tip: To find where
uvxlives on your system, runwhich uvxin your terminal.
How it works
Apple Mail stores email metadata in a SQLite database at
~/Library/Mail/V10/MailData/Envelope Index and message bodies in .emlx
files inside .mbox directories.
This server:
Opens the SQLite DB read-only for fast, indexed queries.
Caches the list of
.mbox/Messages/directories at startup (typically 10–50 dirs regardless of email count).Resolves
.emlxfiles by message ID with simplestat()calls — no filesystem search.
search_emails parameters
All filters are AND-combined.
Parameter | Type | Description |
|
| Free-text across sender + subject |
|
| Substring match on address or display name |
|
| Substring match on subject line |
|
| Restrict to a mailbox (from |
|
| Only unread messages |
|
| ISO date, inclusive start ( |
|
| ISO date, inclusive end ( |
|
| Max results, default 20, max 200 |
|
| Pagination offset |
License
MIT
This server cannot be installed
Maintenance
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
Latest Blog Posts
- Your AI Chatbot Just Exposed Your CEO's Salary to an InternBy Om-Shree-0709 on .Agent IdentityMCP SecurityOAuth Delegation
- Why MCP Servers Need Execution Sandboxing (And Why Your Current Stack Isn't Enough)By Om-Shree-0709 on .Agentic AiPrompt InjectionWebAssembly
MCP directory API
We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/BastianZim/apple-mail-mcp'
If you have feedback or need assistance with the MCP directory API, please join our Discord server