Thunderbird MCP
Provides comprehensive tools for interacting with Mozilla Thunderbird, enabling AI agents to search and manage emails, compose and send messages, organize mail folders, manage message filters, and handle calendar events and address book contacts.
Click on "Install Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@Thunderbird MCPSearch for recent emails from Sarah about the budget project"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
Thunderbird MCP
Give your AI assistant full access to Thunderbird — search mail, compose messages, manage filters, and organize your inbox. All through the Model Context Protocol.
Inspired by bb1/thunderbird-mcp. Rewritten from scratch with a bundled HTTP server, proper MIME decoding, and UTF-8 handling throughout.
Why?
Thunderbird has no official API for AI tools. Your AI assistant can't read your email, can't help you draft replies, can't organize your inbox. This extension fixes that -- it exposes 32 tools over MCP so any compatible AI (Claude, GPT, local models) can work with your mail the way you'd expect.
Compose tools open a review window before sending. Nothing gets sent without your approval.
How it works
stdio HTTP (localhost:8765-8774)
MCP Client <-----------> Bridge <---------------------> Thunderbird
(Claude, etc.) mcp-bridge.cjs Extension + HTTP ServerThe Thunderbird extension embeds a local HTTP server with session-scoped auth tokens. The Node.js bridge translates between MCP's stdio protocol and HTTP, discovering the port and token automatically via a connection file. The bridge handles MCP lifecycle methods (initialize, ping) locally, so clients can connect even before Thunderbird is fully loaded.
What you can do
Tool | Description |
| List all email accounts and their identities |
| Browse folder tree with message counts — filter by account or subtree |
| Find emails by subject, sender, recipient, date range, tags, or within a specific folder. Supports |
| Read full email content with optional attachment saving -- includes inline CID images |
| Get recent messages with date, unread, and tag filtering. Supports pagination. |
| Mark read/unread, flag/unflag, add/remove tags, move between folders, or trash -- supports bulk via |
| Delete messages -- drafts are safely moved to Trash |
| Create new subfolders to organize your mail |
| Rename an existing mail folder |
| Delete a folder (moves to Trash, or permanently deletes if already in Trash) |
| Move a folder to a new parent within the same account |
Compose
Tool | Description |
| Open a compose window with pre-filled recipients, subject, and body |
| Reply with quoted original and proper threading |
| Forward with all original attachments preserved |
All compose tools open a window for you to review and edit before sending. Attachments can be file paths or inline base64 objects.
Filters
Tool | Description |
| List all filter rules with human-readable conditions and actions |
| Create filters with structured conditions (from, subject, date...) and actions (move, tag, flag...) |
| Modify a filter's name, enabled state, conditions, or actions |
| Remove a filter by index |
| Change filter execution priority |
| Run filters on a folder on demand — let your AI organize your inbox |
Full control over Thunderbird's message filters. Changes persist immediately. Your AI can create sorting rules, adjust priorities, and run them on existing mail.
Contacts
Tool | Description |
| Search contacts across all address books by email or name. Supports |
| Create a new contact in any writable address book |
| Update an existing contact's email, name, or display name |
| Delete a contact by UID |
Calendar
Tool | Description |
| List all calendars with read-only, event, and task support flags |
| Create a calendar event -- opens a review dialog, or set |
| Query events by date range with recurring event expansion |
| Modify an event's title, dates, location, or description |
| Delete a calendar event by ID |
| Open a pre-filled task dialog for review |
Access Control
Tool | Description |
| View which accounts the MCP server can access |
Account and tool access are configured via the extension settings page (Tools > Add-ons > Thunderbird MCP > Options). Access control is not MCP-exposed -- only the user can change it.
Setup
1. Install the extension
git clone https://github.com/TKasperczyk/thunderbird-mcp.gitInstall dist/thunderbird-mcp.xpi in Thunderbird (Tools > Add-ons > Install from File), then restart. A pre-built XPI is included in the repo — no build step needed.
2. Configure your MCP client
Add to your MCP client config (e.g. ~/.claude.json for Claude Code):
{
"mcpServers": {
"thunderbird-mail": {
"command": "node",
"args": ["/absolute/path/to/thunderbird-mcp/mcp-bridge.cjs"]
}
}
}That's it. Your AI can now access Thunderbird.
Security
Auth tokens: The HTTP server requires a session-scoped bearer token. Generated on startup, written to
<TmpD>/thunderbird-mcp/connection.jsonwith 0600 permissions. The bridge reads this automatically.Dynamic port: Tries ports 8765-8774, records the actual port in the connection file. No hardcoded port dependency.
Account access control: Restrict which email accounts are visible to MCP clients via the settings page. Changes take effect immediately.
Tool access control: Disable specific tools via the settings page. Disabled tools are hidden from
tools/listand blocked at dispatch.Localhost only: No remote access. The bridge fails closed -- refuses to forward requests without a valid token.
Troubleshooting
Problem | Fix |
Extension not loading | Check Tools > Add-ons and Themes. Errors: Tools > Developer Tools > Error Console |
Connection refused | Make sure Thunderbird is running and the extension is enabled |
Missing recent emails | IMAP folders can be stale. Click the folder in Thunderbird to sync, or right-click > Properties > Repair Folder |
Tool not found after update | Reconnect MCP ( |
Development
# Build the extension
./scripts/build.sh
# Test via the bridge (handles auth automatically)
echo '{"jsonrpc":"2.0","id":1,"method":"tools/list"}' | node mcp-bridge.cjs
# Test the HTTP API directly (requires auth token from connection file)
TOKEN=$(cat /tmp/thunderbird-mcp/connection.json | jq -r .token)
PORT=$(cat /tmp/thunderbird-mcp/connection.json | jq -r .port)
curl -X POST http://127.0.0.1:$PORT \
-H "Content-Type: application/json" \
-H "Authorization: Bearer $TOKEN" \
-d '{"jsonrpc":"2.0","id":1,"method":"tools/list"}'After changing extension code: remove from Thunderbird, restart, reinstall the XPI, restart again. Thunderbird caches aggressively.
Project structure
thunderbird-mcp/
├── mcp-bridge.cjs # stdio <-> HTTP bridge (auth, port discovery)
├── extension/
│ ├── manifest.json
│ ├── background.js # Extension entry point
│ ├── httpd.sys.mjs # Embedded HTTP server (Mozilla)
│ ├── options.html # Settings page UI
│ ├── options.js # Settings page logic
│ ├── icons/ # Extension icons
│ └── mcp_server/
│ ├── api.js # All 32 MCP tools + auth + access control
│ └── schema.json
├── test/ # Test suite (node:test, zero dependencies)
└── scripts/
├── build.sh
└── install.shKnown issues
IMAP folder databases can be stale until you click on them in Thunderbird
Email bodies with control characters are sanitized to avoid breaking JSON
HTML-only emails are converted to plain text (original formatting is lost)
Recurring calendar event CRUD operates on the series, not individual occurrences
IMAP folder operations (rename, delete, move) are async -- verify with
listFoldersafterCombining tags with move/trash on IMAP may not preserve tags on the moved copy -- use separate calls
Pre-existing Thunderbird filters with cross-account move/copy targets are not restricted by account access control
License
MIT. The bundled httpd.sys.mjs is from Mozilla and licensed under MPL-2.0.
This server cannot be installed
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
Latest Blog Posts
MCP directory API
We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/bitswype/thunderbird-mcp'
If you have feedback or need assistance with the MCP directory API, please join our Discord server