npm thunderbird-cli-mcpstdioMITupdated 1mo ago
Give Claude (and other AI agents) full access to your email through Mozilla Thunderbird.
Was kannst du mit thunderbird cli machen?
thunderbird-cli
Give Claude (and other AI agents) full access to your email through Mozilla Thunderbird.
Why
IMAP libraries force you to manage credentials, OAuth flows, and sync state â dangerous in an AI-agent context. Thunderbird already solves all of that. This tool treats Thunderbird as the source of truth and exposes every capability as a CLI command or MCP tool, so AI agents can read, search, and write email without ever touching a password.
Tested at scale: 22 accounts, 249,000+ messages, 86,000+ unread â all managed live through a single CLI.
Features
- đ Zero credential exposure â all IMAP/SMTP stays in Thunderbird
- đ€ Claude Desktop ready â 12 MCP tools, one-line config
- đš 38 CLI commands â read, search, compose, reply, bulk ops, folder CRUD, attachments
- đĄïž Safe by default â compose/reply/forward save as drafts; permanent delete requires
--confirm - đŻ Token-optimized â
--fieldsselection,--compactmode,--max-bodytruncation - đ Localhost-only â no cloud, no telemetry, nothing leaves your machine
- â Thunderbird 128+ â signed and approved on addons.thunderbird.net
- đ§Ș 80 tests â 46 CLI/bridge + 34 MCP integration tests
Quick Start
# 1. Install CLI + bridge from npm
npm install -g thunderbird-cli thunderbird-cli-bridge
# 2. Install the signed Thunderbird extension
# Download: https://github.com/vitalio-sh/thunderbird-cli/releases/latest
# Thunderbird â Add-ons â â â Install Add-on From File⊠â thunderbird_ai_bridge-*.xpi
# 3. Start the bridge daemon (keep running)
tb-bridge
# 4. Try it
tb health
tb stats
Full setup guide (including background service, Docker, troubleshooting): docs/SETUP.md
Usage
# How many unread across all accounts?
tb stats
# Find invoices from AWS in the last 30 days
tb search "invoice" --from aws --since 30d --fields id,author,subject,date
# Read a message (token-efficient â headers + text only, max 500 chars)
tb read 89900 --max-body 500
# Reply as draft (never auto-sends)
tb reply 89900 --body "Thanks, I'll review tomorrow"
# Download a PDF attachment
tb attachment-download 11 1.2 --output invoice.pdf
# Bulk archive old newsletters
tb bulk move "account1://INBOX" "account1://Archive" \
--from "newsletter@" --older-than 30
Full command reference: docs/COMMANDS.md
Use with Claude Desktop
Add to your Claude Desktop config (~/Library/Application Support/Claude/claude_desktop_config.json on macOS):
{
"mcpServers": {
"thunderbird": {
"command": "npx",
"args": ["-y", "thunderbird-cli-mcp"]
}
}
}
Restart Claude Desktop. Now ask:
"How many unread emails do I have?" "Find invoices from AWS last month" "Reply to message 118 saying I'll attend â save as draft" "Download the PDF attachment from message 245"
Full MCP guide: mcp/README.md
Companion skill for Claude
A Claude Skill ships alongside the MCP server. It teaches Claude how to use the 12 email tools well â token-efficient field selection, draft-by-default safety, trust-metadata checking before acting on links, recipes for common workflows. Install it from skills/thunderbird-cli/:
# Claude Code
cp -r skills/thunderbird-cli ~/.claude/skills/
# Claude.ai â zip and upload via Settings â Capabilities â Skills
cd skills && zip -r thunderbird-cli.zip thunderbird-cli
Without the skill, the MCP still works. With it, Claude automatically uses the safest defaults and most efficient response shapes.
How It Works
| Component | Role |
|---|---|
Extension (extension/) |
Thunderbird WebExtension. Calls messenger.* APIs. 43 route handlers. |
Bridge (bridge/) |
Stateless HTTPâWebSocket proxy daemon. No business logic. |
CLI (cli/) |
tb command â 38 commands. Thin HTTP client. JSON output. |
MCP (mcp/) |
tb-mcp server â 12 curated tools for Claude Desktop. |
Thunderbird is the source of truth. The CLI never caches or stores email data.
How this compares
| Tool | Credentials | AI-agent ready | Compose / send | Multi-account | Runtime |
|---|---|---|---|---|---|
| thunderbird-cli | stay in Thunderbird | â CLI + MCP, JSON out | â draft / open / send | â any Thunderbird account | Node.js |
| Raw IMAP libs (imapflow, imaplib) | you manage them | you wire it yourself | SMTP, separate | manual per account | varies |
| notmuch | via your MUA | CLI only, text output | â reader only | via config | C |
| mu / mu4e | via your MUA | CLI only, sexp/text | â reader only | via config | C |
| himalaya | in config files | â CLI, JSON out | â | â | Rust |
| mutt / neomutt | in muttrc | â interactive TUI | â | via config | C |
The niche: you already trust Thunderbird with your credentials and account state. This tool surfaces that as a machine-readable API without asking you to re-configure IMAP/SMTP anywhere else.
Documentation
| Doc | What's inside |
|---|---|
| docs/SETUP.md | Installation, background service, Docker, troubleshooting |
| docs/COMMANDS.md | Full reference for all 38 CLI commands |
| docs/CLAUDE.md | AI-agent-focused quick reference + security rules |
| skills/thunderbird-cli/SKILL.md | Companion Claude Skill â recipes, safety defaults, token patterns |
| mcp/README.md | Claude Desktop integration guide |
| AGENTS.md | Guide for AI agents editing this codebase |
| SPEC.md | Full technical specification |
| SECURITY.md | Threat model, prompt-injection defenses |
| CONTRIBUTING.md | Dev setup, code style, PR process |
| CHANGELOG.md | Release notes |
Contributing
Contributions welcome. Please open an issue first to discuss non-trivial changes. See CONTRIBUTING.md for local dev setup and the 80-test suite.
License
MIT â see LICENSE
Installation
thunderbird cli zu deinem Client hinzufĂŒgen. WĂ€hl den, den du nutzt.
claude mcp add thunderbird-cli-mcp -- npx -y thunderbird-cli-mcpcodex mcp add thunderbird-cli-mcp -- npx -y thunderbird-cli-mcpamp mcp add thunderbird-cli-mcp -- npx -y thunderbird-cli-mcp{
"mcpServers": {
"thunderbird-cli-mcp": {
"command": "npx",
"args": [
"-y",
"thunderbird-cli-mcp"
]
}
}
}Add to `claude_desktop_config.json`, then restart Claude Desktop.
{
"mcpServers": {
"thunderbird-cli-mcp": {
"command": "npx",
"args": [
"-y",
"thunderbird-cli-mcp"
]
}
}
}Add to `~/.cursor/mcp.json`, or `.cursor/mcp.json` for a single project.
code --add-mcp '{"name":"thunderbird-cli-mcp","command":"npx","args":["-y","thunderbird-cli-mcp"]}'Or add the block manually to `.vscode/mcp.json` under `servers`.
{
"mcpServers": {
"thunderbird-cli-mcp": {
"command": "npx",
"args": [
"-y",
"thunderbird-cli-mcp"
]
}
}
}Add to `~/.codeium/windsurf/mcp_config.json`.
{
"mcpServers": {
"thunderbird-cli-mcp": {
"command": "npx",
"args": [
"-y",
"thunderbird-cli-mcp"
]
}
}
}Add to `cline_mcp_settings.json` via the MCP Servers panel.
{
"mcpServers": {
"thunderbird-cli-mcp": {
"command": "npx",
"args": [
"-y",
"thunderbird-cli-mcp"
]
}
}
}Add to `~/.gemini/settings.json`.
{
"mcpServers": {
"thunderbird-cli-mcp": {
"type": "local",
"command": "npx",
"args": [
"-y",
"thunderbird-cli-mcp"
],
"tools": [
"*"
]
}
}
}Add to `~/.copilot/mcp-config.json`, or run `/mcp add` inside the CLI.
{
"context_servers": {
"thunderbird-cli-mcp": {
"command": {
"path": "npx",
"args": [
"-y",
"thunderbird-cli-mcp"
]
}
}
}
}Add to your Zed `settings.json`.
npx -y thunderbird-cli-mcpRun `goose configure`, choose **Add Extension â Command-line Extension**, and paste this command.
Score
39 / 100
UnvollstÀndig
- Dokumentation25/25
- Pflege19/25
- Vertrauen13/20
- Funktionsumfang0/15
- Installation12/15
- Documents what it does and how to connect
- Has a resolvable package or endpoint
- Exposes at least one tool, prompt or resource
- README has substantive content
- Includes a code example
- Documents its configuration
- Mentions credentials or security posture
- Last commit 28 days ago
- Has a release history
- Repository is not archived
- Licensed MIT
- Namespace verified in the official MCP registry
- Claimed by its owner
- Published under an organisation
- 0 tool(s) documented
- Provides prompt templates
- Provides resources
- 12 documented install method(s)
- Published to a package registry
- Offers a hosted endpoint â no local install
Versionsverlauf
| Versionen | Veröffentlicht |
|---|---|
| 1.0.2Aktuell | 18. Apr. 2026 |