Apple Mail

io.github.JonathanRReed由 GitHub 帳號 JonathanRReed 發布v1.1.6更新於 Nov 7, 2026

Read, search, compose, and send emails via Apple Mail on macOS.

已驗證STDIO僅桌面效率與工作流溝通與協作

概覽

AI 產生的概覽

讓助手在 macOS 上透過 Apple Mail 讀取、搜尋、撰寫、寄送、回覆、轉寄、移動與刪除郵件。

可以做什麼
  • 列出信箱,依查詢搜尋郵件或讀取單封郵件,並依主旨檢視整個郵件串
  • 建立草稿、寄送新郵件、回覆(可全部回覆)與轉寄,並可指定寄件帳號
  • 標記已讀或未讀、在信箱間移動、刪除郵件,以及封存整個郵件串
  • 檢查服務狀態與 macOS 自動化權限,並透過 search_tools 和 get_tool_info 尋找工具
適用情境
適合只在 Mac 原生郵件應用程式內處理郵件的情境,權限範圍比整合式 Apple 伺服器更窄,並希望在寄出前先審閱草稿。
執行需求
在 macOS 上以 stdio 本機程序執行,可用 uvx 從 PyPI 安裝或使用 Claude Desktop 套件;原始碼方式需要 Python 3.11 以上。需在 macOS 中授予 Mail 自動化權限。選用設定:APPLE_MAIL_MCP_SAFETY_PROFILE、APPLE_MAIL_MCP_VISIBLE_DRAFTS、APPLE_MAIL_MCP_ALLOWED_ATTACHMENT_ROOT。
安裝前請注意
寄送、回覆、轉寄、移動、刪除與封存都會更動真實郵件。套件安裝預設為 full_access,會直接寄出;safe_manage 會把回覆與轉寄存成未寄出的草稿。寄送逾時會回傳 SEND_STATUS_UNKNOWN,郵件可能已經寄出,重試前先檢查寄件備份。未設定 APPLE_MAIL_MCP_ALLOWED_ATTACHMENT_ROOT 前附件功能關閉,郵件串封存也不具交易性。

安裝

在 SourceWeft 中

  1. 開啟 儀表板中的 Apple Mail,將其新增到工作區。
  2. 為需要使用其工具的對話啟用該服務。

Desktop only,透過 STDIO。 STDIO 服務會啟動本機處理程序,因此需要 SourceWeft 桌面主機。

其他 MCP 客戶端

參照 儲存庫 中的啟動說明。

README

Apple Mail MCP

MCP server for Apple Mail on macOS.

Provides access to mailboxes, message search, reading, and composition. Keep Mail as the system of record while enabling agents to search, read, draft, and send email.

When to use

  • Mail-only workflows
  • Tighter permissions than the all-in-one server
  • Draft and send workflows through the native Mail app

What It Does

  • List mailboxes
  • Search and read messages
  • Create drafts and send messages
  • Reply, forward, mark read/unread, move, and delete
  • Tool discovery helpers search_tools and get_tool_info for context-constrained clients
  • Thread helpers: mail_get_thread, mail_reply_latest_in_thread, mail_archive_thread
  • Mailbox resources and reply-oriented prompts
  • Health and permission checks: mail_health, mail_permission_guide, mail_recheck_permissions

Tools

mail_health, mail_permission_guide, mail_recheck_permissions, mail_list_mailboxes, mail_search_messages, mail_get_message, mail_get_thread, mail_compose_draft, mail_send_message, mail_reply_message, mail_forward_message, mail_mark_message, mail_move_message, mail_delete_message, mail_reply_latest_in_thread, mail_archive_thread, mail_list_prompts, mail_get_prompt, plus the discovery helpers search_tools and get_tool_info.

Install On This Mac

Quick start (uvx, from PyPI)

With uv installed:

bash
uvx apple-mcp-mail

No clone, no venv management.

From a clone
bash
git clone https://github.com/JonathanRReed/Apple-MCPs.gitcd Apple-MCPsuv sync --all-packages

This builds one workspace environment with every server's entry point in .venv/bin (for example .venv/bin/apple-mail-mcp). You can also point an MCP client at AppleMail-MCP/start.sh, which prefers uv run and falls back to a plain venv bootstrap (Python 3.11+ required).

Install In AI Agents

Generic MCP client config
json
{  "mcpServers": {    "apple-mail": {      "command": "uvx",      "args": ["apple-mcp-mail"],      "env": {        "APPLE_MAIL_MCP_SAFETY_PROFILE": "safe_manage",        "APPLE_MAIL_MCP_VISIBLE_DRAFTS": "true"      }    }  }}

Running from a clone instead? Use /path/to/Apple-MCPs/AppleMail-MCP/start.sh as the command with empty args.

Claude Code example
bash
claude mcp add --transport stdio --scope user apple-mail -- uvx apple-mcp-mail

--scope user makes the server available in every project. To share it with one repository through its .mcp.json instead, use --scope project.

Safety Modes

Set the mode with APPLE_MAIL_MCP_SAFETY_PROFILE:

  • safe_readonly, read and search only
  • safe_manage, read, create drafts, reply and forward as drafts, mark, move, delete, and archive threads; this mode sends no mail. Replies and forwards are saved as unsent drafts in Mail for the user to review; switch to full_access to send them directly
  • full_access, full Mail tool surface in this repo, including new-message sending

Deleting or archiving does not require switching from safe_manage to full_access.

Defaults depend on how you installed the server:

InstallDefaultWhy
uvx, pip, or a clonesafe_manageCode default
Claude Desktop bundle (.mcpb)full_accessBundles have always shipped with full_access; keeping it means upgrades don't remove sending

To change it in Claude Desktop, open Settings > Extensions, choose Apple Mail, click Configure, and set "Mail safety mode". In other clients, set APPLE_MAIL_MCP_SAFETY_PROFILE in the server's env block and restart the client. If a tool is blocked, its error names the setting and the value to use. An invalid or blank value selects safe_readonly, and mail_health explains it in safety_mode_warning.

Attachments are off until you set APPLE_MAIL_MCP_ALLOWED_ATTACHMENT_ROOT (bundle setting: "Mail attachment folder") to a dedicated folder.

Transport

stdio is the default and recommended transport. Set APPLE_MAIL_MCP_TRANSPORT=streamable-http (with optional APPLE_MAIL_MCP_HOST and APPLE_MAIL_MCP_PORT) to serve Streamable HTTP instead.

macOS Permissions

  • Automation access to Mail is required

Troubleshooting move/delete errors

Issue #23 reports AppleScript -1728 errors containing item ... of every message/mailbox/account. The move and delete scripts now resolve account/mailbox matches into concrete objects and look up messages by Mail's numeric ID within the original mailbox, instead of retaining positional repeat-loop references. They refuse missing or ambiguous targets and do not automatically retry mutations.

Use message_id exactly as returned by mail_search_messages. If the message has moved or the ID no longer resolves in its original mailbox, search again rather than editing the ID. ACCOUNT_AMBIGUOUS, MAILBOX_AMBIGUOUS, and their TARGET_ counterparts mean the configured names do not uniquely identify the requested object; make the selection unambiguous before retrying. Other native errors, including permission errors, remain visible.

For archiving, call mail_list_mailboxes and pass the actual destination name. Do not assume the account exposes a mailbox literally named Archive, particularly with localized or nested Gmail labels. Keep the intended account explicit when moving between accounts.

A successful mail_health response does not verify a move/delete round trip. Validate a new installation using disposable messages with unique subjects: search, perform one requested operation, and confirm the outcome in Mail. Thread archiving moves messages individually and is not transactional; after an error, inspect Mail before retrying the whole thread.

Restart the MCP client after upgrading. A fix merged on GitHub is not available to uvx installations from PyPI until a package release includes it. A source checkout can be tested through the clone instructions above; use Apple-Tools-MCP/start.sh for the unified server. If an error persists, report the installed version or source commit, macOS version, operation, and redacted error text. Do not post message bodies or private account details.

Launch Checklist

  • Add uvx apple-mcp-mail (or a clone's AppleMail-MCP/start.sh) to your MCP client
  • Reload or reconnect the client so the Mail tool surface is loaded into context
  • Call mail_health first to confirm the server is reachable
  • If Mail automation is blocked, call mail_permission_guide
  • After changing macOS permissions, call mail_recheck_permissions

Prompting Notes

  • Run Contacts before any send or reply when the user identifies a person rather than an email address.
  • tools/list returns the full Mail tool surface. Context-constrained clients can call search_tools first, then get_tool_info for the exact Mail tool they plan to call.
  • mail_search_messages requires a query string. Use a sender, a subject fragment, or * as a wildcard.
  • Pass account (an account name from mail_list_mailboxes) to search one account. Without it, accounts are searched in Mail's order and stop once limit results are collected, so a busy first account can fill the whole result set and hide mailboxes with the same name in other accounts.
  • There is no list-all recent-mail endpoint.
  • Use mail_get_thread when the user means a conversation, not a single message.
  • Use mail_reply_latest_in_thread when the agent should reply to the newest message in the conversation.
  • Use mail_archive_thread when the user wants thread-level cleanup and Archive is the intended mailbox.
  • If the user could mean text or email, ask once before choosing Messages or Mail.
  • When Mail must send from a specific identity, pass the exact sender email in from_account.
  • from_account is applied through Mail's own sender property (Full Name <address>, with the name quoted when it contains a comma or quote), which needs no extra macOS permissions. Only if Mail does not accept it does the server fall back to picking the From pop-up via System Events, which additionally needs Automation consent for System Events and Accessibility for the process running the server.
  • Every AppleScript call is bounded by APPLE_MAIL_MCP_SCRIPT_TIMEOUT_SECONDS (whole seconds, default 120, minimum 5; an invalid or smaller value uses the default) so a pending macOS consent prompt surfaces as an error instead of a hung request. The default leaves room for slow but legitimate searches: a subject/sender search of a 4,900-message Exchange mailbox took about 56 seconds.
  • If mail_send_message, or a sending mail_reply_message, mail_reply_latest_in_thread or mail_forward_message, times out, the result is SEND_STATUS_UNKNOWN, not a failure: Mail may already have sent it. Check the account's Sent mailbox (mail_search_messages with mailbox set to Sent Messages, or the name mail_list_mailboxes shows, such as Sent Items) before retrying, or the message can go out twice.

Related

Attachment access

File attachments are disabled until you set APPLE_MAIL_MCP_ALLOWED_ATTACHMENT_ROOT to a directory you choose, such as ~/Documents/Mail Attachments. This applies to both drafts and sends, including calls through Apple Tools. The server resolves symlinks and accepts only regular files inside that directory. Files outside it, directories, and paths containing the attachment transport separator are rejected. Mail operations without attachments continue to work with the existing safety profile.

來源:AppleMail-MCP/README.md,提交 013b3f6

工具

20

mail_health

Mail Health

Report the active Apple Mail MCP configuration.

無需輸入參數。

mail_permission_guide

Mail Permission Guide

Explain how to grant Apple Mail automation permission on macOS.

無需輸入參數。

mail_recheck_permissions

Mail Recheck Permissions

Recheck Mail access after the user changes macOS permissions, and notify the client that Mail resources changed.

無需輸入參數。

mail_list_mailboxes

List Mailboxes

List Apple Mail mailboxes, optionally filtered by account.

輸入參數account

mail_search_messages

Search Mail

Search Apple Mail messages by query with optional account, mailbox and unread filters. Without account, accounts are searched in Mail's order and the limit can be filled by the first one; pass account (as returned by mail_list_mailboxes) to search a specific account.

輸入參數limitquery必填accountmailboxunread_only

mail_get_message

Get Email

Fetch a single Apple Mail message by message_id.

輸入參數message_id必填

mail_get_thread

Get Thread

Find related messages in the same mailbox thread by normalized subject, anchored on a message_id.

輸入參數limitmessage_id必填

mail_compose_draft

Compose Draft

Create a draft message in Apple Mail without sending it. Optionally specify from_account as an email address or account name to set the sender.

輸入參數ccto必填bccbodysubjectattachmentsfrom_account

mail_send_message

Send Email

Send an email immediately via Apple Mail. Optionally specify from_account as an email address or account name to set the sender.

輸入參數ccto必填bccbodysubjectattachmentsfrom_account

mail_reply_message

Reply to Message

Reply to an existing email message. Provide a message_id and body text. Set reply_all=true to reply to all recipients. Optionally specify from_account. In full_access the reply is sent; in safe_manage it is saved as an unsent draft in Mail for the user to review (check `sent` and `note` in the result).

輸入參數body必填reply_allmessage_id必填from_account

mail_forward_message

Forward Message

Forward an existing email message to new recipients. Provide a message_id and the to list. Optionally prepend body text and specify from_account. In full_access the forward is sent; in safe_manage it is saved as an unsent draft in Mail for the user to review (check `sent` and `note` in the result).

輸入參數to必填bodymessage_id必填from_account

mail_mark_message

Mark Message Read/Unread

Set the read status of an email message. Pass is_read=true to mark as read, is_read=false to mark as unread.

輸入參數is_read必填message_id必填

mail_move_message

Move Message

Move an email message to a different mailbox. Optionally specify target_account if the mailbox is in a different account.

輸入參數message_id必填target_accounttarget_mailbox必填

mail_delete_message

Delete Message

Delete (trash) an email message by its message_id.

輸入參數message_id必填

mail_reply_latest_in_thread

Reply To Latest In Thread

Find the latest related message in the same mailbox thread and reply to that message. In full_access the reply is sent; in safe_manage it is saved as an unsent draft in Mail for the user to review (check `sent` and `note` in the result).

輸入參數body必填limitreply_allmessage_id必填from_account

mail_archive_thread

Archive Thread

Move related messages in the same mailbox thread to the target archive mailbox.

輸入參數limitmessage_id必填archive_accountarchive_mailbox

mail_list_prompts

Mail List Prompts

Fallback prompt discovery tool for tool-only MCP clients.

無需輸入參數。

mail_get_prompt

Mail Get Prompt

Fallback prompt rendering tool for tool-only MCP clients.

輸入參數name必填arguments_json

search_tools

Search Tools

Search this server's tool catalog by keyword, alias, or domain tag.

輸入參數modelimitquery必填domain_tags

get_tool_info

Get Tool Info

Load the full schema, examples, and metadata for one tool from this server.

輸入參數name必填include_schemainclude_examples

版本歷史

8
  1. v1.1.6最新Nov 6, 2026
  2. v1.1.4Oct 29, 2026
  3. v1.1.3Oct 22, 2026
  4. v1.1.2Oct 14, 2026
  5. v1.1.1Oct 13, 2026
  6. v1.1.0Oct 10, 2026
  7. v1.0.5Sep 26, 2026
  8. v1.0.4Sep 16, 2026

評分

已滿足適用檢查項的 90%

該評分衡量此收錄條目的完整程度,依據註冊中心條目、端點與公開來源計算得出。它不是對伺服器本身的評價,也不表示伺服器安全或目前可用:可連通性是帶日期的檢查結果,評分也不包含安裝量或使用者評價。

  • 近 30 天內可連通25 分
  • 已宣告認證方式10 分

    請在註冊中心條目中宣告憑證請求標頭,或保持端點能夠回應探測,以便判定其認證方式。

  • 已列出工具必需15 分
  • 描述必需15 分
  • 圖示10 分
  • 文件15 分
  • 授權條款10 分