Mail Muncher logo

Mail Muncher

Read-only IMAP or Gmail mail is filtered, archived as files, and exposed through MCP.

Install Mail Muncher

Pick your client, then add it in one click or paste the config.

No confirmed install command yet

We only publish a config when the install details come from the project itself — its README, its docs, or a verified owner. We haven’t found those for mail-muncher, and we’d rather show nothing than a guess you’d paste into your client.

Open setup steps on GitHub

Overview

The mail-muncher MCP server gives agents read-only access to filtered mailbox content from IMAP providers or Gmail. It applies ordered rules, archives matching messages as byte-faithful .eml files and optional Markdown with extracted attachments, then exposes the archive through MCP over stdio. Use it when an agent needs selected email without direct mailbox mutation, custom synchronization, or MIME parsing. It can also run as a one-shot job or polling daemon that updates the same archive.

Use cases

  • Filter job-application replies by sender domain
  • Archive vendor support messages for an agent
  • Read selected newsletters as Markdown
  • Poll a mailbox and expose new threads through MCP

Key features

  • Read-only IMAP mailbox access
  • Gmail API access with gmail.readonly
  • Ordered message filtering rules
  • EML and Markdown archive output
  • Attachment extraction
  • Stdio MCP queries over the archive

Security & health

What it can reach and how reliably it runs — from our own checks, not the maintainer’s claims.

ActiveLast checked

Recent health check succeeded.

14/14 checks healthy over the last 79d

Adoption & maintenance

Factual signals from GitHub, npm, and our automated checks — not a rating.

GitHub stars3Stargazers on the source repository.
Last commit2mo agoMost recent push to the default branch.

How Mail Muncher works

What mail-muncher does

The mail-muncher MCP server separates mailbox access from the program consuming email. It connects to an IMAP mailbox or to Gmail through the Gmail API, evaluates messages against ordered rules, and writes matching content to a destination directory. The same archive can be read directly by an agent or queried through MCP.

Messages are preserved as .eml files and can also be rendered as Markdown. The Markdown output places message headers in YAML frontmatter, keeps the body as text, and places extracted attachments in a neighboring directory. Archived messages include fields such as sender, recipients, date, message ID, thread ID, account, rule, labels, and attachment names.

Rules can read filter values from a plain text file owned by another program. The file is re-read at the beginning of each cycle, so changing a line changes which messages are delivered without editing configuration or restarting the process.

How it works

Choose either provider: imap or provider: gmail. IMAP supports Gmail, Fastmail, iCloud, Proton Bridge, work accounts, and self-hosted mail servers, with the folders listed in mailboxes. Gmail uses a read-only OAuth token and covers the Gmail account except Spam and Trash unless those are requested.

The file-based workflow runs one cycle with mail-muncher run or polls continuously with mail-muncher daemon --interval 5m. Matching messages are placed under the configured destination using a year-and-month directory layout. Thread IDs are included on every message, allowing conversations to be grouped by that field.

The mail-muncher MCP server runs with mail-muncher mcp and provides questions and actions over the same archive. The documented agent workflow includes checking subscriptions, seeing what arrived, reading a thread, and requesting a fetch. A daemon and the MCP process can run together: one fills the archive while the other answers queries.

Setup and configuration

IMAP uses an app password obtained from the mail provider. The configuration uses password_cmd, whose standard output supplies the password; there is deliberately no plain password setting. The default IMAP mailbox is [INBOX], and additional folders can be listed in mailboxes.

Gmail requires a Google Cloud project, a Desktop-app OAuth client, and the gmail.readonly scope. Run mail-muncher auth after completing the Gmail setup. Credentials are stored in token.json with mode 0600. Testing-mode consent screens cause the token to expire every seven days, requiring authentication again.

A rule specifies a name, a match condition, a destination, and output formats. For example, a from_domains_file match can point at a text file containing domains, while formats: [eml, markdown] requests both archive forms.

Tools and capabilities

  • Read from IMAP or Gmail without mailbox-writing operations.
  • Apply ordered rules to select messages.
  • Re-read file-based filter inputs on every cycle.
  • Write byte-faithful .eml messages.
  • Produce Markdown with YAML frontmatter and extracted attachments.
  • Run once, poll on an interval, or serve the archive over stdio MCP.
  • Emit a machine-readable manifest in each operating mode.
  • Query subscriptions, new arrivals, threads, and fetch operations through the MCP workflow.

Limitations and notes

IMAP read-only behavior is enforced by the program, not by the credential. Mailboxes are opened with read-only operations, message bodies are fetched without marking them read, and the provider code does not issue write, append, or expunge commands. However, an IMAP app password itself is a full mail credential that could permit sending or deletion if used elsewhere.

Gmail read-only access is enforced by Google because the requested OAuth scope is gmail.readonly; the resulting token cannot send, delete, label, or modify messages. Gmail setup takes longer than IMAP and requires periodic reauthentication when the consent screen is in Testing mode.

The MCP interface is stdio-based, and the archive is local to the configured destination.

Written by AllMCPs with AI assistance from the project’s README and listing data. How we build listings

Reviews

No reviews yet — be the first to share how it worked for you.

Frequently Asked Questions about Mail Muncher

mail-muncher is an MCP server that connects agents to filtered, read-only mail from IMAP providers or Gmail. Its main tools let agents inspect subscriptions, check newly archived messages, read threads, and request a fetch. Messages are also stored locally as .eml files and optional Markdown with extracted attachments.

It documents configuration for IMAP or Gmail, followed by running the program as a one-shot job, polling daemon, or stdio MCP server.

Use the Gmail provider with a Google Cloud Desktop-app OAuth client and the gmail.readonly scope. Complete the Gmail setup, then run mail-muncher auth. The token is stored in token.json, and Testing-mode consent screens require reauthentication every seven days.

Yes, but the guarantee differs by provider. Gmail receives a Google-enforced gmail.readonly token, while IMAP uses read-only operations in mail-muncher even though the app password itself is a full mail credential.

Related MCP servers

Add a badge to your READMEShow it’s listed — live SVG, Markdown or HTML.

AllMCPs Directory Badge

Full Badge Customizer

Showcase your server listing on GitHub or your project documentation. Embed this dynamic SVG badge to highlight official listing status and live engagement.

Badge Style:
Live Dynamic SVG PreviewMail Muncher AllMCPs Directory Badge
Markdown (GitHub README)
[![AllMCPs](https://allmcps.com/api/badge/mail-muncher?style=directory)](https://allmcps.com/mcp/mail-muncher)
HTML Embed
<a href="https://allmcps.com/mcp/mail-muncher"><img src="https://allmcps.com/api/badge/mail-muncher?style=directory" alt="Mail Muncher on AllMCPs" /></a>