Apple Mail MCP Server
Provides AI assistants with full access to Apple Mail, including reading, searching, composing, organizing, and analyzing emails through natural language.
Click on "Install 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 MCP Servershow me my unread emails from today"
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 Server
Star History
An MCP server that gives AI assistants full access to Apple Mail -- read, search, compose, organize, and analyze emails via natural language. Built with FastMCP.
Related MCP server: io.github.p-w-4-z/inbox-mcp
Quick Start
Prerequisites: macOS with Apple Mail configured, Python 3.14+, uv
git clone https://github.com/isityael/apple-mail-mcp.git
cd apple-mail-mcp
uv syncAdd to your Claude Desktop config (~/Library/Application Support/Claude/claude_desktop_config.json):
{
"mcpServers": {
"apple-mail": {
"command": "/path/to/apple-mail-mcp/.venv/bin/python3",
"args": ["/path/to/apple-mail-mcp/apple_mail_mcp.py"]
}
}
}Restart Claude Desktop and grant Mail.app permissions when prompted.
Tip: An
.mcpbbundle is also available on the Releases page for one-click install in Claude Desktop.
Codex Plugin
This repository is also a Codex plugin source. The Codex plugin manifest lives at .codex-plugin/plugin.json, bundles the Email Management skill from skills/, and exposes the Apple Mail MCP server through .mcp.json.
The bundled MCP server is local-only and macOS-specific. It launches start_mcp.sh, which uses the repo-local uv environment and requires Mail.app Automation permissions on the machine running Codex.
Forwarded optional environment variables:
Variable | Purpose |
| Adds user workflow preferences to tool descriptions |
| Hides send-capable tools and blocks draft sending |
Claude Desktop support remains separate: use the .mcpb bundle or explicit MCP config below.
Tools (38)
Reading & Search
Tool | Description |
| Dashboard with unread counts, folders, and recent emails |
| List emails with account/read-status filtering |
| Search emails with full content preview |
| Unread count per account |
| List all configured Mail accounts |
| Recent emails from a specific account |
| Recent emails from a sender with time-range filters |
| Advanced multi-criteria search (subject, sender, dates, attachments, flag color) |
| Find all emails from a specific sender |
| Full-text search in email bodies |
| Cross-account unified search |
| Detect newsletter and subscription emails |
| Conversation thread view |
Organization
Tool | Description |
| Folder hierarchy with message counts |
| Move emails between folders (supports nested paths and exact message IDs) |
| Batch mark read/unread, flag/unflag with optional flag colors |
| Soft delete, permanent delete, empty trash |
| Ask Mail to synchronize one account or all accounts |
Composition
Tool | Description |
| Send new emails (TO, CC, BCC) |
| Reply or reply-all with optional CC/BCC |
| Forward with optional message, CC/BCC |
| Create, list, send, and delete drafts |
Attachments
Tool | Description |
| List attachments with names and sizes |
| Save attachments to disk |
Analytics & Export
Tool | Description |
| Email analytics (volume, top senders, read ratios) |
| Export single emails or mailboxes to TXT/HTML |
| Interactive UI dashboard (requires mcp-ui-server) |
Configuration
User Preferences (Optional)
Set the USER_EMAIL_PREFERENCES environment variable to give the assistant context about your workflow:
{
"mcpServers": {
"apple-mail": {
"command": "/path/to/venv/bin/python3",
"args": ["/path/to/apple_mail_mcp.py"],
"env": {
"USER_EMAIL_PREFERENCES": "Default to BCG account, show max 50 emails, prefer Archive and Projects folders"
}
}
}
}For .mcpb installs, configure this in Claude Desktop under Developer > MCP Servers > Apple Mail MCP.
Read-Only Mode
Use --read-only to disable send-capable tools while keeping inbox, search, organization, and draft-management workflows available. In read-only mode, compose_email, reply_to_email, and forward_email are hidden, and draft sending is blocked.
{
"mcpServers": {
"apple-mail": {
"command": "/path/to/venv/bin/python3",
"args": ["/path/to/apple_mail_mcp.py", "--read-only"]
}
}
}For .mcpb installs, the same behavior is available through the Read-Only Mode package setting.
HTML Compose
compose_email now supports an optional body_html parameter for rich email formatting. If body_html is omitted, the existing plain-text behavior is unchanged.
Releases
Stable releases are tag-driven. When a tag such as v2.1.2 is pushed, Woodpecker now:
builds a version-matched
.mcpbarchivegenerates release notes from commit history
uploads the bundle, checksum, and notes to the GitHub release
updates the Homebrew tap after the GitHub release succeeds
Regular pushes to main still run CI and build verification, but they do not publish a stable GitHub release.
Safety Limits
Batch operations have conservative defaults to prevent accidental bulk actions:
Operation | Default Limit |
| 10 emails |
| 5 emails |
| 1 email |
Override via function parameters when needed.
Usage Examples
Show me an overview of my inbox
Search for emails about "project update" in my Gmail
Reply to the email about "Domain name" with "Thanks for the update!"
Draft an HTML email with a bold heading and a link to the project tracker
Move emails with "invoice" in the subject to my Archive folder
Show me email statistics for the last 30 daysEmail Management Skill
A companion Email Management skill is included at skills/email-management/ for inbox zero, daily triage, folder organization, flag-color workflows, exact message-id moves, and account synchronization. Codex loads it through the plugin manifest. Claude Code users can install it alongside the MCP manually:
cp -r skills/email-management ~/.claude/skills/email-managementSee skills/email-management/SKILL.md for details.
Requirements
macOS with Apple Mail configured
Python 3.14+
fastmcp(+ optionalmcp-ui-serverfor dashboard)Claude Desktop or any MCP-compatible client
Mail.app permissions: Automation + Mail Data Access (grant in System Settings > Privacy & Security > Automation)
Troubleshooting
Issue | Fix |
Mail.app not responding | Ensure Mail.app is running; check Automation permissions in System Settings |
Slow searches | Set |
Mailbox not found | Use exact folder names; nested folders use |
Permission errors | Grant access in System Settings > Privacy & Security > Automation |
Project Structure
apple-mail-mcp/
├── apple_mail_mcp.py # Script entrypoint
├── start_mcp.sh # Bundle/runtime launcher
├── pyproject.toml # Python project metadata
├── uv.lock # Locked dependencies
├── apple_mail_mcp/ # MCP package and tool modules
├── apple-mail-mcpb/ # MCP Bundle build files
├── .codex-plugin/ # Codex plugin manifest
├── .mcp.json # Codex-bundled MCP server config
├── skills/email-management/ # Email Management Expert Skill
├── CHANGELOG.md
├── LICENSE
└── README.mdContributing
Fork the repository
Create a feature branch (
git checkout -b feature/my-feature)Commit and push
Open a Pull Request
License
MIT -- see LICENSE.
Links
Maintenance
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
Latest Blog Posts
- Who's Calling? MCP Hosts Are an Identity Blind Spot (And the Spec Knows It)By Om-Shree-0709 on .mcpAgent IdentityOAuth 2.1
- Your AI Chatbot Just Exposed Your CEO's Salary to an InternBy Om-Shree-0709 on .Agent IdentityMCP SecurityOAuth Delegation
- Why MCP Servers Need Execution Sandboxing (And Why Your Current Stack Isn't Enough)By Om-Shree-0709 on .Agentic AiPrompt InjectionWebAssembly
MCP directory API
We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/isityael/apple-mail-mcp'
If you have feedback or need assistance with the MCP directory API, please join our Discord server