A Model Context Protocol (MCP) server for Apple Mail on macOS. Read, send, search, and manage emails directly through AI assistants.
- Account Management: List mail accounts and mailboxes
- Email Retrieval: Get unread, recent, or specific emails
- Search: Search emails by sender, subject, content, or date
- Compose & Send: Send new emails with To, CC, and BCC
- Reply: Reply to existing emails
- Organize: Mark as read/unread, delete, move between mailboxes
- Statistics: Get unread counts per account/mailbox
- macOS with Apple Mail configured
- Node.js 18 or higher
- Apple Mail must have at least one account configured
npm install -g apple-mail-mcpOr clone and build locally:
git clone https://github.com/thomasvincent/apple-mail-mcp.git
cd apple-mail-mcp
npm install
npm run buildAdd to your MCP client config (e.g., Claude Desktop at ~/Library/Application Support/Claude/claude_desktop_config.json):
{
"mcpServers": {
"apple-mail": {
"command": "node",
"args": ["/path/to/apple-mail-mcp/dist/index.js"]
}
}
}Build the project:
npm run buildWatch mode for development:
npm run devRun linter:
npm run lintFormat code:
npm run formatRun tests:
npm testWatch mode for tests:
npm run test:watchmail_get_accounts- List all configured mail accountsmail_get_mailboxes- List mailboxes for an account
mail_get_unread- Get unread emails (optionally filtered by account/mailbox)mail_get_recent- Get recent emails with configurable limitmail_get_email- Get a specific email by ID
mail_search- Search emails by sender, subject, content, or date range
mail_send- Send a new email (with optional CC/BCC)mail_reply- Reply to an existing email
mail_mark_read- Mark email as readmail_mark_unread- Mark email as unreadmail_delete- Delete an emailmail_move- Move email to a different mailbox
mail_unread_count- Get unread email countmail_open- Open Apple Mail applicationmail_check- Check for new emails
The MCP server uses AppleScript to interact with Apple Mail. On first use, you may need to grant automation permissions in System Preferences > Security & Privacy > Privacy > Automation.
MIT License - see LICENSE file for details.
Thomas Vincent