Apple Mail MCP
v0.5.2Apple Mail MCP server with full-coverage FTS5 body search, reliable on large mailboxes.
These tools were reported by the server itself during our smoke test (tools/list), not copied from the README.
list_accounts
List all configured email accounts in Apple Mail. Returns: List of account dictionaries with 'name' and 'id' fields. Example: >>> list_accounts() [{"name": "Work", "id": "abc123"}, {"name": "Personal", "id": "def456"}]
list_mailboxes
List all mailboxes for an email account.
| Parameter | Type | Description |
|---|---|---|
account | Account name. Uses APPLE_MAIL_DEFAULT_ACCOUNT env var or first account if not specified. |
get_emails
Get emails from a specific mailbox with optional filtering. Note: This tool lists emails from a single mailbox. To search across all mailboxes, use the search() tool instead.
| Parameter | Type | Description |
|---|---|---|
account | Account name. Uses APPLE_MAIL_DEFAULT_ACCOUNT env var or first account if not specified. | |
filter | string | Filter type: - "all": All emails (default) - "unread": Only unread emails - "flagged": Only flagged emails - "today": Emails received today - "last_7_days": Emails received in the last 7 days - "this_… |
limit | integer | Maximum number of emails to return (default: 50) |
mailbox | Mailbox name. Uses APPLE_MAIL_DEFAULT_MAILBOX env var or "Inbox" if not specified. |
get_email
Get a single email with full content. Looks up the email across all accounts using a cascade strategy. Just pass the message_id — account/mailbox are optional hints that speed up lookup but are not required.
| Parameter | Type | Description |
|---|---|---|
message_id * | integer | The email's unique ID (from search results) |
account | Optional hint (speeds up lookup, not required) | |
mailbox | Optional hint (speeds up lookup, not required) |
get_email_links
Extract hyperlinks from an email's HTML content. Filters out mailto:, javascript:, and long tracking URLs. Returns deduplicated links with their anchor text. Requires the search index.
| Parameter | Type | Description |
|---|---|---|
message_id * | integer | The email's unique ID |
account | Account name (optional, speeds up lookup) | |
mailbox | Mailbox name (optional, speeds up lookup) |
get_email_attachment
Extract a file attachment from an email and save to disk. Saves the attachment under ~/.apple-mail-mcp/attachments/. Parses the raw MIME structure, so it works for all attachment types including inline images and S/MIME signatures. Requires the search index.
| Parameter | Type | Description |
|---|---|---|
filename * | string | Attachment filename to extract |
message_id * | integer | The email's unique ID |
account | Account name (optional, speeds up lookup) | |
mailbox | Mailbox name (optional, speeds up lookup) |
get_attachment
DEPRECATED: Use get_email_attachment() or get_email_links(). Extract resources from an email: attachments or links. Delegates to get_email_links (filename omitted) or get_email_attachment (filename provided).
| Parameter | Type | Description |
|---|---|---|
message_id * | integer | The email's unique ID |
account | Account name (optional) | |
filename | Attachment filename to extract. If omitted, returns links instead. | |
mailbox | Mailbox name (optional) |
search
Search emails across all accounts and mailboxes. Uses full-text search index for fast results (~2ms). All scopes search across every account and mailbox unless filtered. Query tips: - Use 2-3 specific keywords, not full sentences - Terms are AND-ed: "budget Q1" finds emails with BOTH words - Use quotes for exact phrases: '"quarterly report"' - Prefix search: "meet*" matches meeting, meetings, etc. - The default scope "all" searches subject + sender + body together
| Parameter | Type | Description |
|---|---|---|
query * | string | Search keywords (2-3 specific terms work best). Do NOT use long natural-language phrases. |
account | Filter to specific account name (optional). | |
after | Include only emails on/after this date (YYYY-MM-DD). | |
before | Exclude emails on/after this date (YYYY-MM-DD). | |
exclude_mailboxes | Mailboxes to exclude (default: ["Drafts"]) | |
highlight | boolean | Wrap matched terms in **markers** in subject and content_snippet (default: False). |
limit | integer | Maximum results (default: 20) |
mailbox | Filter to specific mailbox (optional). | |
offset | integer | Skip first N results for pagination (default: 0) |
scope | string | Where to search: - "all": Subject + sender + body (default, recommended) - "subject": Subject line only - "sender": Sender name/email only - "body": Body text only - "attachments": Attachment filename… |