Apple Mail MCP

v0.5.2
io.github.imdinu/apple-mail-mcp Checked 10 hours ago Published 1 day ago

Apple 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.

ParameterTypeDescription
accountAccount 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.

ParameterTypeDescription
accountAccount name. Uses APPLE_MAIL_DEFAULT_ACCOUNT env var or first account if not specified.
filterstringFilter 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_…
limitintegerMaximum number of emails to return (default: 50)
mailboxMailbox 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.

ParameterTypeDescription
message_id *integerThe email's unique ID (from search results)
accountOptional hint (speeds up lookup, not required)
mailboxOptional hint (speeds up lookup, not required)

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.

ParameterTypeDescription
filename *stringAttachment filename to extract
message_id *integerThe email's unique ID
accountAccount name (optional, speeds up lookup)
mailboxMailbox 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).

ParameterTypeDescription
message_id *integerThe email's unique ID
accountAccount name (optional)
filenameAttachment filename to extract. If omitted, returns links instead.
mailboxMailbox name (optional)