Skip to main content

mu-mcp: MCP Server for the mu Mail Indexer

GitHub release GitHub license

A Model Context Protocol (MCP) server for querying your local mu mail index. This server enables fast, structured mail search from Claude Desktop and other MCP clients.

Features

  • Stdio MCP server for easy integration
  • Tools: search_emails, view_emails (HTML-only emails converted to text), list_attachments, open_attachment (saves to a temp dir and optionally opens with the default OS viewer), and mu_help for the full mu reference on demand.
  • Small context footprint: a short query guide lives in the tool description; the full man pages are only loaded when the model asks for them.
  • Fast, flexible mail search using the mu index
  • Claude Desktop ready: simple installation and config
  • Python, uv, and MCP SDK based

Installation

Requires mu installed and your mail indexed (mu init + mu index).

With uv installed, run the published package from PyPI without cloning the repository:

uvx mu-mcp

Usage

Run the MCP Server

uvx mu-mcp

The server communicates over stdio; normally your MCP client launches it using the configuration below.

Claude Desktop Integration

Add to your claude_desktop_config.json:

"mcpServers": {
  "email": {
    "command": "uvx",
    "args": ["mu-mcp"]
  }
}

The client needs uvx and mu on its PATH. If it cannot find uvx, use the absolute path returned by which uvx as the command.

Claude Code Integration

claude mcp add email -s user -- uvx mu-mcp

Use -s local instead to enable it only in the current project. Check it with /mcp in a new session.

Query

Ask Claude to find emails, e.g. "Find emails with a PDF attachment that were sent last April and open the PDF", "Show me the email I received from Alice last week", or "Find emails with the subject 'Meeting Notes'".

Development

To run from a local checkout:

git clone https://github.com/danielfleischer/mu-mcp.git
cd mu-mcp
uv sync
uv run mu-mcp
  • Adding a tool to view an email.
  • Adding a tool to find and download attachments.
  • Progressive disclosure of the mu man pages via mu_help.
  • Add a mu-mcp console script and use uvx mu-mcp as the install method.
  • Describe when to use the server in its instructions, including email, inbox, messages, receipts, and attachments.

Future ideas

  • Return attachment text (PDF, DOCX) from open_attachment; Claude Desktop can't read the saved file paths.
  • view_thread: show a whole conversation from one message.
  • find_contacts via mu cfind, to resolve a name to its addresses.

Metadata

Release files for mu_mcp 0.6.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for mu_mcp 0.6.1
File Size Uploaded
mu_mcp-0.6.1.tar.gz 27.0 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for mu_mcp 0.6.1
File Interpreter ABI Platform
mu_mcp-0.6.1-py3-none-any.whl Python 3 none any Details

Total release size: 54.0 kB

Release files / mu_mcp-0.6.1.tar.gz

Download URL mu_mcp-0.6.1.tar.gz
Size 27.0 kB
Tags Source
SHA-256 checksum
How to use checksums
f47cc99f8101bb6243f1e7b2aa9f9b707e7357c50465112707f7f55e73b14774
BLAKE2b-256 checksum
How to use checksums
db20b7484bcd7e32711432535c2a800212cee02651ced20ca4c3f554feb08f59
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via uv/0.12.23 {"installer":{"name":"uv","version":"0.12.23","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"macOS","version":null,"id":null,"libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

Release files / mu_mcp-0.6.1-py3-none-any.whl

Download URL mu_mcp-0.6.1-py3-none-any.whl
Size 27.0 kB
Tags Python 3
SHA-256 checksum
How to use checksums
3cf56d805c1c9b785f867989438e86825a858180814a84ba5e62453f388250ef
BLAKE2b-256 checksum
How to use checksums
3ed4e1acbefa91327ae9b01beda5500a2ee092c3cb9b1bd2a47c34a1827bb22f
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via uv/0.12.23 {"installer":{"name":"uv","version":"0.12.23","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"macOS","version":null,"id":null,"libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

Release history Release notifications | RSS feed

0.7.0

2 release files

This release

0.6.1 This release

2 release files

0.6.0

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page