Apple Mail MCP
Provides tools to interact with Apple Mail on macOS: listing accounts and mailboxes, reading and searching emails, sending messages, archiving or deleting emails, marking read/unread, and creating drafts or replies.
This server does not currently have a deployable release on Glama. Follow the repository's setup instructions to install and configure it for your MCP client, including any required credentials and local dependencies.
Apple Mail MCP
Native Agent Skill Available: This MCP is also available as a native Agent Skill compatible with Claude Code, Cursor, Gemini CLI, and Codex. You can find it here: Marketplace.
An MCP (Model Context Protocol) server for Apple Mail on macOS. Allows AI assistants like Claude to read, search, and send emails through Apple Mail.
Features
List Accounts - Get all configured email accounts
List Mailboxes - Get all mailboxes/folders for any account
Get Emails - Retrieve recent emails from any mailbox
Search Emails - Search by subject, sender, or content
Unread Count - Get unread email counts
Send Email - Compose and send emails with CC/BCC support
Archive Email - Move emails to the Archive mailbox
Delete Email - Move emails to Trash
Mark as Read/Unread - Change read status of emails
Create Draft - Create new draft emails
Create Draft Reply - Create draft replies to existing emails
Related MCP server: apple-mail-mcp
Requirements
macOS (uses AppleScript to communicate with Apple Mail)
Bun runtime
Apple Mail app configured with at least one email account
Installation
From npm (Recommended)
# Install globally
bun add -g @sempervirens-labs/apple-mail-mcp
# Or run directly without installation
bunx @sempervirens-labs/apple-mail-mcpFrom Source
git clone https://github.com/rbouschery/apple-mail-mcp.git
cd apple-mail-mcp
bun installConfiguration
Claude Code
Add to your ~/.claude/settings.json:
{
"mcpServers": {
"apple-mail": {
"command": "bunx",
"args": ["@sempervirens-labs/apple-mail-mcp"]
}
}
}Or if running from source:
{
"mcpServers": {
"apple-mail": {
"command": "bun",
"args": ["run", "/path/to/apple-mail-mcp/src/index.ts"]
}
}
}After adding the configuration, restart Claude Code for the changes to take effect.
Cursor
Add to your Cursor MCP settings (Settings > MCP Servers):
{
"mcpServers": {
"apple-mail": {
"command": "bunx",
"args": ["@sempervirens-labs/apple-mail-mcp"]
}
}
}Or via Cursor's settings UI:
Open Cursor Settings (
Cmd + ,)Search for "MCP" or navigate to Extensions > MCP Servers
Click "Add Server"
Enter:
Name:
apple-mailCommand:
bunxArguments:
@sempervirens-labs/apple-mail-mcp
Claude Desktop
Add to your ~/Library/Application Support/Claude/claude_desktop_config.json:
{
"mcpServers": {
"apple-mail": {
"command": "bunx",
"args": ["@sempervirens-labs/apple-mail-mcp"]
}
}
}Available Tools
mail_list_accounts
List all email accounts configured in Apple Mail.
No parameters requiredExample response:
{
"accounts": ["personal@gmail.com", "iCloud", "work@company.com"]
}mail_list_mailboxes
List all mailboxes for a specific account or all accounts.
Parameter | Type | Required | Description |
| string | No | Account name to list mailboxes for |
Example response:
{
"mailboxes": [
{
"account": "iCloud",
"mailboxes": ["INBOX", "Drafts", "Sent Messages", "Archive", "Junk"]
}
]
}mail_get_emails
Get recent emails from a mailbox.
Parameter | Type | Required | Default | Description |
| string | No | - | Account name |
| string | No | "INBOX" | Mailbox name |
| number | No | 10 | Max emails to retrieve |
| boolean | No | false | Include email body |
| boolean | No | false | Only return unread emails |
Example response:
{
"emails": [
{
"id": 12345,
"subject": "Meeting tomorrow",
"sender": "John Doe <john@example.com>",
"to": ["you@example.com", "team@example.com"],
"cc": ["manager@example.com"],
"bcc": [],
"dateSent": "Monday, 10. January 2025 at 09:30:00",
"isRead": false
}
],
"count": 1
}mail_get_emails_by_ids
Get specific emails by their IDs. Useful for retrieving full details of specific emails after browsing with mail_get_emails (with includeContent: false).
Parameter | Type | Required | Default | Description |
| number[] | Yes | - | Array of email IDs to retrieve |
| string | No | - | Account name (helps optimize search) |
| string | No | "INBOX" | Mailbox name (helps optimize search) |
| boolean | No | true | Include email body |
Example usage:
{
"ids": [12345, 67890],
"includeContent": true
}Example response:
{
"emails": [
{
"id": 12345,
"subject": "Meeting tomorrow",
"sender": "John Doe <john@example.com>",
"to": ["you@example.com"],
"cc": [],
"bcc": [],
"dateSent": "Monday, 10. January 2025 at 09:30:00",
"isRead": false,
"content": "Let's meet at 2pm to discuss the project..."
},
{
"id": 67890,
"subject": "Project update",
"sender": "Jane Smith <jane@example.com>",
"to": ["you@example.com"],
"cc": [],
"bcc": [],
"dateSent": "Tuesday, 11. January 2025 at 14:15:00",
"isRead": true,
"content": "The project is progressing well..."
}
],
"count": 2,
"requestedIds": [12345, 67890]
}mail_search
Search emails by subject, sender, or content.
Parameter | Type | Required | Default | Description |
| string | Yes | - | Search query |
| string | No | - | Limit search to account |
| string | No | - | Limit search to mailbox |
| number | No | 10 | Max results |
mail_get_unread_count
Get the count of unread emails.
Parameter | Type | Required | Description |
| string | No | Account name |
| string | No | Mailbox name |
Example response:
{
"unreadCount": 42
}mail_send
Send an email using Apple Mail.
Parameter | Type | Required | Description |
| string or string[] | Yes | Recipient email(s) |
| string | Yes | Email subject |
| string | Yes | Email body |
| string or string[] | No | CC recipient(s) |
| string or string[] | No | BCC recipient(s) |
| string | No | Sender (must be configured account) |
Example response:
{
"success": true,
"message": "Message sent successfully"
}mail_archive
Archive an email by moving it to the Archive mailbox.
Parameter | Type | Required | Default | Description |
| number | Yes | - | Email ID (from mail_get_emails or mail_search) |
| string | No | - | Account name |
| string | No | "INBOX" | Current mailbox of the email |
| string | No | auto-detect | Name of the archive folder (auto-detects "Archive", "Archives", or "All Mail") |
Example response:
{
"success": true,
"message": "Message archived successfully"
}mail_delete
Delete an email by moving it to Trash.
Parameter | Type | Required | Default | Description |
| number | Yes | - | Email ID (from mail_get_emails or mail_search) |
| string | No | - | Account name |
| string | No | "INBOX" | Current mailbox of the email |
Example response:
{
"success": true,
"message": "Message deleted successfully"
}mail_mark_read
Mark an email as read.
Parameter | Type | Required | Default | Description |
| number | Yes | - | Email ID (from mail_get_emails or mail_search) |
| string | No | - | Account name |
| string | No | "INBOX" | Mailbox where the email is located |
Example response:
{
"success": true,
"message": "Message marked as read"
}mail_mark_unread
Mark an email as unread.
Parameter | Type | Required | Default | Description |
| number | Yes | - | Email ID (from mail_get_emails or mail_search) |
| string | No | - | Account name |
| string | No | "INBOX" | Mailbox where the email is located |
Example response:
{
"success": true,
"message": "Message marked as unread"
}mail_create_draft
Create a new draft email.
Parameter | Type | Required | Description |
| string or string[] | No | Recipient email(s) |
| string | Yes | Email subject |
| string | Yes | Email body |
| string or string[] | No | CC recipient(s) |
| string or string[] | No | BCC recipient(s) |
| string | No | Sender (must be configured account) |
Example response:
{
"success": true,
"message": "Draft created successfully"
}mail_create_draft_reply
Create a draft reply to an existing email.
Parameter | Type | Required | Default | Description |
| number | Yes | - | Email ID to reply to (from mail_get_emails or mail_search) |
| string | Yes | - | Reply body content |
| boolean | No | false | Reply to all recipients |
| string | No | - | Account name |
| string | No | "INBOX" | Mailbox where the original email is located |
Example response:
{
"success": true,
"message": "Draft reply created successfully"
}Permissions
On first use, macOS will prompt you to grant permissions:
Automation - Allow the terminal/app to control Apple Mail
Mail Access - Allow access to your email data
You can manage these in System Settings > Privacy & Security > Automation.
Development
# Install dependencies
bun install
# Run in development mode
bun run dev
# Run the server
bun run startTroubleshooting
"No accounts found"
Ensure Apple Mail is running and has at least one account configured
Check that automation permissions are granted in System Settings
"Operation not permitted"
Grant automation permissions: System Settings > Privacy & Security > Automation
Ensure the terminal/app running the MCP server has permission to control Mail
Server not connecting
Restart your AI client (Claude Code, Cursor, etc.) after adding the MCP configuration
Verify the path to the server is correct in your configuration
Check that Bun is installed and accessible from your PATH
License
MIT
Credits
Built as an alternative to apple-mcp with working mail operations using direct AppleScript execution.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
This server cannot be deployed
Maintenance
Related MCP Connectors
Connect Gmail, iCloud Mail, Outlook, Yahoo Mail, Fastmail and other IMAP inboxes to ChatGPT, Claude and compatible AI assistants. Find emails by meaning across languages with semantic search. Ask AI to find customer conversations, summarize deadlines and draft follow-ups. Give a sales rep access to a shared outreach inbox or bring email into a compatible CRM. Share an iCloud custom-domain inbox with teammates without their own Apple ID or iCloud+ plan. Search results may be incomplete or stale; separate permissions control mail actions.
Connect any mailbox to Claude, ChatGPT & AI: read, send, reply, schedule & search emails.
Email for AI agents: read, search and send from your Gmail, Outlook, Yahoo, iCloud or IMAP inbox.
Give AI agents their own email inboxes: list, read and send mail via scoped, revocable OAuth grants.
Related MCP Servers
- AlicenseBqualityAmaintenanceEnables AI assistants to interact with Apple Mail through natural language, providing comprehensive email management including reading, searching, composing, organizing, and analyzing emails across all configured accounts. Includes an expert skill system that teaches intelligent email workflows and productivity strategies.28232 PyPI257MIT
- AlicenseAqualityBmaintenanceEnables AI assistants to read, send, search, and manage emails in Apple Mail on macOS.2559 PyPI105MIT
- AlicenseAqualityCmaintenanceEnables Claude to control the macOS Mail app for reading, searching, drafting, sending, and managing emails directly from Claude Desktop.12MIT
- AlicenseAqualityBmaintenanceEnables AI assistants to read, search, send, and manage email on macOS through programmatic access to Apple Mail.29MIT