MCP Server Notmuch logo

MCP Server Notmuch

by hgn

Search and read a local notmuch mailbox through MCP, with opt-in drafts, tagging, and export features.

Install MCP Server Notmuch

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

STDIOPython
~/Library/Application Support/Claude/claude_desktop_config.json
claude_desktop_config.json
{
  "mcpServers": {
    "hgn-mcp-server-notmuch": {
      "command": "uvx",
      "args": [
        "--prerelease=allow",
        "mcp-server-notmuch"
      ]
    }
  }
}

Settings → Developer → Edit Config, merge this into mcpServers, then fully quit and reopen Claude Desktop.

Claude Code command
claude mcp add --transport stdio hgn-mcp-server-notmuch -- uvx --prerelease=allow mcp-server-notmuch

Run in your terminal. Add --scope project to share it with your team through .mcp.json.

We couldn’t confirm it starts correctly

We ran the install command but it didn't respond within our test window — this can mean a slow first-time install rather than a real problem.

uvx --prerelease=allow mcp-server-notmuch

No response to initialize.

This is an experimental automated check and can have false negatives — missing environment variables, a slow cold install, etc. It doesn’t necessarily mean something’s wrong. Last checked .

Overview

The hgn/mcp-server-notmuch MCP server exposes a local notmuch email database to MCP clients for searching, reading, and analyzing mail. It supports full-text and tag-filtered searches, thread views, attachment reading, related-thread lookup, unanswered-mail tracking, and configurable search scopes. Draft creation, tag changes, and exports are disabled by default and require explicit flags. Reach for it when an agent needs local Maildir access without sending mail or using an external email API.

Use cases

  • Search a local Maildir by full text, tags, or configured scope
  • Review long email threads before reading every message
  • Find unanswered conversations and pending replies
  • Read PDF, office, image, and calendar attachments
  • Create local drafts for review without sending mail

Key features

  • Full-text and scoped notmuch search
  • Thread reading and lightweight thread overviews
  • Attachment discovery and content extraction
  • Related-thread and pending-reply analysis
  • Opt-in plain-text drafts and tag management
  • Bounded attachment and Gource-log exports

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.

26/26 checks healthy over the last 117d

Supply-chain signal

No high-severity advisories surfaced by our automated scan.

Critical 0High 0Medium 0Low 0

Scanned 7d ago via OSV.dev · mcp-server-notmuch (PyPI)

Adoption & maintenance

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

GitHub stars4Stargazers on the source repository.
Last commit4mo agoMost recent push to the default branch.
Install checkInconclusiveDidn't respond in our test window — often a slow first install.
Directory activity4 viewsConfig copies, upvotes, and views on AllMCPs.

How MCP Server Notmuch works

What hgn/mcp-server-notmuch MCP server does

The hgn/mcp-server-notmuch MCP server connects an MCP client to a local email database managed by the notmuch command-line tool. Its primary mode is read-only: an agent can search messages and threads, inspect headers and bodies, review thread structure, find related conversations, and identify messages awaiting a response.

Attachment handling covers text files, PDFs, office documents, images, and calendar invites. The server can also search for attachments across a mailbox and resolve names to the email addresses found in messages. It does not send email. Drafts are written to a configured local maildir for later review and sending in a normal mail client.

How it works

The hgn/mcp-server-notmuch MCP server invokes the real notmuch CLI rather than the notmuch2 Python bindings. The notmuch executable must be available on PATH, or its path can be set in configuration. A missing configuration file uses the system notmuch binary and a built-in unrestricted all scope. Once a configuration file defines scopes, those configured scopes are authoritative.

Scopes let administrators constrain searches to named notmuch queries, such as personal mail or mailing lists. A tool can add a caller-supplied query to the selected scope. The server combines both queries with an AND operation, preventing an OR expression from escaping the scope boundary.

Results are not silently truncated. Callers can provide explicit result or character limits, and configured limits can cap message bodies, attachment text, and images. When a limit cuts output, the response indicates that more data exists.

Setup and configuration

Install the project with uvx --prerelease=allow mcp-server-notmuch when the PyPI package is available, or install it from the repository with the documented uv commands. The prerelease option is required because the project pins a prerelease MCP SDK.

The configuration file is normally $XDG_CONFIG_HOME/mcp-server-notmuch/config.toml, or ~/.config/mcp-server-notmuch/config.toml when XDG_CONFIG_HOME is unset. Use --config to select another file. Configuration can specify the notmuch binary and its own config path, search scopes, output limits, draft-maildir settings, draft sender and signature, wrapping width, attachment-size limits, and the user's email addresses.

PDF extraction requires pdftotext from poppler-utils. Office-document extraction requires either pandoc or libreoffice. Pillow is optional and can downscale oversized images instead of refusing them. Gource is optional for playing back an exported mailbox-history log.

Tools and capabilities

The read tier is always available and includes search, message and thread reading, thread overviews, message and thread counts, address lookup, attachment listing and reading, attachment search, scope listing, reply preparation, related-thread detection, and pending-reply tracking.

Passing --allow-drafts registers tools for creating and revising plain-text drafts. Draft operations require both a configured maildir and a From: value. Passing --allow-tags enables adding or removing tags on existing messages. Passing --allow-export DIR enables attachment and Gource-log exports within the named directory.

These flags control which tools are registered; disabled write capabilities are absent from the client's tool list. Existing message content is not modified by draft operations, and the server has no send capability.

Limitations and notes

The hgn/mcp-server-notmuch MCP server is designed for local notmuch databases and Maildirs, not hosted mailbox APIs. It cannot send mail through SMTP or sendmail. Its filesystem access is bounded by the notmuch database, configured drafts maildir, and—when export is enabled—the selected export directory.

Draft and tag operations are opt-in, while reading remains available without those flags. Reply tracking that uses direction="waiting" needs configured identity addresses or a readable notmuch primary email address. Without PDF, office-document, or image support dependencies, the relevant attachment operations report the missing requirement instead of providing the content.

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 MCP Server Notmuch

Use `uvx --prerelease=allow mcp-server-notmuch` when the PyPI package is available, or install from the repository with the documented `uv` commands. The prerelease option is required.

Yes. The README provides a Claude Desktop configuration using `uvx` and the `mcp-server-notmuch` package.

No. It has no send capability. Drafts are written to a local maildir for review and sending manually in another mail client.

Start the server with `--allow-drafts` for local plain-text drafts or `--allow-tags` for message tag changes. These capabilities are disabled by default.

PDFs require `poppler-utils` and its `pdftotext` command. Office documents require either `pandoc` or `libreoffice`.

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 PreviewMCP Server Notmuch AllMCPs Directory Badge
Markdown (GitHub README)
[![AllMCPs](https://allmcps.com/api/badge/hgn-mcp-server-notmuch?style=directory)](https://allmcps.com/mcp/hgn-mcp-server-notmuch)
HTML Embed
<a href="https://allmcps.com/mcp/hgn-mcp-server-notmuch"><img src="https://allmcps.com/api/badge/hgn-mcp-server-notmuch?style=directory" alt="MCP Server Notmuch on AllMCPs" /></a>