home / mcp / apple mail mcp server
MCP server giving AI assistants full access to Apple Mail - read, search, compose, organize & analyze emails via natural language
Configuration
View docs{
"mcpServers": {
"patrickfreyer-apple-mail-mcp": {
"command": "/path/to/apple-mail-mcp/venv/bin/python3",
"args": [
"/path/to/apple-mail-mcp/apple_mail_mcp.py"
],
"env": {
"USER_EMAIL_PREFERENCES": "Default to BCG account, show max 50 emails, prefer Archive and Projects folders"
}
}
}
}You can run an MCP server that gives AI assistants full access to Apple Mail, enabling reading, searching, composing, organizing, and analyzing emails through natural language. This practical server is built to work with FastMCP and integrates with Claude Desktop for streamlined interactions with your Mail.app workflow.
To use this MCP server, run it as a local process and connect your MCP client (such as Claude Desktop) to the provided command and arguments. You can perform tasks like listing inbox emails, searching across accounts, composing messages, moving emails between folders, and retrieving analytics and export options. Follow the installation steps to start the server, then configure your MCP client to point to the local Python process that runs the Apple Mail MCP script.
# Quick Start
# Prerequisites: macOS with Apple Mail configured, Python 3.7+
# 1) Clone the repository
git clone https://github.com/patrickfreyer/apple-mail-mcp.git
cd apple-mail-mcp
# 2) Create and activate a virtual environment
python3 -m venv venv && source venv/bin/activate
# 3) Install dependencies
pip install -r requirements.txt
# Optional: build a bundle for Claude Desktop if desired
# An .mcpb bundle is available on the Releases page for one-click install in Claude Desktop.
```
```bash
# Configure the MCP server for Claude Desktop
# This JSON config is placed in Claude Desktop's MCP server settings
{
"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.Configuration, safety, and troubleshooting details follow to help you tailor the server to your environment and keep it running smoothly.
User preferences let you tailor the assistant’s context to your workflow. You can provide a JSON configuration that hints at which accounts to emphasize, how many emails to show, and which folders to prioritize.
Safety limits are in place for batch operations to prevent accidental bulk actions. If you need to perform larger actions, adjust the function parameters accordingly. If Mail.app is unresponsive or searches are slow, verify that Mail.app has Automation permissions and tailor search options to balance content retrieval with performance.
The project includes the main MCP server script, dependencies, an MCP Bundle build folder, an optional Email Management Skill, changelog, license, and contributing guidelines.
This project is released under the MIT license. You will find related references to FastMCP and the Model Context Protocol for integration details.
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)
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
Folder hierarchy with message counts
Move emails between folders (supports nested paths)
Batch mark read/unread, flag/unflag
Soft delete, permanent delete, empty trash
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
List attachments with names and sizes
Save attachments to disk
Email analytics (volume, top senders, read ratios)
Export single emails or mailboxes to TXT/HTML
Interactive UI dashboard (requires mcp-ui-server)