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).
Search every message in Apple Mail — bodies included, not just recent ones — and pull back a thread, its links or an attachment.
LABSCO SUMMARY
On a large mail store the useful question is usually "find the message where someone mentioned X", and that only works if the index covers everything — which is why the setup step that matters is granting Full Disk Access and building the index, not the install itself. Everything here reads: there is no send, no reply and no filing, so it fits research and retrieval rather than inbox management.
A read-only reader for Apple Mail on macOS. It builds an FTS5 full-text index over the local mail store and reads .emlx files and the Envelope Index directly, with AppleScript kept as a fallback rather than the main path.
macOS with Apple Mail, and Python 3.11 or higher — installed with pipx install apple-mail-mcp and run as apple-mail-mcp. The search index is what makes body search and link extraction work: build it with apple-mail-mcp index, which needs Full Disk Access granted to Terminal under System Settings → Privacy & Security. Nothing leaves the machine and no account credentials are involved — it reads the local mail store. GPL v3.
Follow the published steps — pipx install apple-mail-mcp
USE CASES
Search bodies across every account with a couple of specific keywords, narrowed by date if you know roughly when.
Find the message, then extract the file by name — it parses the raw MIME, so inline images and signed parts come out too.
Extract the hyperlinks with their anchor text, with tracking URLs and mailto: links already filtered out.
List that mailbox filtered to unread, flagged, or the last seven days, and open the ones that matter in full.
Search everywhere at once — work and personal — excluding the mailboxes that would only add noise.
Counted once with only startup setup. Other versions, modes or optional credentials may expose a different list.
get_attachmentDEPRECATED: 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).
get_emailGet 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.
get_email_attachmentExtract 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.
get_email_linksExtract 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.
get_emailsGet 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.
list_accountsList 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_mailboxesList all mailboxes for an email account.
searchSearch 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:
BEFORE YOU INSTALL
8 tools when we connected. get_attachment is deprecated; use get_email_attachment. Filter values such as unread, today or last_7_days are arguments to get_emails and search, not tools.
All 4 documented setups run the server on your machine.
CONTEXT COST
Rated by the size of the 8 tool definitions that ride along on every turn, not by how many there are
INSTALLATION
pipx install apple-mail-mcpGrant Terminal Full Disk Access: System Settings → Privacy & Security → Full Disk Access → add Terminal
apple-mail-mcp index --verbose{
"mcpServers": {
"mail": {
"command": "apple-mail-mcp"
}
}
}{
"mcpServers": {
"mail": {
"command": "apple-mail-mcp",
"env": {
"APPLE_MAIL_DEFAULT_ACCOUNT": "Work"
}
}
}
}{
"mcpServers": {
"mail": {
"command": "apple-mail-mcp",
"args": [
"--watch"
],
"env": {
"APPLE_MAIL_DEFAULT_ACCOUNT": "Work"
}
}
}
}{
"mcpServers": {
"mail": {
"command": "apple-mail-mcp",
"env": {
"APPLE_MAIL_DEFAULT_ACCOUNT": "Work",
"APPLE_MAIL_DEFAULT_MAILBOX": "INBOX"
}
}
}
}