Apple Mail MCP logo

Apple Mail MCP

by imdinu

Search, read, filter, and extract Apple Mail messages through MCP using a local FTS5 index.

Install Apple Mail MCP

Pick your client, then add it in one click or paste the config.

STDIOPython
~/Library/Application Support/Claude/claude_desktop_config.json
claude_desktop_config.json
{
  "mcpServers": {
    "imdinu-apple-mail-mcp": {
      "command": "uvx",
      "args": [
        "apple-mail-mcp"
      ]
    }
  }
}

Settings → Developer → Edit Config, merge this into mcpServers, then fully quit and reopen Claude Desktop.

Claude Code command
claude mcp add --transport stdio imdinu-apple-mail-mcp -- uvx apple-mail-mcp

Run in your terminal. Add --scope project to share it with your team through .mcp.json.

We couldn’t confirm it starts correctly

We hit an unexpected error while testing this listing automatically.

uvx apple-mail-mcp

Rate limit exceeded, please try again later - you have reached the maximum number of concurrent E2B sandboxes (20). If you need more, please visit 'https://e2b.dev/docs/billing'

This is an experimental automated check and can have false negatives — missing environment variables, a slow cold install, etc. It doesn’t necessarily mean something’s wrong. Last checked .

Overview

imdinu/apple-mail-mcp connects MCP clients to Apple Mail on macOS for listing accounts and mailboxes, reading messages, searching content, and extracting links or attachments. It combines direct Apple Mail data access with an FTS5 search index for full-mailbox queries, while JXA provides a correctness fallback for some operations. Use it when an agent needs structured access to Apple Mail, especially body search across large mailboxes. Claude Code and Claude Desktop have dedicated installation paths, and other MCP clients can launch the stdio command.

Use cases

  • Search Apple Mail across all accounts and mailboxes
  • List unread or flagged messages from a mailbox
  • Read a message and inspect its full content
  • Extract links or save attachments from an email

Key features

  • FTS5 full-text search across indexed mailboxes
  • Apple Mail account and mailbox discovery
  • Message filters for unread, flagged, and date-based queries
  • Email link extraction with URL filtering and deduplication
  • Raw MIME attachment extraction to disk
  • Standalone JSON-output CLI commands

Tools8

What Apple Mail MCP lets your agent do. Expand a tool for its parameters.

Verified live~1.6k tokens of context

Security & health

What it can reach and how reliably it runs — from our own checks, not the maintainer’s claims.

ActiveLast checked

Recent health check succeeded.

34/34 checks healthy over the last 118d

What it can do

From the 8 tools this server returned when we ran it.

Read-only tools · 8
Network at startup2 connections
Files written at startup18

Observed 2026-10-24 in an isolated sandbox. A description of reach, not a security audit.

Supply-chain signal

No high-severity advisories surfaced by our automated scan.

Critical 0High 0Medium 0Low 0

Scanned 16d ago via OSV.dev · apple-mail-mcp (PyPI)

Adoption & maintenance

Factual signals from GitHub, npm, and our automated checks — not a rating.

GitHub stars78Stargazers on the source repository.
Last commit4d agoMost recent push to the default branch.
Install checkInconclusiveWe hit an unexpected error running the automated check.
Tools exposed8Callable tools this server registers over MCP.

How Apple Mail MCP works

What imdinu/apple-mail-mcp does

imdinu/apple-mail-mcp exposes Apple Mail data through the Model Context Protocol on macOS. It supports account and mailbox discovery, message listing, individual message retrieval, full-text search, hyperlink extraction, and attachment extraction. The server also provides equivalent standalone CLI commands, so the package can be used without an MCP client.

Search covers the indexed mailbox rather than only the newest messages. Queries can target all searchable content or narrower scopes such as subject, sender, body, or attachments. Results can also be constrained by dates, and the search syntax supports quoted phrases, prefix matching, and terms that are combined with AND semantics.

How it works

The server uses an FTS5 index for email search and reads Apple Mail's local data directly for several operations. Individual messages use disk-first .emlx reads, while account, mailbox, and listing operations use direct Envelope-Index SQLite access with JXA available as a fallback. The index is intended to cover the full mailbox and can be refreshed by running the server with --watch.

get_email accepts a message ID and can search across accounts. Account and mailbox hints are optional; supplying them can make lookup faster. Link and attachment extraction depend on the search index. Attachments are parsed from the raw MIME structure and written to ~/.apple-mail-mcp/attachments/.

Setup and configuration

The package requires macOS and Python 3.11 or newer. Install it for general MCP use with:

bash
pipx install apple-mail-mcp

Then register the stdio command in an MCP client:

config.json
{
  "mcpServers": {
    "mail": {
      "command": "apple-mail-mcp"
    }
  }
}

Claude Code can install it as a plugin, while Claude Desktop can use the downloadable MCP bundle from the project's latest release. Both launch paths support --watch. The launching application needs Full Disk Access so the index can remain current; Terminal needs that permission when building the index manually.

Create the optional configuration template with apple-mail-mcp init. Settings can be stored in ~/.apple-mail-mcp/config.toml or supplied through matching APPLE_MAIL_* environment variables. Configuration supports defaults such as a primary account or mailbox, with command-line, environment, file, and default values applied by precedence.

Build the recommended index with:

bash
apple-mail-mcp index --verbose

Tools and capabilities

  • list_accounts: returns configured Apple Mail accounts.
  • list_mailboxes: lists mailboxes for an account.
  • get_emails: lists messages from one mailbox with filters such as unread, flagged, today, or the last seven days.
  • get_email: retrieves one message with its full content and attachments.
  • search: searches indexed messages across accounts and mailboxes, with scope and date filters.
  • get_email_links: extracts deduplicated non-mailto and non-javascript hyperlinks with anchor text.
  • get_email_attachment: saves a named attachment to the local attachment directory.
  • get_attachment: legacy extraction entry point; use the link or attachment-specific tools instead.

Limitations and notes

This server is tied to Apple Mail and macOS. Cross-mailbox searching requires the index, as do link and attachment extraction. get_emails operates on one mailbox at a time; use search for a query spanning accounts and mailboxes. Attachment extraction writes files to the local filesystem, and the older get_attachment tool is deprecated.

Written by AllMCPs with AI assistance from the project’s README and listing data. How we build listings

Reviews

No reviews yet — be the first to share how it worked for you.

Frequently Asked Questions about Apple Mail MCP

imdinu/apple-mail-mcp is an MCP server that connects AI clients to Apple Mail on macOS. Its main tools list accounts and mailboxes, retrieve and filter messages, search indexed email across mailboxes, extract links, and save attachments. It uses an FTS5 index for fast full-text queries.

Install it with `pipx install apple-mail-mcp`, then configure your MCP client to launch the `apple-mail-mcp` command. Claude Code also has a plugin installation path, and Claude Desktop can use the downloadable MCP bundle from the project's latest release.

Yes, imdinu/apple-mail-mcp works with Claude Desktop through its downloadable MCP bundle. The bundle launches the released package, and the launching application needs Full Disk Access so the search index can stay fresh.

Use the `search` tool after building the index with `apple-mail-mcp index --verbose`. It searches across accounts and mailboxes by default and supports scopes, date filters, quoted phrases, prefix matching, and terms combined with AND semantics.

Use `get_email_attachment` with the message ID and filename. The tool parses the email's raw MIME structure and saves the file under `~/.apple-mail-mcp/attachments/`; attachment extraction requires the search index.

Related MCP servers

Add a badge to your READMEShow it’s listed — live SVG, Markdown or HTML.

AllMCPs Directory Badge

Full Badge Customizer

Showcase your server listing on GitHub or your project documentation. Embed this dynamic SVG badge to highlight official listing status and live engagement.

Badge Style:
Live Dynamic SVG PreviewApple Mail MCP AllMCPs Directory Badge
Markdown (GitHub README)
[![AllMCPs](https://allmcps.com/api/badge/imdinu-apple-mail-mcp?style=directory)](https://allmcps.com/mcp/imdinu-apple-mail-mcp)
HTML Embed
<a href="https://allmcps.com/mcp/imdinu-apple-mail-mcp"><img src="https://allmcps.com/api/badge/imdinu-apple-mail-mcp?style=directory" alt="Apple Mail MCP on AllMCPs" /></a>