Skip to main content
Glama
yuvi2118

thunderbird-mcp-server

by yuvi2118

thunderbird-mcp-server

An MCP (Model Context Protocol) server that gives AI assistants like Claude the ability to send, read, and search emails directly — no UI automation, no browser extensions, just clean IMAP/SMTP over SSL.

Built for Claude Code, but works with any MCP-compatible client.

What it does

Instead of driving an email client's UI with clicks and keystrokes, this server exposes email operations as structured tools that an AI assistant can call programmatically:

You: "list my recent emails"
Claude Code → calls list_emails() via MCP → IMAP fetch → structured results

Related MCP server: mcp-imap

Tools

Tool

Description

send_email

Send an email with To, Subject, Body, optional CC/BCC

list_emails

List recent emails in any folder (INBOX, Sent, Drafts, etc.)

read_email

Read the full content of a specific email by ID

search_emails

Search emails by subject or sender

list_folders

List all available mail folders

Architecture

┌─────────────┐   stdio (JSON-RPC)   ┌──────────────┐   IMAP/SMTP (SSL)   ┌─────────────┐
│ Claude Code  │ ◄──────────────────► │  server.py   │ ◄────────────────► │ Mail Server  │
│ (MCP Client) │                      │ (MCP Server) │                    │ (any IMAP)   │
└─────────────┘                       └──────────────┘                    └─────────────┘
  • Transport: stdio with JSON-RPC — Claude Code launches the server as a subprocess

  • Reading: IMAP4_SSL (port 993) — encrypted connection, server-side search

  • Sending: SMTP_SSL (port 465) — encrypted, authenticated relay

  • Auth: credentials via environment variables, never hardcoded

Setup

Prerequisites

  • Python 3.9+

  • An IMAP/SMTP email account

1. Clone and install

git clone https://github.com/yuvi2118/thunderbird-mcp-server.git
cd thunderbird-mcp-server
python3 -m venv venv
source venv/bin/activate
pip install "mcp[cli]>=1.0.0"

2. Configure

Copy the example env file and fill in your credentials:

cp .env.example .env
# Edit .env with your email credentials

3. Register with Claude Code

claude mcp add email -s user \
  -e EMAIL_USER=your_username \
  -e EMAIL_PASS=your_password \
  -e EMAIL_IMAP_SERVER=your.mail.server \
  -e EMAIL_SMTP_SERVER=your.mail.server \
  -e "EMAIL_FROM_NAME=Your Name" \
  -- python3 /path/to/thunderbird-mcp-server/server.py

Restart Claude Code. The email tools are now available in every session.

4. Test with MCP Inspector

npx @modelcontextprotocol/inspector -- bash run.sh

Opens a web UI at localhost:6274 where you can call each tool interactively.

Configuration

All configuration is via environment variables:

Variable

Required

Description

EMAIL_USER

Yes

IMAP/SMTP login username

EMAIL_PASS

Yes

IMAP/SMTP login password

EMAIL_IMAP_SERVER

Yes

IMAP server hostname

EMAIL_SMTP_SERVER

Yes

SMTP server hostname

EMAIL_IMAP_PORT

No

IMAP port (default: 993)

EMAIL_SMTP_PORT

No

SMTP port (default: 465)

EMAIL_FROM_NAME

No

Display name in sent emails

EMAIL_FROM_ADDR

No

From address in sent emails

Screenshots

MCP Inspector — listing emails

MCP Inspector listing emails

MCP Inspector — sending email

MCP Inspector sending email

Claude Code — live demo

Claude Code using email tools

Usage examples

Once registered, just talk naturally in Claude Code:

> list my emails
> read email 748
> search emails from "professor name"
> send an email to john@example.com about the meeting tomorrow
> show my sent folder

Tech stack

  • Python — standard library only (imaplib, smtplib, email) + MCP SDK

  • MCP SDK — compatible with both v1 (FastMCP) and v2 (MCPServer)

  • Security — SSL/TLS for all connections, credentials via env vars following 12-factor principles

License

MIT

Maintenance

ActivityMaintained
ResponsivenessNo issues

Resources

Unclaimed servers have limited discoverability.

Looking for Admin?

If you are the server author, to access and configure the admin panel.

Related MCP Connectors

Related MCP Servers

  • A
    license
    A
    quality
    F
    maintenance
    Enables AI assistants to read, search, compose, and send emails by connecting to any IMAP/SMTP provider. It supports comprehensive mailbox management, including draft handling and message deletion, directly through natural language.
    10
    407
    10
    MIT
  • A
    license
    Not graded
    quality
    D
    maintenance
    Enables AI agents to interact with email accounts via IMAP and SMTP, supporting mailbox listing, email search, retrieval, sending, and management.
    MIT
  • A
    license
    B
    quality
    D
    maintenance
    Enables AI assistants to send, read, and manage emails via SMTP and IMAP, with support for attachments, threads, and mailbox organization.
    16
    42
    1
    MIT
  • F
    license
    Not graded
    quality
    D
    maintenance
    Enables AI models to send, receive, search, and manage emails via SMTP/IMAP, including support for attachments, contacts, and advanced search.

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/yuvi2118/thunderbird-mcp-server'

If you have feedback or need assistance with the MCP directory API, please join our Discord server