
Apple Mail Mcp
io.github.parasxos由 GitHub 账号 parasxos 发布v1.8.3更新于 Nov 2, 2026
Fast local Apple Mail MCP: indexed search, full-text bodies, verified sends, triage. macOS.
概览
本地运行的 macOS MCP 服务器,让助手通过 Apple Mail 搜索、阅读、整理、起草和发送邮件,并带有快速的本地正文索引。
- 可以做什么
- 搜索与阅读邮件:全文正文搜索、单封与批量获取、会话线程、邮箱列表、最近邮件、附件、索引刷新
- 发送与定时:发送、带引用的线程回复、草稿、定时发送及列表与取消
- 整理:生成可审阅的归档或删除计划并执行,创建和删除邮箱
- 诊断:提供带修复建议的 doctor 工具和本地操作记录
- 适用场景
- 适合在装有 Mail.app 的 Mac 上使用:希望助手回答关于邮箱的问题、找出 Mail 自带搜索找不到的邮件、在审阅后批量归档大量邮件,或以正确身份撰写和定时发送邮件。
- 运行要求
- macOS 与 Apple Mail,以及本地 stdio MCP 客户端。通过 uvx(或 pipx/Homebrew)运行 Python 工具。需为启动服务器的应用授予完全磁盘访问权限,整理功能还需授予对 Mail 的自动化权限。发送需在本地身份配置文件中设置身份,SMTP 凭据放在钥匙串或 1Password;Exchange 的服务器端草稿与定时发送需额外登录。
安装
在 SourceWeft 中
- 打开 控制台中的 Apple Mail Mcp,将其添加到工作区。
- 为需要使用其工具的对话启用该服务。
Desktop only,通过 STDIO。 STDIO 服务会启动本地进程,因此需要 SourceWeft 桌面宿主。
其他 MCP 客户端
参照 仓库 中的启动说明。
README
✉️ apple-mail-mcp
Your Apple Mail, fully agent-operable.
Runs locally on your Mac. It opens the Mail store read-only, returns only what a client asks for, and sends only when the client explicitly calls the send tool. No third-party relay, no cloud copy of your mail.
Measured on a 300k-message store: addressing one message 0.1 ms via Mail's own
index, against 7 to 10 s for the AppleScript whose-clause; full-text search
p95 under 1 ms. Method and script: docs/benchmarks.md.
Use Claude Code, Claude Desktop, Codex, Cursor, VS Code, or any local MCP client to search, read, triage, and send email through Apple Mail — your mailbox becomes something you can ask, search and delegate to — find anything in seconds, file hundreds of messages through a reviewed plan, send polished mail as the right identity, and let Exchange deliver scheduled messages even while your Mac is asleep.
[demo: uvx install, status, and a Claude search over a 298k-message store]
✨ What you can do
🔍 Ask your mailbox questions. "What did Maria 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, and since 1.8.2 the threading headers, so a scheduled reply lands in the conversation it answers. 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:
Every number above was measured on a live ~300,000-message store; the script and full method are in docs/benchmarks.md.
If the benchmarks hold up on your mailbox, a ⭐ helps others find this.
🛡️ Built to be trusted
- ✅ Plan → review → apply → verify. Bulk actions are frozen into a plan you can read before anything happens; the outcome is confirmed against Mail's own store afterward — never assumed.
- 🗑️ Nothing is ever erased. "Delete" files into Mail's Trash, and destructive plans have their own separate, capped door.
- 👓 Read-only mail mode. Set
EMAIL_MCP_READ_ONLY=1and only the 11 non-mutating mail tools exist in the session. Search may still maintain its local body index, and attachment retrieval writes the requested file to the configured temporary directory. - 💾 A crash-safe scheduled queue. Manifest updates are flushed and atomically replaced, so an interrupted rewrite keeps the last valid record. If a file is damaged independently, diagnostics name it instead of claiming the queue is empty, while healthy scheduled messages keep moving.
- 🧾 A local, best-effort activity ledger. Sends, schedules, cancellations and triage runs are recorded without making an unwritable log block mail. For reconciliation, the message itself, its Message-ID and its scheduled record remain authoritative.
- 🔒 No third-party mail relay. Mail content stays local except for mail
you send and optional access to your own provider for Exchange/IMAP body
backfill, drafts and server-side scheduling. SMTP passwords stay in the
macOS Keychain or 1Password; Microsoft OAuth tokens live in a private 0600
cache under
~/.email-mcp/graph/. - 📜 A written contract. Since v1.0 every tool's shapes, error codes and caps evolve additively, held in place by 800+ automated tests.
- 🤝 Clear to every MCP client. All 21 tools identify what they do, explain every input, and declare whether they read, change or can remove data. Newer clients receive structured results; older clients keep the same JSON text. MCP SDK 2.2 and newer 2.x releases are tested, with support for older clients.
- 🧱 Built to evolve without breaking your workflow. Email rules are isolated from MCP, Mail.app, Exchange, delivery, and local storage. Provider or SDK changes stay at the edge while the 21-tool contract remains stable. The dependency rules are enforced in CI and explained in the architecture guide.
- 📦 Releases you can verify. Every tagged release is built and installed in a clean environment before publishing. GitHub includes the wheel, source archive, SHA-256 checksums and signed build provenance—not just source code.
- 🩺 Self-diagnosing.
apple-mail-mcp statusgives one readable readiness, scheduling and recovery screen.apple-mail-mcp doctorprovides the complete diagnostic detail and an exact fix for anything red.
🚀 Quick start
-
Grant Full Disk Access to your terminal app (System Settings → Privacy & Security → Full Disk Access), then quit and reopen the terminal. This is Apple's one manual toggle — there is no pop-up for it.
-
Install and set up:
-
Register with your client — one line for Claude Code:
or the same JSON block for Claude Desktop / Cursor / VS Code (
claude_desktop_config.json/.cursor/mcp.json/.vscode/mcp.json): -
Verify:
uvx apple-mailbox-mcp statusprints one readiness screen — or just ask your client to run thedoctortool; every red line comes with its exact fix.uvx apple-mailbox-mcp --versionprints the installed version (apple-mailbox-mcp,apple-mail-mcpandemail-mcpare three names for the same command). The first body-index build on a large mailbox runs in the background and can take a few minutes; search works immediately and completes as the index fills.
Before running setup, grant your terminal app Full Disk Access
(System Settings → Privacy & Security → Full Disk Access) — that is how
reading stays fast and local. There is no pop-up for this one; it is Apple's
one manual toggle, and setup walks you to the exact pane if it finds it
missing.
setup asks everything in plain words (bare Enter accepts the recommended
answer), offers a sending identity, builds the body-search index, verifies
the nightly refresh actually runs, and ends by printing the one block you
paste into your MCP client:
Setup ends with a clear ready verdict or numbered recovery steps. Grant
Automation → Mail when triage first asks for it. Check the installation,
the next scheduled message, and failed scheduled sends anytime with
apple-mail-mcp status; use apple-mail-mcp doctor for the full technical detail.
💡 New to the terminal? Three things that look wrong and aren't:
brew install pipxwants a typedy(Enter alone is rejected);pipx ensurepathmay print a ⚠️ — the "pipx is ready to go!" line after it is the verdict; and afterensurepath, close and reopen the terminal once soapple-mail-mcpis found.
🔌 Works with
Every client below speaks stdio MCP; the command is always uvx apple-mailbox-mcp.
Claude Code
Claude Desktop
Add to ~/Library/Application Support/Claude/claude_desktop_config.json:
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
Any stdio MCP client
Point it at uvx apple-mailbox-mcp. The wire contract is additive-only since v1.0.
🔧 Troubleshooting
🧰 The 21 tools
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:
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.
21 tools · over 1,200 tests · additive wire contract since v1.0 Live-calibrated end-to-end on a 305k-message store.
Built for one Mac — and for anyone else whose Mac runs Mail.app.
来源:README.md,提交 70dfd70
工具
0版本历史
3- v1.8.3最新Oct 18, 2026
- v1.8.0Sep 28, 2026
- v1.7.0Sep 16, 2026
评分
已满足适用检查项的 50%
该评分衡量此收录条目的完整程度,依据注册中心条目、端点与公开来源计算得出。它不是对服务器本身的评价,也不表示服务器安全或当前可用:可连通性是带日期的检查结果,评分也不包含安装量或用户评价。
- 近 30 天内可连通25 分
请保持端点能够响应 MCP 握手;SourceWeft 每 30 天探测一次。
- 已声明认证方式10 分
请在注册中心条目中声明凭据请求头,或保持端点能够响应探测,以便判定其认证方式。
- 已列出工具15 分
请让服务器在无凭据时响应 tools/list,或发布可在沙箱中无凭据启动的软件包。
- 描述必需15 分
- 图标10 分
- 文档15 分
- 许可证10 分