thunderbird-mcp
Enables searching and reading Thunderbird emails locally through MCP, using the mail client's own index for offline, credential-free access.
README
thunderbird-mcp
A read-only MCP server that lets an LLM search and read your Thunderbird email — locally, with no IMAP connection and no credentials.
It works by querying Thunderbird's own full-text index (GLODA, the
global-messages-db.sqlite that Thunderbird already maintains). The server takes
an atomic snapshot of that database and exposes a handful of focused tools to any
MCP client: Claude Desktop, Claude Code, or the Agent SDK.
You: "What did the vendor say about the shipment quote last month?"
LLM: → tb_search(query="shipment quote", since="2024-01-01")
→ tb_thread(conversation_id=…)
"They approved it on Jan 11 and attached po.pdf. Here's the thread…"
Why
Most "email + LLM" integrations log into your IMAP server, re-download everything, and need an app password. This one doesn't move any mail or hold any secret. Thunderbird has already indexed every message you have — including local folders and archived accounts — so the fastest, safest path is to read that index directly.
- No credentials. Nothing to configure, nothing to leak. Read-only by design.
- Offline. Searches your local index; works on a plane.
- Whole history. Every account and local folder Thunderbird knows about, in one place.
- Cross-platform. Auto-detects your profile on Linux, macOS and Windows (including running under WSL against a Windows install).
Tools
| Tool | What it does |
|---|---|
tb_search(query, since, until, from_addr, to_addr, account, folder, limit) |
Full-text + header + date search, newest first |
tb_recent_by_address(email_or_domain, limit) |
Every message to/from a contact or domain |
tb_thread(conversation_id, body_chars) |
A full conversation, oldest first |
tb_get_message(message_id, body_chars) |
One message with its complete body |
tb_folders() |
All folders with per-folder message counts |
tb_list_accounts() |
Configured accounts and their IMAP servers |
tb_stats() |
Total indexed messages and their date range |
Install
Requires Python 3.11+ and a local Thunderbird install.
git clone https://github.com/agimenez-dev/thunderbird-mcp
cd thunderbird-mcp
uv sync # or: pip install -e .
Use with Claude Desktop / Claude Code
Add the server to your MCP config (claude_desktop_config.json, or .mcp.json
for Claude Code):
{
"mcpServers": {
"thunderbird": {
"command": "uv",
"args": ["--directory", "/path/to/thunderbird-mcp", "run", "thunderbird-mcp"]
}
}
}
Restart the client and ask it about your mail.
Configuration
The server auto-detects the default Thunderbird profile. Override it when Thunderbird lives elsewhere — for example, querying a Windows install from WSL:
export THUNDERBIRD_PROFILE="/mnt/c/Users/You/AppData/Roaming/Thunderbird/Profiles/xxxx.default-release"
THUNDERBIRD_PROFILE must point at the profile directory — the folder that
contains global-messages-db.sqlite.
How it works
Thunderbird
└─ <profile>/global-messages-db.sqlite (GLODA full-text index, WAL mode)
│
│ snapshot.py — SQLite online-backup API (read-only + immutable),
│ atomic publish, retries on lock. Refreshes lazily (>15 min old).
▼
~/.cache/thunderbird-mcp/snapshot.sqlite (read-only copy)
│
│ db.py — LIKE queries over messagesText_content
▼
server.py — FastMCP, 7 tools
Two implementation notes worth knowing:
- Why a snapshot? Thunderbird keeps the index open in WAL mode. Reading it
live risks a
database is lockederror or an inconsistent read, so the server copies it with SQLite's online-backup API before querying — never touching the original. - Why
LIKEinstead of FTS? GLODA's full-text table uses a custommozportertokenizer that isn't compiled into a standard Pythonsqlite3. Rather than ship a patched SQLite, the server queries the precomputed text columns GLODA already maintains (c0body,c1subject, …) withLIKE.
What it deliberately does not do
- Send, move, delete or modify mail. Read-only, full stop.
- Touch IMAP or store any credential.
- Re-index. It trusts the index Thunderbird already keeps current.
- Return attachment binaries — only their file names.
Development
uv sync --extra dev
uv run pytest # query + parsing layers are covered without Thunderbird installed
uv run ruff check .
License
MIT — see LICENSE.
推荐服务器
Baidu Map
百度地图核心API现已全面兼容MCP协议,是国内首家兼容MCP协议的地图服务商。
Playwright MCP Server
一个模型上下文协议服务器,它使大型语言模型能够通过结构化的可访问性快照与网页进行交互,而无需视觉模型或屏幕截图。
Magic Component Platform (MCP)
一个由人工智能驱动的工具,可以从自然语言描述生成现代化的用户界面组件,并与流行的集成开发环境(IDE)集成,从而简化用户界面开发流程。
Audiense Insights MCP Server
通过模型上下文协议启用与 Audiense Insights 账户的交互,从而促进营销洞察和受众数据的提取和分析,包括人口统计信息、行为和影响者互动。
VeyraX
一个单一的 MCP 工具,连接你所有喜爱的工具:Gmail、日历以及其他 40 多个工具。
graphlit-mcp-server
模型上下文协议 (MCP) 服务器实现了 MCP 客户端与 Graphlit 服务之间的集成。 除了网络爬取之外,还可以将任何内容(从 Slack 到 Gmail 再到播客订阅源)导入到 Graphlit 项目中,然后从 MCP 客户端检索相关内容。
Kagi MCP Server
一个 MCP 服务器,集成了 Kagi 搜索功能和 Claude AI,使 Claude 能够在回答需要最新信息的问题时执行实时网络搜索。
e2b-mcp-server
使用 MCP 通过 e2b 运行代码。
Neon MCP Server
用于与 Neon 管理 API 和数据库交互的 MCP 服务器
Exa MCP Server
模型上下文协议(MCP)服务器允许像 Claude 这样的 AI 助手使用 Exa AI 搜索 API 进行网络搜索。这种设置允许 AI 模型以安全和受控的方式获取实时的网络信息。