# thunderbird-cli

Connect an AI agent to email in Mozilla Thunderbird to search messages, read them, and prepare drafts. Mail credentials stay inside Thunderbird.

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

## What it does

thunderbird-cli gives an AI agent MCP access to accounts managed by Mozilla Thunderbird. Its 12 tools support email search and reading, draft replies, and attachment tasks. A bridge connects the MCP server to Thunderbird; the separate CLI also provides commands for folders and bulk operations.

You need Node.js 20 or later, Thunderbird 128+, and the bridge extension. Keep the `tb-bridge` daemon running: the agent cannot reach mail without it. IMAP and SMTP credentials remain in Thunderbird, and the CLI does not store email data. Replies and forwards are saved as drafts; permanent deletion requires `--confirm`.

## Requirements
- Needs: Node.js (commands run via npx)
- Environment variables: `TB_BRIDGE_HOST`, `TB_BRIDGE_PORT` — keys and tokens: ask the human for the values, never commit them or put them in shared files.

## Install

### Claude Code (native platform)

**Platform CLI**
```bash
claude mcp add --env TB_BRIDGE_HOST=<TB_BRIDGE_HOST> --env TB_BRIDGE_PORT=<TB_BRIDGE_PORT> --transport stdio thunderbird-cli -- npx -y thunderbird-cli-mcp
```
Replace <…> with your own values

### Codex

**Platform CLI**
```bash
codex mcp add thunderbird-cli --env TB_BRIDGE_HOST=<TB_BRIDGE_HOST> --env TB_BRIDGE_PORT=<TB_BRIDGE_PORT> -- npx -y thunderbird-cli-mcp
```
Replace <…> with your own values

### Cursor

**Config file**
File `.cursor/mcp.json`:
```json
{
    "mcpServers": {
        "thunderbird-cli": {
            "command": "npx",
            "args": [
                "-y",
                "thunderbird-cli-mcp"
            ],
            "env": {
                "TB_BRIDGE_HOST": "<TB_BRIDGE_HOST>",
                "TB_BRIDGE_PORT": "<TB_BRIDGE_PORT>"
            }
        }
    }
}
```
Replace <…> with your own values

### GitHub Copilot

**Config file**
File `.vscode/mcp.json`:
```json
{
    "servers": {
        "thunderbird-cli": {
            "type": "stdio",
            "command": "npx",
            "args": [
                "-y",
                "thunderbird-cli-mcp"
            ],
            "env": {
                "TB_BRIDGE_HOST": "<TB_BRIDGE_HOST>",
                "TB_BRIDGE_PORT": "<TB_BRIDGE_PORT>"
            }
        }
    }
}
```
Replace <…> with your own values

### Gemini CLI

**Platform CLI**
```bash
gemini mcp add -e TB_BRIDGE_HOST=<TB_BRIDGE_HOST> -e TB_BRIDGE_PORT=<TB_BRIDGE_PORT> thunderbird-cli npx -y thunderbird-cli-mcp
```
Replace <…> with your own values

## When to use it
- search messages by sender and subject
- count unread mail across accounts
- prepare a reply as a draft
- download an attachment from a message
- move older messages to another folder

## Example prompts
- Find invoice emails from AWS from last month.
- Count unread messages across all accounts.
- Draft a reply to message 118 and leave it unsent.

## Similar
- [Excel MCP Server](https://affpapa.org/en/nevibecode/mcp/excel-mcp-server.md) — MCP server · ★ 4259
- [kordoc](https://affpapa.org/en/nevibecode/mcp/kordoc.md) — MCP server · ★ 2726
- [Power BI Authoring MCP Server (Local)](https://affpapa.org/en/nevibecode/mcp/power-bi-authoring-mcp-server-local.md) — MCP server · ★ 1247
- [Microsoft 365 MCP Server](https://affpapa.org/en/nevibecode/mcp/microsoft-365-mcp-server.md) — MCP server · ★ 1074
- [anymd](https://affpapa.org/en/nevibecode/mcp/anymd.md) — MCP server · ★ 1051
- [Docling MCP](https://affpapa.org/en/nevibecode/mcp/docling-mcp.md) — MCP server · ★ 777

---
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
