Mail MCP Server

Filtered, read-only IMAP and Gmail archived to disk as .eml + markdown, served over MCP.

Remote serverstreamable-httpGo

What is the Mail MCP server?

If you already use Mail, the mail mcp server is the piece that lets your assistant work with it directly. Filtered, read-only IMAP and Gmail archived to disk as .eml + markdown, served over MCP.

What the server does

Available tools

The toolset is worth reading before you wire it up, because it tells you what the integration is really for:

  • Gmail — enforced by Google.** The only scope requested is gmail.readonly
  • IMAP — enforced by mail-muncher.** IMAP has no read-only credential to ask
  • name — agent-inbox
  • Read — only by construction.** Nothing in mail-muncher writes to a mailbox
  • Credential — an app password from your provider's own settings page
  • Expiry — none
  • list_rules — What am I collecting, and which senders am I subscribed to right now? Each from_domains_file is re-read on every call
  • list_messages — What has arrived? Filter by rule, account, thread or date; optionally grouped into conversations
  • search_messages — Where is the message that mentions X? Substring search over subject, sender, recipients, labels, attachment names and body
  • read_message — One message in full — metadata, body, attachment names and sizes — and optionally its whole thread in order
  • sync — Fetch new mail once, returning the same manifest run --json writes
  • gmail-archive — It was almost exactly this — Gmail query to Maildir, incremental — and would be the obvious answer if it were still maintained. It has not been since

Installation

Because this one is hosted, setup is mostly authentication — you point your client at the endpoint and approve access. Nothing runs on your machine, so there is no runtime to keep patched.

Where it fits

This sits in the team communication group, where several servers overlap in what they claim to do but differ sharply once you actually set them up. Mail's toolset — Gmail, IMAP, name and 11 more — is a fair guide to whether it matches your workflow. It is maintained by craigjmidwinter; worth a glance at recent repository activity before you build anything load-bearing on it.

This entry was verified against Mail's own documentation before publication; SyncDev keeps the directory reviewed rather than auto-generated.

Worth knowing first

  • Your data travels to the provider's service, so the usual questions apply about what you send and what they retain.
  • With 14 tools registered it takes up a noticeable share of the context window; turn it off in projects that never touch Mail.
  • Keep per-call confirmation enabled while you learn its behaviour; it is the cheapest safeguard you have.

Available tools

ToolWhat it does
Gmailenforced by Google.** The only scope requested is gmail.readonly.
IMAPenforced by mail-muncher.** IMAP has no read-only credential to ask
nameagent-inbox
Readonly by construction.** Nothing in mail-muncher writes to a mailbox.
Credentialan app password from your provider's own settings page
Expirynone
list_rulesWhat am I collecting, and which senders am I subscribed to *right now*? Each from_domains_file is re-read on every call.
list_messagesWhat has arrived? Filter by rule, account, thread or date; optionally grouped into conversations.
search_messagesWhere is the message that mentions X? Substring search over subject, sender, recipients, labels, attachment names and body.
read_messageOne message in full — metadata, body, attachment names and sizes — and optionally its whole thread in order.
syncFetch new mail once, returning the same manifest run --json writes.
gmail-archiveIt was almost exactly this — Gmail query to Maildir, incremental — and would be the obvious answer if it were still maintained. It has not been since 2018.
gmail-exporterYou want a one-off, label-based, spreadsheet-shaped export rather than incremental sync.
HomebrewThat taps [craigjmidwinter/homebrew-tap](https://github.com/craigjmidwinter/homebrew-tap) and installs a prebuilt binary. brew upgrade mail-muncher tracks new releases.

How to install the Mail MCP server

{
  "mcpServers": {
    "mail-muncher": {
      "command": "/usr/local/bin/mail-muncher",
      "args": ["mcp", "--config", "/Users/you/.config/mail-muncher/config.yml"]
    }
  }
}

Configuration as documented by the project. Restart the client after saving.

Example prompts to try

  • Use Mail to Gmail.
  • Use Mail to IMAP.
  • Use Mail to name.

Frequently asked questions

It connects Mail to MCP-compatible AI assistants such as Claude and Cursor, exposing 14 tools (Gmail, IMAP, name, and more) that the assistant can call on your behalf. Instead of copying data back and forth by hand, the assistant works with Mail directly.