Apple Mail MCP
Integrates with Apple Mail on macOS to list accounts and mailboxes, search and read messages, create drafts and replies, send user-approved emails, and manage read, flag, and move status through local AppleScript automation.
Click on "Deploy Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@Apple Mail MCPcheck my inbox and give me a daily briefing"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
Apple Mail MCP
A local, stdio-based Model Context Protocol server for Apple Mail on macOS.
It talks only to the Apple Mail app already configured on the user's Mac. It does not need IMAP/SMTP passwords or open a network port.
Safety model
Mailbox and message tools are read-only by default.
create_draftopens an unsent, visible draft in Apple Mail.send_emailrequiresuser_approved: true. MCP clients should call it only after the user has approved the exact message.Message changes such as marking, flagging, and moving also require
user_approved: true.Dynamic content is passed to
osascriptas arguments, not interpolated into AppleScript source.Every write action has a local, metadata-only JSONL audit entry. Bodies and credentials are never written to that log.
The approval inbox and relationship context are stored only in the local JSON data store described below.
The MCP server itself is local. However, an MCP client may send tool results to an AI model or another service. Only connect clients and models you trust with mail content.
Related MCP server: Email MCP Server
Requirements
macOS with Apple Mail configured
Node.js 20+
Permission for the host application (for example Codex or Terminal) to control Mail under System Settings → Privacy & Security → Automation
Install
git clone https://github.com/YOUR_ACCOUNT/apple-mail-mcp.git
cd apple-mail-mcp
npm install
npm run buildAdd to an MCP client
Use the compiled server over stdio:
{
"mcpServers": {
"apple-mail": {
"command": "node",
"args": ["/absolute/path/to/apple-mail-mcp/dist/index.js"]
}
}
}Restart the MCP client after saving its configuration. The first call will trigger the normal macOS automation permission prompt.
Optional sender policy
To allow sending only from specific configured Apple Mail addresses, configure a comma-separated allowlist when launching the server:
{
"env": {
"APPLE_MAIL_MCP_ALLOWED_SENDERS": "hello@example.com"
}
}Write-action audit metadata is stored locally at ~/.apple-mail-mcp/audit.jsonl by default. Set APPLE_MAIL_MCP_AUDIT_LOG to use another local path.
AI-first local workspace
The approval inbox and relationship context share a local JSON store at ~/.apple-mail-mcp/data.json by default. It contains queued draft bodies and the contact notes you intentionally save, so treat it as private mail data. Set APPLE_MAIL_MCP_DATA_STORE to use another local path.
APPLE_MAIL_MCP_DRY_RUN=true validates sends but prevents delivery. You can also enforce recipient restrictions with APPLE_MAIL_MCP_ALLOWED_RECIPIENTS, APPLE_MAIL_MCP_ALLOWED_RECIPIENT_DOMAINS, and a local time window such as APPLE_MAIL_MCP_SENDING_WINDOW=09:00-18:00.
Tools
Tool | What it does |
| Lists configured Apple Mail accounts and sender addresses. |
| Lists the top-level mailboxes in an account. |
| Returns inbox or mailbox summaries without message bodies. |
| Searches recent messages by sender or subject. |
| Reads one message body by id, with a configurable length limit. |
| Opens a visible, unsent outgoing message. |
| Hands an approved message to Apple Mail for delivery. |
| Opens a visible reply draft and preserves Apple Mail's reply recipient/subject handling. |
| Marks one approved message read or unread. |
| Flags or unflags one approved message. |
| Moves one approved message to another mailbox. |
| Reads the local metadata-only audit trail. |
| Inspects or validates the active send safeguards without delivery. |
| Stores proposed emails locally for human review. |
| Applies an explicitly approved queue decision. |
| Maintains private relationship notes, tone, commitments, and follow-up dates. |
| Combines a saved contact profile with recent inbox summaries. |
| Surfaces saved contacts that are due for a human-approved follow-up. |
| Switches between focused policies such as inbox zero, sales follow-up, support, and deep work. |
| Saves a user-approved local thread summary with its source message ids. |
| Combines unread messages, pending approvals, and due follow-ups into a safe daily action brief. |
Scope and non-goals
This project is local-only. It is not an SMTP server, does not manage credentials, and does not bypass macOS privacy prompts. It deliberately excludes deletion, attachment export, background scheduling, and automatic sending.
License
MIT
This server cannot be deployed
Maintenance
Related MCP Connectors
Email infrastructure for AI agents — send, receive, search, and reply to email over MCP.
Programmable email inbox for AI agents — JMAP, PoW auth, stdio MCP server.
Read and search FranklyMail email and prepare drafts, replies, and forwards for human approval.
Stateful email for AI agents — read inboxes, reply in-thread, draft with approval.
Related MCP Servers
- FlicenseNot gradedqualityDmaintenanceEnables integration with Apple Mail on macOS using JavaScript for Automation (JXA). Supports reading, searching, sending, and managing emails across multiple accounts with full mailbox hierarchy support.5-
- FlicenseNot gradedqualityBmaintenanceEnables email management for a single mailbox via IMAP and SMTP protocols. Supports reading, searching, and sending emails with threading support through stdio or HTTP transports.-
- AlicenseNot gradedqualityAmaintenanceEnables using Apple Mail accounts to search, read, manage, draft, and send messages from Codex or Claude Code locally.MIT
- AlicenseAqualityCmaintenanceA local MCP server that lets Claude read macOS Mail.app via JXA, with tools for listing accounts/mailboxes, searching and reading messages. Read-only by default, with optional opt-in write tools for compose drafts and Apple Calendar events.7MIT