A Model Context Protocol (MCP) server that enables AI assistants like Claude to read, send, search, and manage emails in Apple Mail on macOS.
This server acts as a bridge between AI assistants and Apple Mail. Once configured, you can ask Claude (or any MCP-compatible AI) to:
The AI assistant communicates with this server, which then uses AppleScript to interact with the Mail app on your Mac. All data stays local on your machine.
1. Clone and build:
git clone https://github.com/sweetrb/apple-mail-mcp.git
cd apple-mail-mcp
npm install
npm run build
2. Add to Claude Desktop (~/Library/Application Support/Claude/claude_desktop_config.json):
{
"mcpServers": {
"apple-mail": {
"command": "node",
"args": ["/path/to/apple-mail-mcp/build/index.js"]
}
}
}
3. Restart Claude Desktop and start using natural language:
"Show me my unread emails"
On first use, macOS will ask for permission to automate Mail.app. Click "OK" to allow.
| Feature | Status | Description |
|---|---|---|
| List Messages | ✅ | List messages in any mailbox |
| Search Messages | ✅ | Find emails by sender, subject, content |
| Read Messages | ✅ | Get full email content |
| Send Email | ✅ | Compose and send new emails |
| Create Draft | ✅ | Save emails to Drafts folder |
| Reply | ✅ | Reply to messages (with reply-all support) |
| Forward | ✅ | Forward messages to new recipients |
| Mark Read/Unread | ✅ | Change read status |
| Flag/Unflag | ✅ | Flag or unflag messages |
| Delete Messages | ✅ | Move messages to trash |
| Move Messages | ✅ | Organize into mailboxes |
| List Mailboxes | ✅ | Show all folders with counts |
| List Accounts | ✅ | Show configured accounts |
| Unread Count | ✅ | Get unread counts per mailbox |
| Health Check | ✅ | Verify Mail.app connectivity |
| Statistics | ✅ | Message and unread counts |
search-messagesSearch for messages matching criteria.
| Parameter | Type | Required | Description |
|---|---|---|---|
query |
string | No | Text to search in subject/sender |
mailbox |
string | No | Mailbox to search in (default: INBOX) |
account |
string | No | Account to search in |
limit |
number | No | Max results (default: 50) |
get-messageGet the full content of a message.
| Parameter | Type | Required | Description |
|---|---|---|---|
id |
string | Yes | Message ID |
list-messagesList messages in a mailbox.
| Parameter | Type | Required | Description |
|---|---|---|---|
mailbox |
string | No | Mailbox name (default: INBOX) |
account |
string | No | Account name |
limit |
number | No | Max messages (default: 50) |
send-emailSend a new email immediately.
| Parameter | Type | Required | Description |
|---|---|---|---|
to |
string[] | Yes | Recipient addresses |
subject |
string | Yes | Email subject |
body |
string | Yes | Email body (plain text) |
cc |
string[] | No | CC recipients |
bcc |
string[] | No | BCC recipients |
account |
string | No | Send from specific account |
create-draftSave an email to Drafts without sending.
| Parameter | Type | Required | Description |
|---|---|---|---|
to |
string[] | Yes | Recipient addresses |
subject |
string | Yes | Email subject |
body |
string | Yes | Email body (plain text) |
cc |
string[] | No | CC recipients |
bcc |
string[] | No | BCC recipients |
account |
string | No | Account for draft |
reply-to-messageReply to an existing message.
| Parameter | Type | Required | Description |
|---|---|---|---|
id |
string | Yes | Message ID to reply to |
body |
string | Yes | Reply body |
replyAll |
boolean | No | Reply to all recipients (default: false) |
send |
boolean | No | Send immediately (default: true, false = save as draft) |
forward-messageForward a message to new recipients.
| Parameter | Type | Required | Description |
|---|---|---|---|
id |
string | Yes | Message ID to forward |
to |
string[] | Yes | Recipients to forward to |
body |
string | No | Message to prepend |
send |
boolean | No | Send immediately (default: true, false = save as draft) |
mark-as-read / mark-as-unreadChange read status of a message.
| Parameter | Type | Required | Description |
|---|---|---|---|
id |
string | Yes | Message ID |
flag-message / unflag-messageFlag or unflag a message.
| Parameter | Type | Required | Description |
|---|---|---|---|
id |
string | Yes | Message ID |
delete-messageDelete a message (move to trash).
| Parameter | Type | Required | Description |
|---|---|---|---|
id |
string | Yes | Message ID |
move-messageMove a message to a different mailbox.
| Parameter | Type | Required | Description |
|---|---|---|---|
id |
string | Yes | Message ID |
mailbox |
string | Yes | Destination mailbox |
account |
string | No | Account containing mailbox |
list-mailboxesList all mailboxes for an account.
| Parameter | Type | Required | Description |
|---|---|---|---|
account |
string | No | Account to list from |
get-unread-countGet unread message count.
| Parameter | Type | Required | Description |
|---|---|---|---|
mailbox |
string | No | Mailbox to check (omit for total) |
account |
string | No | Account to check |
list-accountsList all configured Mail accounts.
Parameters: None
health-checkVerify Mail.app connectivity and permissions.
Parameters: None
get-mail-statsGet mail statistics (total messages, unread counts per account).
Parameters: None
create-draft + manual sendnpm install # Install dependencies
npm run build # Compile TypeScript
npm test # Run test suite
npm run lint # Check code style
npm run format # Format code
Rob Sweet - President, Superior Technologies Research
MIT License - see LICENSE for details.