About Apple Mail MCP
Apple Mail MCP is an MCP server published by patrickfreyer in the Search category: mCP server giving AI assistants full access to Apple Mail - read, search, compose, organize & analyze emails via natural language. Conduid read 28 tools from its source: compose_email, create_mailbox, create_rich_email_draft, export_emails, forward_email, get_awaiting_reply and 22 more. It is published to PyPI as mcp-apple-mail and runs with uvx.
The repository has 274 stars and 63 forks, is licensed MIT, and its last commit was on 25 Nov 2026. The latest release is v3.3.0 (3 Nov 2026): list_email_attachments and save_email_attachment accept message_id (the id search_emails returns) and mailbox, looking the message up directly instead of by subject, so… It follows v3.2.1 (15 Oct 2026), and the 5 most recent releases go back to v3.1.7 (13 Jun 2026). It passes 4 of the 5 static checks Conduid ran on the repository; it does not pass Dependencies pinned. Its topics include apple-mail, applescript, automation, email, fastmcp and macos.
Install
uvx mcp-apple-mailpip install mcp-apple-mailgit clone https://github.com/patrickfreyer/apple-mail-mcpTools (28)
compose_emailSend new emails (plain text or HTML body)| Parameter | Type | Description |
|---|---|---|
| account * | string | Account name to send from (e.g., "Gmail", "Work", "Personal") |
| attachments | string | Optional file paths to attach, comma-separated for multiple (e.g., "/path/to/file1.png,/path/to/file2.pdf") |
| bcc | string | Optional BCC recipients, comma-separated for multiple |
| body * | string | Email body text (used as plain-text fallback when body_html is provided) |
| body_html | string | Optional HTML body for rich formatting (bold, headings, links, colors). When provided, the email is sent as HTML. The plain 'body' field is still required as fallback text. |
| cc | string | Optional CC recipients, comma-separated for multiple |
| from_address | string | Optional sender address to use for this message. Must be one of the account's configured email addresses. When omitted, Mail uses the account's default "Send new messages from" setting. |
| mode | string | Delivery mode — "send" (send immediately, default), "draft" (save to Drafts without opening a window; the result gives the draft's id for manage_drafts), or "open" (open compose window for review before sending). With body_html, "draft" still uses a compose window, because the HTML body is pasted in. |
| subject * | string | Email subject line |
| to * | string | Recipient email address(es), comma-separated for multiple |
create_mailboxCreate new mailboxes (supports nested paths)| Parameter | Type | Description |
|---|---|---|
| account * | string | Account name (e.g., "Gmail", "Work") |
| name * | string | Name for the new mailbox. May contain "/" to create a nested path in one call (each segment is created if needed). |
| parent_mailbox | string | Optional existing parent folder for nesting. |
create_rich_email_draftExport an unsent HTML `.eml` preview; Mail opens it in a read-only viewer. Use `compose_email(mode="draft")` for a sendable draft| Parameter | Type | Description |
|---|---|---|
| account * | string | Account name to use for the sender identity (e.g., "Work", "Oracle") |
| bcc | string | Optional BCC recipients, comma-separated for multiple |
| cc | string | Optional CC recipients, comma-separated for multiple |
| from_address | string | Optional sender address to stamp into the `.eml` `From:` header. Must be one of the account's configured email addresses. When omitted, Mail fills the account's default "Send new messages from" address on open. |
| html_body | string | Optional HTML body. If omitted but text_body is provided, a basic HTML wrapper is generated. |
| open_in_mail | boolean | If True, open the generated `.eml` in Mail (default: True) |
| output_path | string | Optional path for the generated `.eml` file (same protected-location rules as save_email_attachment; defaults to ~/Library/Caches/apple-mail-mcp/rich-drafts) |
| save_as_draft | boolean | Not currently supported. Mail opens a `.eml` as a read-only message viewer, not a compose object, so it can never be saved into Drafts this way. Passing True is reported honestly in the output rather than silently ignored; use `compose_email(mode="draft")` or `manage_drafts` for a real, sendable draft. |
| subject | string | Subject line for the draft (optional; defaults to empty) |
| text_body | string | Optional plain-text body. If omitted but html_body is provided, a fallback plain body is generated. |
| to | string | Optional recipient email address(es), comma-separated for multiple |
export_emailsExport single emails or mailboxes to TXT/HTML| Parameter | Type | Description |
|---|---|---|
| account * | string | Account name (e.g., "Gmail", "Work") |
| format | string | Export format: "txt", "html" (default: "txt") |
| mailbox | string | Mailbox to export from (default: "INBOX") |
| max_emails | integer | Maximum number of emails to export for entire_mailbox (default: 1000, safety cap) |
| save_directory | string | Directory to save exports (default: "~/Desktop"). Protected locations (dot-folders in ~, LaunchAgents, ~/Library/Application Support, ...) are rejected. |
| scope * | string | Export scope: "single_email" (requires subject_keyword) or "entire_mailbox" |
| subject_keyword | string | Keyword to find email (required for single_email) |
forward_emailForward with optional message, CC/BCC; `mode="draft"` saves it without a window, keeping the original attachments| Parameter | Type | Description |
|---|---|---|
| account * | string | Account name (e.g., "Gmail", "Work") |
| bcc | string | Optional BCC recipients, comma-separated for multiple |
| cc | string | Optional CC recipients, comma-separated for multiple |
| from_address | string | Optional sender address to use when forwarding. Must be one of the account's configured email addresses. When omitted, Mail uses the account's default "Send new messages from" setting. |
| mailbox | string | Mailbox to search in (default: "INBOX") |
| message | string | Optional message to add before forwarded content |
| message_id | string | Numeric internal Mail id returned by search_emails; overrides subject_keyword |
| mode | string | "send" (default), "open" (Mail's own forward in a compose window, left for review, not sent), or "draft" (saved to Drafts without opening a window). A draft is rebuilt from the original: its plain-text body under a "Begin forwarded message:" header, with copies of the original attachments. It has no HTML formatting. |
| subject_keyword | string | Keyword to search for in email subjects (ignored with message_id) |
| to * | string | Recipient email address(es), comma-separated for multiple |
get_awaiting_replyFind sent emails that haven't received a reply| Parameter | Type | Description |
|---|---|---|
| account * | string | Account name (e.g., "Gmail", "Work", "Personal") |
| days_back | integer | How many days back to check sent emails (default: 7, 0 = all time) |
| exclude_noreply | boolean | Skip emails sent to noreply/no-reply addresses (default: True) |
| max_results | integer | Maximum results to return (default: 20) |
get_email_sourceRaw RFC 822 source of one message (headers, MIME parts)| Parameter | Type | Description |
|---|---|---|
| account * | string | Account name (e.g., ``"Gmail"``, ``"Work"``). |
| headers_only | boolean | When ``True``, return only the header block. |
| mailbox | string | Mailbox name (default: ``"INBOX"``). Resolved via the shared ``build_mailbox_ref`` helper so non-English / Exchange inboxes (Posteingang, Bandeja de entrada, etc.) are found. |
| max_bytes | integer | Byte cap on the returned payload (default 256 KB). |
| message_id | string | RFC 822 Message-Id for exact match (preferred when known). |
| subject_keyword | string | Substring to match against subject (first hit). |
get_email_threadConversation thread view| Parameter | Type | Description |
|---|---|---|
| account * | string | Account name (e.g., "Gmail", "Work") |
| mailbox | string | Mailbox to search in (default: "INBOX", use "All" for all mailboxes) |
| max_messages | integer | Maximum number of candidate messages to inspect (default: 50). The cap applies before linking: only the first N subject matches that Mail returns are considered, so the thread is seeded from the newest of those N, not necessarily the newest message overall. Raise it for long-running subjects. |
| subject_keyword * | string | Keyword to identify the thread (e.g., "Re: Project Update") |
get_inbox_overviewDashboard with unread counts, folders, and recent emailsget_mailbox_unread_countsUnread counts per mailbox or per-account summary| Parameter | Type | Description |
|---|---|---|
| account | string | Optional account name filter |
| include_zero | boolean | Whether to include mailboxes with zero unread messages |
| summary_only | boolean | If True, return only per-account inbox unread totals (flat dict of account name -> unread count) |
get_needs_responseIdentify emails that likely need your response| Parameter | Type | Description |
|---|---|---|
| account * | string | Account name (e.g., "Gmail", "Work", "Personal") |
| days_back | integer | How many days back to look (default: 7) |
| mailbox | string | Mailbox to scan (default: "INBOX") |
| max_results | integer | Maximum results to return (default: 20) |
get_statisticsEmail analytics (volume, top senders, read ratios)| Parameter | Type | Description |
|---|---|---|
| account * | string | Account name (e.g., "Gmail", "Work") |
| days_back | integer | Number of days to analyze (default: 30, 0 = all time) |
| mailbox | string | Specific mailbox for "mailbox_breakdown" scope |
| scope | string | Analysis scope: "account_overview", "sender_stats", "mailbox_breakdown" |
| sender | string | Specific sender for "sender_stats" scope |
get_top_sendersAnalyse most frequent senders by count or domain| Parameter | Type | Description |
|---|---|---|
| account * | string | Account name (e.g., "Gmail", "Work", "Personal") |
| days_back | integer | How many days back to look (default: 30, 0 = all time) |
| group_by_domain | boolean | Group results by domain instead of individual sender (default: False) |
| mailbox | string | Mailbox to analyse (default: "INBOX") |
| top_n | integer | Number of top senders to return (default: 10) |
inbox_dashboardInteractive UI dashboard (requires mcp-ui-server)list_account_addressesEmail addresses configured for each accountlist_accountsList all configured Mail accountslist_email_attachmentsList attachments with names and sizes| Parameter | Type | Description |
|---|---|---|
| account * | string | Account name (e.g., "Gmail", "Work", "Personal") |
| mailbox | string | Mailbox for id lookup (default: "INBOX"); nested names use "/" |
| max_results | integer | Maximum number of matching emails to check (default: 1) |
| message_id | string | Numeric internal Mail id; overrides subject_keyword |
| subject_keyword | string | Keyword to search for in email subjects |
list_inbox_emailsList emails with account/read-status filtering and optional content preview| Parameter | Type | Description |
|---|---|---|
| account | string | Optional account name to filter (e.g., "Gmail", "Work"). If None, shows all accounts. |
| include_content | boolean | Whether to include a content preview for each email (slower, default: False) |
| include_read | boolean | Whether to include read emails (default: True) |
| max_emails | integer | Maximum number of emails to return per account (0 = all) |
| output_format | string | "text" (default, human-readable) or "json" (structured list of email dicts) |
list_mailboxesFolder hierarchy with message counts| Parameter | Type | Description |
|---|---|---|
| account | string | Optional account name to filter (e.g., "Gmail", "Work"). If None, shows all accounts. |
| include_counts | boolean | Whether to include message counts for each mailbox (default: True) |
manage_draftsCreate, list, open, send, and delete drafts, by subject or draft id| Parameter | Type | Description |
|---|---|---|
| account * | string | Account name (e.g., "Gmail", "Work") |
| action * | string | Action to perform: "list", "create", "send", "open", "delete". Use "open" to open a draft in a visible compose window for review before sending. |
| bcc | string | Optional BCC recipients for create |
| body | string | Email body (required for create) |
| cc | string | Optional CC recipients for create |
| draft_id | string | Numeric Mail id of the draft, as shown by action="list" or returned when a draft is saved. Overrides draft_subject for send/open/delete. |
| draft_subject | string | Subject keyword to find draft (send/open/delete need this or draft_id) |
| from_address | string | Optional sender address for new drafts (action="create"). Must be one of the account's configured email addresses. When omitted, Mail uses the account's default "Send new messages from" setting. |
| subject | string | Email subject (required for create) |
| to | string | Recipient email(s) for create (comma-separated) |
manage_trashSoft delete, permanent delete, empty trash (with dry-run)| Parameter | Type | Description |
|---|---|---|
| account * | string | Account name (e.g., "Gmail", "Work") |
| action * | string | Action to perform: "move_to_trash", "delete_permanent", "empty_trash" |
| apply_to_all | boolean | Must be True to allow operations without subject_keyword or sender filter |
| confirm_empty | boolean | Must be True to execute "empty_trash" action (safety confirmation) |
| dry_run | boolean | If True (default), preview what would be affected without acting |
| mailbox | string | Source mailbox (default: "INBOX", not used for empty_trash or delete_permanent) |
| max_deletes | integer | Maximum number of emails to delete (safety limit, default: 5) |
| message_ids | array | Optional list of exact Mail message ids (move_to_trash only). When set, subject/sender/age filters and apply_to_all are ignored, and the number of ids must not exceed max_deletes. |
| older_than_days | integer | Optional age filter - only affect emails older than N days |
| sender | string | Optional sender to filter emails (not used for empty_trash) |
| subject_keyword | string | Optional keyword to filter emails (not used for empty_trash) |
| subject_keywords | array | Optional list of subject keywords; matches any keyword |
move_emailMove/archive emails with filters (subject, sender, date, read status, dry-run)| Parameter | Type | Description |
|---|---|---|
| account * | string | Account name (e.g., "Gmail", "Work") |
| dry_run | boolean | If True, preview what would be moved without acting (default: False) |
| from_mailbox | string | Source mailbox name (default: "INBOX") |
| max_moves | integer | Maximum number of emails to move (default: 50, safety limit) |
| message_ids | array | Optional list of exact Mail message ids for precise targeting. When set, all other filters are ignored. |
| older_than_days | integer | Optional age filter - only move emails older than N days |
| only_read | boolean | If True, only move emails that have been read (default: False) |
| sender | string | Optional sender to filter emails by |
| subject_keyword | string | Optional keyword to search for in email subjects |
| subject_keywords | array | Optional list of keywords to match in subjects; matches any keyword |
| to_mailbox * | string | Destination mailbox name. For nested mailboxes, use "/" separator (e.g., "Projects/Amplify Impact") |
read_emailRead one message by numeric id — headers, capped plain-text body and attachment metadata (text or JSON)| Parameter | Type | Description |
|---|---|---|
| account * | string | |
| mailbox | string | |
| max_chars | integer | |
| message_id * | string | |
| output_format | string |
reply_to_emailReply or reply-all with optional HTML body| Parameter | Type | Description |
|---|---|---|
| account * | string | Account name (e.g., "Gmail", "Work") |
| attachments | string | Optional file paths to attach, comma-separated for multiple (e.g., "/path/to/file1.png,/path/to/file2.pdf") |
| bcc | string | Optional BCC recipients, comma-separated for multiple |
| body_html | string | Optional HTML body for rich formatting (bold, headings, links, colors). When provided, the reply is pasted as HTML. The plain 'reply_body' field is still required as fallback text. |
| cc | string | Optional CC recipients, comma-separated for multiple |
| from_address | string | Optional sender address to use for this reply. Must be one of the account's configured email addresses. When omitted, Mail uses the account's default "Send new messages from" setting. |
| mailbox | string | Mailbox to look for the message in (default: "INBOX", which also matches localized inbox names). Use "/" for nested folders, e.g. "Projects/2026/Private". |
| mode | string | Delivery mode — "send" (send immediately), "draft" (save silently), or "open" (open compose window for review). Overrides send parameter when set. |
| reply_body * | string | The body text of the reply |
| reply_to_all | boolean | If True, reply to all recipients; if False, reply only to sender (default: False) |
| send | boolean | If True (default), send immediately; if False, save as draft. Ignored if mode is set. |
| subject_keyword * | string | Keyword to search for in email subjects |
save_email_attachmentSave attachments to disk| Parameter | Type | Description |
|---|---|---|
| account * | string | Account name (e.g., "Gmail", "Work", "Personal") |
| attachment_name | string | Name of the attachment to save |
| mailbox | string | Mailbox to search in (default: "INBOX"). Use e.g. "Archive" for an already archived message; nested mailboxes use "/". |
| message_id | string | Numeric internal Mail id returned by search_emails |
| save_path | string | Full path where to save the attachment. Protected locations (shell startup and dotfiles in ~, .git/hooks, LaunchAgents, ~/Library/Application Support, ...) are rejected; see "File Access" in the README for opt-in restriction to specific folders. |
| subject_keyword | string | Keyword to search for in email subjects (ignored with message_id) |
search_emailsUnified search — subject, sender, body text, dates, attachments, flag status/color, cross-account| Parameter | Type | Description |
|---|---|---|
| account | string | Account name to search in (e.g., "Gmail", "Work"). If None, searches ALL accounts (slower). |
| body_text | string | Optional text to search for in email body content (case-insensitive). WARNING: body search is significantly slower as it reads each message body. |
| date_from | string | Optional start date filter (format: "YYYY-MM-DD") |
| date_to | string | Optional end date filter (format: "YYYY-MM-DD") |
| flag_color | string | Optional filter for a specific flag color: "red", "orange", "yellow", "green", "blue", "purple", or "gray". Implies flagged=True. |
| flagged | boolean | Optional filter for flagged emails (True/False/None) |
| has_attachments | boolean | Optional filter for emails with attachments (True/False/None) |
| include_content | boolean | Whether to include email content preview (slower) |
| limit | integer | Maximum number of results to return per page |
| mailbox | string | Mailbox to search (default: "INBOX", use "All" for all mailboxes, or specific folder name) |
| max_body_reads | integer | Only used with body_text. Maximum number of message bodies read per call (default 50, max 500). Cheap filters (sender, subject, dates, read/flag status) are applied first, so this caps only the messages that pass them. If a result comes back with scan_limited=true, either narrow the filters or retry with a higher value; uncached bodies can take up to ~1 s each, so very high values risk the call timing out. |
| max_content_length | integer | Maximum content length in characters when include_content=True (default: 500, 0 = unlimited) |
| max_results | integer | Backward-compatible alias for limit |
| offset | integer | Number of matching results to skip before returning data |
| output_format | string | Output format: "text" or "json" (default: "text") |
| read_status | string | Filter by read status: "all", "read", "unread" (default: "all") |
| sender | string | Optional sender email or name to filter by |
| sort | string | Result sort order: "date_desc" or "date_asc" |
| subject_keyword | string | Optional keyword to search in subject |
| subject_keywords | array | Optional list of subject keywords; matches any keyword |
synchronize_accountAsk Mail.app to check the server for new mail now| Parameter | Type | Description |
|---|---|---|
| account | string | Account name (e.g., "Gmail", "Work"). Omit to sync every configured account. |
update_email_statusMark read/unread, flag/unflag (optional flag color) — by filters or message IDs| Parameter | Type | Description |
|---|---|---|
| account * | string | Account name (e.g., "Gmail", "Work") |
| action * | string | Action to perform: "mark_read", "mark_unread", "flag", "unflag" |
| apply_to_all | boolean | Must be True to allow updates without any filter |
| flag_color | string | Optional flag color for the "flag" action: "red", "orange", "yellow", "green", "blue", "purple", or "gray". Omit to flag without setting a color — Mail shows its default (red), or the message's previous color if one remains from an earlier flag. Re-colors messages that are already flagged. |
| mailbox | string | Mailbox to search in (default: "INBOX") |
| max_updates | integer | Maximum number of emails to update (safety limit, default: 10) |
| message_ids | array | Optional list of exact Mail message ids for precise targeting |
| older_than_days | integer | Optional age filter - only update emails older than N days |
| sender | string | Optional sender to filter emails by |
| subject_keyword | string | Optional keyword to filter emails by subject |
| subject_keywords | array | Optional list of subject keywords; matches any keyword |
Security checks
Static checks derived from the repository yesterday. Heuristics on the source, not an audit.
- ✓README presentThe repository's README runs to about 2.0K words.
- ✓License declaredThe repository declares the MIT license.
- ✓Tests presentA test suite exists in the repository.
- !Dependencies pinnedNo lockfile anywhere in the repository. Installs can pull different code over time.
- ✓No dynamic code executionScanned 20 source files and found no eval, dynamic Function or shell execution.
1 check has not been run yet.
What the source scan found
- Transport
- None found in the source
- Starts other programs
- 5 callsplugin/apple_mail_mcp/core.py:148, plugin/apple_mail_mcp/tools/compose.py:360, plugin/apple_mail_mcp/tools/compose.py:562
- Outbound network calls
- No outbound network calls
- Writes or deletes files
- 7 callsplugin/apple_mail_mcp/core.py:55, plugin/apple_mail_mcp/tools/compose.py:355, plugin/apple_mail_mcp/tools/compose.py:587
- Lockfile
- None in the repository
Pattern matches on the source text of 20 files: places to read, not proof of what the code does at run time.
Releases
README
The repository's README runs to about 2.0K words, fetched yesterday. The original in the repository is authoritative.
Read full README