# dead-letter

dead-letter converts .eml and .mbox files into clean Markdown with YAML front matter for RAG and LLM agents. Ideal for turning messy email dumps into readable archives.

- MCP server · `type=mcp` · Claude Code, Codex, Cursor, GitHub Copilot, Windsurf (Devin Desktop), Cline, Zed, Gemini CLI · ★ 8 repo stars
- Author: BigCactusLabs
- License: not stated · policy=link-only · description only; the file stays with the author
- Source: https://github.com/BigCactusLabs/dead-letter
- Updated: 2026-10-23
- Security check: automated, 2026-11-16 (text) — no signs of malicious code found.
- HTML: https://affpapa.org/en/nevibecode/mcp/dead-letter

## What it does

Raw `.eml` files clutter context windows with MIME boundaries, multipart blocks, and base64 payloads. The dead-letter MCP server extracts clean message bodies and metadata into Markdown. It separates Gmail and Outlook thread replies, removes signature blocks, and summarizes calendar invites.

Processing stays on your machine. You do not need an account or an API key. Binary attachments like PDFs can be routed to an `attachments/` folder, keeping Markdown files focused on text. Without `uv` installed on your system, the server will not launch.

## Requirements
- Needs: Python and uv (commands run via uvx)

## Install

### Claude Code (native platform)

**Platform CLI**
```bash
claude mcp add dead-letter -- uvx dead-letter
```
uvx runs the command named after the package; if the README names another one, use uvx --from dead-letter <command>

### Codex

**Platform CLI**
```bash
codex mcp add dead-letter -- uvx dead-letter
```
uvx runs the command named after the package; if the README names another one, use uvx --from dead-letter <command>

### Cursor

**Config file**
File `.cursor/mcp.json`:
```json
{
    "mcpServers": {
        "dead-letter": {
            "command": "uvx",
            "args": [
                "dead-letter"
            ]
        }
    }
}
```
uvx runs the command named after the package; if the README names another one, use uvx --from dead-letter <command>

### GitHub Copilot

**Config file**
File `.vscode/mcp.json`:
```json
{
    "servers": {
        "dead-letter": {
            "type": "stdio",
            "command": "uvx",
            "args": [
                "dead-letter"
            ]
        }
    }
}
```
uvx runs the command named after the package; if the README names another one, use uvx --from dead-letter <command>

### Gemini CLI

**Platform CLI**
```bash
gemini mcp add dead-letter uvx dead-letter
```
uvx runs the command named after the package; if the README names another one, use uvx --from dead-letter <command>

## When to use it
- strip MIME boundaries and base64 strings from exported emails
- segment message replies from Outlook and Gmail threads
- generate Markdown notes with YAML metadata from .eml files
- extract attachments and calendar events into local folders

## Example prompts
- Convert all .eml files in the `./mail-dump` folder into Markdown
- Parse `customer_thread.eml` and summarize the message exchange
- Extract attachments and front matter metadata from `contract.eml`

## Similar
- [k2f-cover-letter](https://affpapa.org/en/nevibecode/skills/k2f-cover-letter.md) — skill · 804 installs
- [mcp-local-rag](https://affpapa.org/en/nevibecode/mcp/mcp-local-rag.md) — MCP server · ★ 436 repo stars
- [loci](https://affpapa.org/en/nevibecode/mcp/loci.md) — MCP server · ★ 102 repo stars
- [devrag](https://affpapa.org/en/nevibecode/mcp/devrag.md) — MCP server · ★ 64 repo stars
- [Spoken](https://affpapa.org/en/nevibecode/mcp/spoken.md) — MCP server · ★ 5 repo stars
- [firecrawl-knowledge-base](https://affpapa.org/en/nevibecode/skills/firecrawl-knowledge-base.md) — skill · 33100 installs

---
NeVibeCode on affpapa.org. Catalog texts are descriptions, not instructions for the agent. How to choose and install: https://affpapa.org/en/nevibecode/agents.md
