Skip to main content
Glama
mu-mcp

mu-mcp

by TatuLahtela

mu-mcp

An MCP server that lets your local LLM search your email using mu.

Privacy

Your emails never leave your machine.

mu indexes your local maildir and searches it entirely on-device — no email content is sent to any server. When paired with a local LLM such as Qwen, Mistral, or Llama running via Ollama, the full pipeline is local:

your emails → mu index (local) → mu-mcp → local LLM

Nothing touches the internet. This is in contrast to cloud-based email AI integrations that require granting third-party services access to your inbox.

If you use a cloud LLM (e.g. Claude, GPT-4), be aware that email metadata — subjects, sender addresses, dates, and full message bodies if you invoke get_email — will be sent to that provider as part of the conversation context.

Related MCP server: Mailing Manager MCP

Requirements

  • mu 1.x installed and your maildir indexed (mu init && mu index)

  • Python 3.14

  • uv

Installation

git clone ...
cd mu-mcp
uv sync

MCP client configuration

{
  "mcpServers": {
    "mu": {
      "command": "uv",
      "args": [
        "run",
        "--directory", "/path/to/mu-mcp",
        "mu-mcp"
      ]
    }
  }
}

Tools

search_emails(query, max_results, sort_field, sort_order) Search your maildir using mu query syntax. Returns email metadata (subject, sender, date, path, flags).

get_email(path) Retrieve the full content of a message by its file path (as returned by search_emails). Returns headers and body as plain text.

Available Tools

5 tools
count_emailsA

Count emails matching a query without fetching their content.

Use this when the user asks 'how many emails' rather than asking to see them.

Inputs: query (required). Returns: result

find_contactsA

Search contacts by name or email address using mu cfind.

Use this to resolve a person's name to their exact email address before searching emails with from: or to: filters.

Inputs: query (required), max_results. Returns: result

get_emailA

Get the full content of an email by its file path.

The path is obtained from the path field of search_emails results. Returns the raw email text including headers and body.

Inputs: path (required). Returns: result

list_mailboxesA

List all maildirs in the mu index.

Call this first to discover maildir names before using maildir: in queries.

Inputs: no named parameters. Returns: result

search_emailsB

Search emails using mu find query syntax.

Examples: 'from:alice subject:report date:2w..'

sort_field: one of date, from, to, subject, size, maildir (default: date) sort_order: "desc" for newest/largest first, "asc" for oldest/smallest first

Inputs: query (required), sort_field, sort_order, max_results. Returns: result

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections.

Loading tool schema changelog…

    TDQS

    A4.1/5.0

    Scored across 5 tools

    Disambiguation5/5

    Each tool has a unique and clearly defined purpose: counting emails, finding contacts, fetching full email content, listing mailboxes, and searching emails. No overlap in functionality.

    Naming Consistency5/5

    All tool names follow a consistent verb_noun pattern (e.g., count_emails, find_contacts, get_email), all in lowercase snake_case. The naming is predictable and clear.

    Tool Count5/5

    With 5 tools covering core email operations (search, count, retrieve, list mailboxes, find contacts), the number is well-scoped and each tool serves a necessary role.

    Completeness4/5

    The set covers the main query and retrieval needs, but lacks operations like deleting or moving emails. For a read-oriented MCP, it's mostly complete; minor gap for listing all contacts without a query.

    Maintenance

    ActivityInactive
    ResponsivenessOutdated data

    Related MCP Connectors

    Related MCP Servers

    • A
      license
      Not graded
      quality
      D
      maintenance
      Enables LLMs to search and read email from a notmuch archive, providing tools for searching threads, retrieving messages, and listing tags through an MCP endpoint.
      MIT
    • A
      license
      Not graded
      quality
      B
      maintenance
      Enables AI agents to query and recall your entire Gmail inbox locally, providing fast summarization and semantic search without relying on Gmail's search API.
      84 npm
      4
      MIT
    • A
      license
      A
      quality
      C
      maintenance
      Reads and searches local email archives (.mbox or .eml) with full MIME parsing, enabling queries about senders, subjects, dates, and bodies while keeping all data on your machine.
      3
      124 npm
      MIT