apple-mail-mcp
MCP server for Apple Mail: sub-ms search over 300k+ messages via Mail's own SQLite index, verified sends, Exchange body backfill, triage plan/review/apply. 849 tests, MIT.
Documentation

✨ What you can do
🔍 Ask your mailbox questions. *"What did Stefan send me about the memo
last week?"* Search runs at database speed — sender, mailbox, dates, unread,
attachments — and reconstructs whole conversations.
🕳️ Find what Mail itself can't. Mail's built-in search only skims the
first line of most messages. apple-mail-mcp indexes every message body on your
Mac — and for Exchange accounts it even fetches the bodies Mail never
downloaded, straight from your own mailbox on the server. Queries that
returned nothing return twenty.
🎭 Send as the right you. Work mail through the work lane, personal
through Gmail — one parameter picks the identity. Every message is composed
from scratch as clean, standards-correct email that renders everywhere,
*including Outlook* (the AppleScript compose path that arrives blank in
Outlook is the reason this project exists).
⏰ Schedule like "Send Later", but scriptable. A scheduled message is
frozen in full — attachments, identity, exact text. Exchange can execute it
server-side at the requested time, lid closed; other providers use a local
background sender and deliver on its next pass (or just after the Mac wakes).
🗂️ Triage at scale, without fear. *"File these 40 newsletters"* becomes a
reviewable plan: nothing moves until it is approved, every message is
re-checked before it is touched, and the result is verified against Mail's
own records afterward. Delete means Mail's Trash — nothing is ever erased.
📝 Draft where your drafts live. Compose into your real Exchange Drafts
folder, ready to open in Outlook or OWA — created, never auto-sent.
⚡ Why it's different
Every other Apple-Mail MCP drives AppleScript for both finding and acting.
This one doesn't — and it shows:
| Operation | AppleScript whose-clause | apple-mailbox-mcp |
|---|---|---|
| 🔍 Search 300k messages | seconds-to-timeout | milliseconds |
| 🎯 Address one message in a 71k mailbox | 7–10 s (measured) | ** 💡 *New to the terminal?* Three things that look wrong and aren't: |
> `brew install pipx` wants a typed `y` (Enter alone is rejected);
> `pipx ensurepath` may print a ⚠️ — the "pipx is ready to go!" line after it
> is the verdict; and after `ensurepath`, close and reopen the terminal once
> so `apple-mail-mcp` is found.
🔌 Works with
Every client below speaks stdio MCP; the command is always `uvx apple-mailbox-mcp`.
Claude Code
claude mcp add --transport stdio --scope user apple-mail -- uvx apple-mailbox-mcpClaude Desktop
Add to `~/Library/Application Support/Claude/claude_desktop_config.json`:
{ "mcpServers": { "apple-mail": { "command": "uvx", "args": ["apple-mailbox-mcp"] } } }Cursor
Add the same block to `~/.cursor/mcp.json` (or per-project `.cursor/mcp.json`).
VS Code (Copilot MCP)
Add the same block under `"servers"` in `.vscode/mcp.json`.
Codex CLI
# ~/.codex/config.toml
[mcp_servers.apple-mail]
command = "uvx"
args = ["apple-mailbox-mcp"]Any stdio MCP client
Point it at `uvx apple-mailbox-mcp`. The wire contract is additive-only since v1.0.
🔧 Troubleshooting
| Symptom | Fix |
|---|---|
| Client says the server failed to start, but `uvx apple-mailbox-mcp` works in your terminal | GUI apps don't inherit your shell PATH. Use the absolute path: `"command": "/opt/homebrew/bin/uvx"` (find yours with `which uvx`). |
| `database is locked` or empty results | Full Disk Access is missing for the app that *launches* the server (the client, not the terminal). Grant it, then fully quit and reopen that app. |
| Search finds recent mail but not bodies of old mail | The body index is still building — first build on a 100k+ mailbox takes minutes. `status` shows progress. |
| Send fails with `transport_unavailable` | Run `doctor`: it names the failing lane (Keychain item missing, SSH socket cold, SMTP host unreachable) and prints the exact fix. |
| Triage does nothing the first time | Grant Automation → Mail when macOS asks; the prompt appears on first use, not at install. |
🧰 The 21 tools
| Group | Tools |
|---|---|
| 🔍 Read (8) | `search_emails` (full-body search) · `get_email` · `get_emails_batch` · `get_thread` · `list_mailboxes` · `list_recent` · `get_attachment` · `refresh_mail` |
| ✉️ Send (6) | `send_email` · `reply_email` (threaded, quoted) · `create_draft` · `schedule_email` · `list_scheduled` · `cancel_scheduled` |
| 🗂️ Triage (5) | `triage_plan` · `triage_plan_delete` · `triage_apply` · `mailbox_create` · `mailbox_delete` |
| 🩺 Meta (2) | `doctor` (full diagnostics with fix-it strings) · `audit` (the local ledger) |
Attachments both ways, size-budgeted. Replies thread correctly in every
client. Scheduling survives sleep — a message due while the lid was closed
goes out on the first tick after wake, or exactly on time via Exchange.
🎭 Your addresses, your lanes
The From: address decides how mail travels. `~/.email-mcp/identities.toml`:
default = "work"
[work] # sent through a host you already trust, over SSH
from_addr = "you@example.org"
driver = "ssh_sendmail"
host = "bastion.example.org" # any login host you already SSH to
[gmail] # classic SMTP — the app password stays in 1Password
from_addr = "you@gmail.com"
driver = "smtp"
host = "smtp.gmail.com"
op = "op://Personal/gmail app password/password"Exchange identities can add one sign-in to unlock the extras: drafts filed in
your real Drafts folder, and scheduled sends executed by the server itself —
lid closed, Mac asleep. `setup` offers it in one plain question. Reading
needs no sending configuration at all.
Frequently asked questions
What is apple-mail-mcp?
apple-mail-mcp is MCP server for Apple Mail: sub-ms search over 300k+ messages via Mail's own SQLite index, verified sends, Exchange body backfill, triage plan/review/apply. 849 tests, MIT.
How do I install apple-mail-mcp?
Open the GitHub repository and follow its README. Most MCP servers are added to your client's MCP config, then called by your agent.
Is apple-mail-mcp open source?
Yes — it is hosted on GitHub at https://github.com/parasxos/apple-mail-mcp and has 9 stars.
Related MCP tools
Open-source coding agent memory. Records issues, attempts, fixes and decisions, then warns your agent before it repeats an approach that already failed. Native MCP server for Claude Code, Cursor, Antigravity and Codex. 100% local, no cloud, no telemetry. MIT.
Cut AI token costs 95%+ on code exploration. The leading MCP server for precise, symbol-level GitHub code retrieval via tree-sitter AST. Works with Claude Code, Cursor & any MCP client. 313B+ tokens saved.
AI Skills, MCP Tools, and CLI for Unity Engine. Full AI develop and test loop. Use cli for quick setup. Efficient token usage, advanced tools. Any C# method may be turned into a tool by a single line. Works with Claude Code, Gemini, Copilot, Cursor and any other absolutely for free.
Control Gmail, Google Calendar, Docs, Sheets, Slides, Chat, Forms, Tasks, Search & Drive with AI - Comprehensive Google Workspace MCP Server & CLI Tool
AI-powered OSINT agent with interactive REPL, MCP server, and CLI. 19 tools. Works with Claude, GPT-4, or local models. For authorized security research only.
Give your AI agents persistent, collective memory — with deduplicating absorb, supersession lineage, semantic search, and a graph UI. Speaks MCP.
Run your own MCP server? See who uses it and what to fix.
Measure it with TrackMCP