Thunderbird Cli

io.github.vitalio-sh由 GitHub 帳號 vitalio-sh 發布v1.0.2更新於 Oct 24, 2026

Give AI agents full read/write email access via Mozilla Thunderbird. Zero credentials.

已驗證STDIO僅桌面效率與工作流溝通與協作

概覽

AI 產生的概覽

讓 AI 助理透過本機執行的 Mozilla Thunderbird 讀取、搜尋與撰寫郵件,沿用 Thunderbird 既有帳號,不必另外設定 IMAP 或 SMTP 憑證。

可以做什麼
跨 Thunderbird 帳號搜尋與讀取郵件,可挑選欄位並截斷內文以節省 token。查看未讀數量等帳號統計。撰寫、回覆與轉寄郵件,預設存成草稿。管理資料夾並批次搬移郵件,例如依寄件者與時間封存。將附件下載成本機檔案。
適用情境
適合已用 Thunderbird 管理郵件、希望助理協助篩選、搜尋或起草回覆,而不願交出 IMAP 或 SMTP 憑證的使用者。也適合多帳號收件匣與清理舊郵件。
執行需求
需在桌面環境本機執行,依賴 Node.js:從 npm 安裝 CLI 與 bridge 套件、安裝已簽署的 Thunderbird 擴充套件,並需要 Thunderbird 128 以上版本。bridge 守護程序須保持執行;TB_BRIDGE_HOST 與 TB_BRIDGE_PORT 用來指定其位址,預設為 127.0.0.1 與連接埠 7700。
安裝前請注意
此伺服器對所連結 Thunderbird 帳號中的所有郵件具備讀寫權限,助理可搬移、封存或刪除郵件並建立草稿。永久刪除據稱需要明確的確認參數,撰寫、回覆與轉寄只存成草稿而不直接寄出。郵件內容會暴露給模型,內文與連結存在提示注入風險。bridge 僅監聽本機。

安裝

在 SourceWeft 中

  1. 開啟 儀表板中的 Thunderbird Cli,將其新增到工作區。
  2. 為需要使用其工具的對話啟用該服務。

Desktop only,透過 STDIO。 STDIO 服務會啟動本機處理程序,因此需要 SourceWeft 桌面主機。

其他 MCP 客戶端

參照 儲存庫 中的啟動說明。

README

thunderbird-cli

Give Claude (and other AI agents) full access to your email through Mozilla Thunderbird.

[tests] [License: MIT] [Node] [Thunderbird] [MCP]

[thunderbird-cli demo — Claude answering an email-overview question via MCP]

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 — --fields selection, --compact mode, --max-body truncation
  • 🏠 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

bash
# 1. Install CLI + bridge from npmnpm 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 ittb healthtb stats

Full setup guide (including background service, Docker, troubleshooting): docs/SETUP.md

Usage

bash
# How many unread across all accounts?tb stats
# Find invoices from AWS in the last 30 daystb 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 attachmenttb attachment-download 11 1.2 --output invoice.pdf
# Bulk archive old newsletterstb 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):

json
{  "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/:

bash
# Claude Codecp -r skills/thunderbird-cli ~/.claude/skills/
# Claude.ai — zip and upload via Settings → Capabilities → Skillscd 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

[thunderbird-cli architecture — clients → npm entrypoints → bridge daemon → Thunderbird]

ComponentRole
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

ToolCredentialsAI-agent readyCompose / sendMulti-accountRuntime
thunderbird-clistay in Thunderbird✅ CLI + MCP, JSON out✅ draft / open / send✅ any Thunderbird accountNode.js
Raw IMAP libs (imapflow, imaplib)you manage themyou wire it yourselfSMTP, separatemanual per accountvaries
notmuchvia your MUACLI only, text output❌ reader onlyvia configC
mu / mu4evia your MUACLI only, sexp/text❌ reader onlyvia configC
himalayain config files✅ CLI, JSON out✅✅Rust
mutt / neomuttin muttrc❌ interactive TUI✅via configC

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

DocWhat's inside
docs/SETUP.mdInstallation, background service, Docker, troubleshooting
docs/COMMANDS.mdFull reference for all 38 CLI commands
docs/CLAUDE.mdAI-agent-focused quick reference + security rules
skills/thunderbird-cli/SKILL.mdCompanion Claude Skill — recipes, safety defaults, token patterns
mcp/README.mdClaude Desktop integration guide
AGENTS.mdGuide for AI agents editing this codebase
SPEC.mdFull technical specification
SECURITY.mdThreat model, prompt-injection defenses
CONTRIBUTING.mdDev setup, code style, PR process
CHANGELOG.mdRelease 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

來源:README.md,提交 465613d

工具

0
SourceWeft 尚未在沙箱中啟動過該軟體包,因此其工具未知。

版本歷史

1
  1. v1.0.2最新Sep 16, 2026

評分

已滿足適用檢查項的 50%

該評分衡量此收錄條目的完整程度,依據註冊中心條目、端點與公開來源計算得出。它不是對伺服器本身的評價,也不表示伺服器安全或目前可用:可連通性是帶日期的檢查結果,評分也不包含安裝量或使用者評價。

  • 近 30 天內可連通25 分

    請保持端點能夠回應 MCP 握手;SourceWeft 每 30 天探測一次。

  • 已宣告認證方式10 分

    請在註冊中心條目中宣告憑證請求標頭,或保持端點能夠回應探測,以便判定其認證方式。

  • 已列出工具15 分

    請讓伺服器在無憑證時回應 tools/list,或發布可在沙箱中無憑證啟動的軟體包。

  • 描述必需15 分
  • 圖示10 分
  • 文件15 分
  • 授權條款10 分