# Lettio MCP

Wires an AI agent to a Lettio mailbox over the open JMAP protocol, so it can read, search, reply and send mail.

- MCP server · `type=mcp` · Claude Code, Codex, Cursor, GitHub Copilot, Windsurf (Devin Desktop), Cline, Zed, Gemini CLI
- Author: lettio-eu
- License: MIT · policy=link-only · description only; the file stays with the author
- Source: https://github.com/lettio-eu/mcp
- Updated: 2026-09-15
- HTML: https://affpapa.org/en/nevibecode/mcp/lettio-mcp

## What it does

Lettio MCP is a Model Context Protocol server that gives an agent access to a Lettio mailbox through JMAP. It ships ten tools: account and folder listings, recent messages, free-text search over sender, subject and body, reading one message by id, sending, in-thread reply with an optional reply-all, read/unread toggling, flagging, and moving a message to `archive`, `trash` or a named folder.

Sending is locked down on purpose. The server first asks the mail host which addresses the logged-in mailbox may use, then requires a match with the login address. Both the `From` header and the SMTP envelope `MAIL FROM` are pinned to it, and no tool parameter lets an agent pick a different sender. Credentials come from environment variables, stay in memory and are never logged.

You need Node.js 18 or newer plus a dedicated app password for the mailbox — not your main login. One mailbox is configured with `LETTIO_USERNAME` and `LETTIO_PASSWORD`; for several, set `LETTIO_ACCOUNTS` to a JSON array and pass `account` to each tool. A hosted OAuth option lives at `https://mcp.lettio.eu/mcp` if you would rather not run anything locally.

## Requirements
- Needs: Node.js (commands run via npx)
- Remote server: `https://mcp.lettio.eu/mcp`
- Environment variables: `LETTIO_USERNAME`, `LETTIO_PASSWORD`, `LETTIO_HOST` — keys and tokens: ask the human for the values, never commit them or put them in shared files.

## Install

### Claude Code (native platform)

1. **Platform CLI: remote server**
```bash
claude mcp add --transport http mcp https://mcp.lettio.eu/mcp
```

2. **Platform CLI**
```bash
claude mcp add --env LETTIO_USERNAME=<LETTIO_USERNAME> --env LETTIO_PASSWORD=<LETTIO_PASSWORD> --env LETTIO_HOST=<LETTIO_HOST> --transport stdio lettio-mcp -- npx -y @lettio/mcp
```
Replace <…> with your own values

### Codex

1. **Platform CLI: remote server**
```bash
codex mcp add lettio-mcp --url https://mcp.lettio.eu/mcp
```

2. **Platform CLI**
```bash
codex mcp add lettio-mcp --env LETTIO_USERNAME=<LETTIO_USERNAME> --env LETTIO_PASSWORD=<LETTIO_PASSWORD> --env LETTIO_HOST=<LETTIO_HOST> -- npx -y @lettio/mcp
```
Replace <…> with your own values

### Cursor

**Config file**
File `.cursor/mcp.json`:
```json
{
    "mcpServers": {
        "lettio-mcp": {
            "url": "https://mcp.lettio.eu/mcp"
        }
    }
}
```
File `.cursor/mcp.json`:
```json
{
    "mcpServers": {
        "lettio-mcp": {
            "command": "npx",
            "args": [
                "-y",
                "@lettio/mcp"
            ],
            "env": {
                "LETTIO_USERNAME": "<LETTIO_USERNAME>",
                "LETTIO_PASSWORD": "<LETTIO_PASSWORD>",
                "LETTIO_HOST": "<LETTIO_HOST>"
            }
        }
    }
}
```
Replace <…> with your own values

### GitHub Copilot

**Config file**
File `.vscode/mcp.json`:
```json
{
    "servers": {
        "lettio-mcp": {
            "type": "http",
            "url": "https://mcp.lettio.eu/mcp"
        }
    }
}
```
File `.vscode/mcp.json`:
```json
{
    "servers": {
        "lettio-mcp": {
            "type": "stdio",
            "command": "npx",
            "args": [
                "-y",
                "@lettio/mcp"
            ],
            "env": {
                "LETTIO_USERNAME": "<LETTIO_USERNAME>",
                "LETTIO_PASSWORD": "<LETTIO_PASSWORD>",
                "LETTIO_HOST": "<LETTIO_HOST>"
            }
        }
    }
}
```
Replace <…> with your own values

### Gemini CLI

1. **Platform CLI: remote server**
```bash
gemini mcp add -t http lettio-mcp https://mcp.lettio.eu/mcp
```

2. **Platform CLI**
```bash
gemini mcp add -e LETTIO_USERNAME=<LETTIO_USERNAME> -e LETTIO_PASSWORD=<LETTIO_PASSWORD> -e LETTIO_HOST=<LETTIO_HOST> lettio-mcp npx -y @lettio/mcp
```
Replace <…> with your own values

## When to use it
- triage an inbox and file messages into folders
- find a message by sender or subject
- reply in-thread without breaking the conversation
- send mail as the connected mailbox
- mark a message read or star it

## Example prompts
- List my latest inbox messages and mark them read
- Find emails from the client this week and move them to `archive`
- Reply to message id 42 and keep the thread

## Similar
- [Atomic Mail](https://affpapa.org/en/nevibecode/mcp/atomic-mail.md) — MCP server · ★ 264
- [mailbox-mcp](https://affpapa.org/en/nevibecode/mcp/mailbox-mcp.md) — MCP server · ★ 10
- [resend](https://affpapa.org/en/nevibecode/skills/resend.md) — skill · 23400 installs
- [Email (IMAP/SMTP)](https://affpapa.org/en/nevibecode/mcp/email-imapsmtp.md) — MCP server · ★ 13
- [recoup-platform-email-helper](https://affpapa.org/en/nevibecode/skills/recoup-platform-email-helper.md) — skill · 4900 installs
- [cargo-mailbox-management](https://affpapa.org/en/nevibecode/skills/cargo-mailbox-management.md) — skill · 5200 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
