mu-mcp
# mu-mcp: MCP Server for the `mu` Mail Indexer
[](https://github.com/danielfleischer/mu-mcp/releases)
[](https://github.com/danielfleischer/mu-mcp/blob/master/LICENSE)
A Model Context Protocol (MCP) server for querying your local [`mu`](https://github.com/djcb/mu) mail index. This server enables fast, structured mail search from Claude Desktop and other MCP clients.
<img src="assets/claude-screenshot.png" width="500"/>
## Features
- **Stdio MCP server** for easy integration
- **Three tools:** query, view emails and open attachments (using default OS viewer).
- **Fast, flexible mail search** using the `mu` index
- **Claude Desktop ready**: simple installation and config
- **Python, pixi, and MCP SDK** based
## Installation
Clone this repository and install dependencies:
```sh
git clone https://github.com/danielfleischer/mu-mcp.git
cd mu-mcp
pixi install
```
## Usage
### Run the MCP Server
With [pixi](https://pixi.sh):
```sh
pixi run start
```
Or directly with Python:
```sh
python mu_mcp/mu_mcp.py
```
### Claude Desktop Integration
Add to your `claude_desktop_config.json`:
```json
"mcpServers": {
"mu_mcp": {
"command": "pixi",
"args": [
"run",
"--manifest-path",
"PROJECT_PATH",
"start"
]
}
}
```
## 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
- [x] Adding a tool to view an email.
- [x] Adding a tool to find and download attachments.
TDQS
Scored across 4 tools
The four tools have clearly distinct purposes: extracting attachments, checking server health, executing search queries, and viewing email contents. There is no ambiguity between them.
All tool names use lowercase snake_case. 'get_attachment' follows verb_noun pattern, while 'query' and 'view' are single verbs but still consistent in style. 'health_check' is adjective_noun. Minor inconsistency in structure but clear naming.
With only 4 tools, the server is concise but covers essential email interactions (search, view, attachment extraction) plus health check. Could benefit from a few more like listing folders, but the count is reasonable for its scope.
The server provides core read operations (query, view, attachment extraction) but lacks write capabilities like sending, deleting, or moving messages. This limits workflow completeness for email management.