mail-mcp

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 all accounts configured in Mail.app.

Category
Visit Server

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.):

Permission Where to grant
Full Disk Access System Settings → Privacy & Security → Full Disk Access
Automation → Mail System Settings → Privacy & Security → Automation

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

Tools

Tool Description
search_emails Search messages via the Envelope Index database with rich filters
read_email Read the full body of a message by its RFC message-id
list_accounts_and_mailboxes List all configured accounts and mailboxes with unread counts
list_recent List recent messages in a specific mailbox
list_senders Grouped summary of senders with message and unread counts
send_email Send a new email from one of the configured accounts
reply_to_email Reply to an existing message by RFC message-id
set_message_flags Set read and/or flagged status on a message
move_email Move a message to a different mailbox
trash_email Move a message to Deleted Messages
create_mailbox Create a new mailbox/folder in an account
bulk_mark_read Mark all messages in a mailbox and/or from a sender as read
get_unsubscribe_link Extract unsubscribe URLs from a message's headers and body
empty_mailbox Delete 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

Recommended Servers

playwright-mcp

playwright-mcp

A Model Context Protocol server that enables LLMs to interact with web pages through structured accessibility snapshots without requiring vision models or screenshots.

Official
Featured
TypeScript
Magic Component Platform (MCP)

Magic Component Platform (MCP)

An AI-powered tool that generates modern UI components from natural language descriptions, integrating with popular IDEs to streamline UI development workflow.

Official
Featured
Local
TypeScript
Audiense Insights MCP Server

Audiense Insights MCP Server

Enables interaction with Audiense Insights accounts via the Model Context Protocol, facilitating the extraction and analysis of marketing insights and audience data including demographics, behavior, and influencer engagement.

Official
Featured
Local
TypeScript
VeyraX MCP

VeyraX MCP

Single MCP tool to connect all your favorite tools: Gmail, Calendar and 40 more.

Official
Featured
Local
graphlit-mcp-server

graphlit-mcp-server

The Model Context Protocol (MCP) Server enables integration between MCP clients and the Graphlit service. Ingest anything from Slack to Gmail to podcast feeds, in addition to web crawling, into a Graphlit project - and then retrieve relevant contents from the MCP client.

Official
Featured
TypeScript
Kagi MCP Server

Kagi MCP Server

An MCP server that integrates Kagi search capabilities with Claude AI, enabling Claude to perform real-time web searches when answering questions that require up-to-date information.

Official
Featured
Python
E2B

E2B

Using MCP to run code via e2b.

Official
Featured
Neon Database

Neon Database

MCP server for interacting with Neon Management API and databases

Official
Featured
Qdrant Server

Qdrant Server

This repository is an example of how to create a MCP server for Qdrant, a vector search engine.

Official
Featured
Exa Search

Exa Search

A Model Context Protocol (MCP) server lets AI assistants like Claude use the Exa AI Search API for web searches. This setup allows AI models to get real-time web information in a safe and controlled way.

Official
Featured