mcpField
M
Mail.app

Mail.app

Local
github.com/p-l-taCommunication1Updated 16w ago

About Mail.app

A local MCP server for macOS Mail.app, intended for people using configured mail accounts through an MCP host. It combines indexed search with Mail.app actions for managing messages.

Key features

  1. 01Search messages with filters
  2. 02Read full message bodies
  3. 03Send and reply to email
  4. 04Flag, move, and trash messages
  5. 05Manage accounts, mailboxes, and subscriptions

Use cases

  1. 01Find messages across configured accounts
  2. 02Review and reply to a specific message
  3. 03Organize mail by flags and mailboxes

MCP support

Exposes Mail.app search, reading, and management tools to MCP hosts over stdio. It runs locally and accesses accounts configured in Mail.app.

Configuration

Local server config is the same for every client. Copy it into your client’s MCP config file.

mcp.json · Universal config
{
"mcpServers": {
"p-l-ta-mail": {
"command": "npx",
"args": [
"-y",
"@p-l-ta/mail-mcp"
]
}
}
}
Run commandnpx -y @p-l-ta/mail-mcp

Local servers need a runtime on your machine (e.g. Node.js 18+). Config file locations differ by client; see your client’s docs.

Packages
npm@p-l-ta/mail-mcp1.3.5

Tools

24

Saved tool list · updated 2w ago

ParameterTypeRequiredDescription
fromstringNoSubstring match on sender address or display name
limitintegerNo
querystringNoFree-text search across subject, sender, and body summary. Omit to list-only by other filters.
sincestringNoISO date — only messages on or after this date
accountstringNoSubstring match against the full mailbox URL (host and path). Use the account hostname to target an account (e.g. 'icloud'), or a mailbox path segment to target a specific folder (e.g. 'INBOX', 'Amtrak').
subjectstringNoSubstring match on subject
include_deletedbooleanNo

Details

From the project README

mail-mcp

MCP server that gives Claude (and other MCP hosts) full access to Mail.app on macOS — search, read, send, reply, flag, move, and more — across every account configured in Mail.app (iCloud, Exchange, IMAP, etc.).

Prerequisites

  • macOS (Mail.app required)
  • Node.js 20+
  • An MCP host: Claude Desktop, Amazon Quick, or any stdio MCP client

Installation

Claude Desktop — one-click install (recommended)
  1. Download mail-mcp.mcpb from the latest release
  2. Double-click the .mcpb file — Claude Desktop installs it automatically
  3. Grant the required macOS permissions (see below)
Manual / Amazon Quick / other hosts
npx @p-l-ta/mail-mcp

Or install globally:

npm install -g @p-l-ta/mail-mcp
mail-mcp

Point your MCP host at the mail-mcp binary (stdio transport). Example config:

{
  "mcpServers": {
    "mail-app": {
      "command": "npx",
      "args": ["@p-l-ta/mail-mcp"]
    }
  }
}

Required macOS permissions

Grant these to the application that runs the MCP host (Claude Desktop, Amazon Quick, etc.):

PermissionWhere to grant
Full Disk AccessSystem Settings → Privacy & Security → Full Disk Access
Automation → MailSystem Settings → Privacy & Security → Automation

The MCP server process inherits permissions from the host application that launches it.

Tools

ToolDescription
search_emailsSearch messages via the Envelope Index database with rich filters
read_emailRead the full body of a message by its RFC message-id
list_accounts_and_mailboxesList all configured accounts and mailboxes with unread counts
list_recentList recent messages in a specific mailbox
list_sendersGrouped summary of senders with message and unread counts
send_emailSend a new email from one of the configured accounts
reply_to_emailReply to an existing message by RFC message-id
set_message_flagsSet read and/or flagged status on a message
move_emailMove a message to a different mailbox
trash_emailMove a message to Deleted Messages
create_mailboxCreate a new mailbox/folder in an account
bulk_mark_readMark all messages in a mailbox and/or from a sender as read
get_unsubscribe_linkExtract unsubscribe URLs from a message's headers and body
empty_mailboxDelete every message in a mailbox at once (Junk, Trash, etc.)

How it works

  • Search & read — queries Mail's own Envelope Index SQLite database directly for fast, structured results across all accounts
  • Actions (send, reply, flag, move, trash) — driven by AppleScript automation against Mail.app, so they work even for accounts where messages aren't stored as local files

Development

npm install
npm run dev          # tsx watch — live reload
npm test             # vitest unit tests
npm run build        # compile TypeScript → dist/
npm run mcpb         # build Claude Desktop extension → build/mail-mcp.mcpb

Interactive MCP testing:

npm run build
npx @modelcontextprotocol/inspector node dist/server.js

Privacy Policy

mail-mcp is a local MCP server that runs entirely on your Mac. It has no backend, no telemetry, and makes no network requests of its own.

What it accesses:

  • Mail.app's Envelope Index database (~/Library/Mail/) — read-only, used for search queries
  • Mail.app via AppleScript — to read message bodies, send mail, flag, move, and trash messages

What it does NOT do:

  • Collect, store, or transmit any data outside your Mac
  • Connect to any external server or API
  • Log message content anywhere

All email data stays on your device and is only passed to the MCP host (Claude Desktop or another client) as part of normal tool responses. You control exactly which tools Claude can invoke.

License

MIT

Comments

Markdown supported

New to MCP?

From what the protocol is to installing your first server, these answers cover most first questions.

An open protocol that defines how AI applications connect to external tools and data in a uniform way. Clients talk to the model; MCP servers provide tools, resources and prompt templates. They exchange standard messages, so one server can be reused by many clients.