L3DigitalNet/mailbridge-mcp
Self-hosted MCP server bridging Claude.ai to IMAP/SMTP accounts over streamable HTTP.
Platform-specific configuration:
{
"mcpServers": {
"mailbridge-mcp": {
"command": "npx",
"args": [
"-y",
"mailbridge-mcp"
]
}
}
}Add the config above to .claude/settings.json under the mcpServers key.
Self-hosted MCP server that gives Claude.ai read/write access to IMAP/SMTP email accounts over streamable HTTP.
Claude.ai ──HTTPS──> Nginx (Proxmox host) ──HTTP:8765──> mailbridge-mcp (LXC)
├── IMAP/TLS ──> mail servers
└── SMTP/TLS ──> mail serversPython 3.13, FastMCP 3.x, GitHub OAuth (for Claude.ai web access), structlog JSON logging. Runs as a systemd service inside a dedicated Proxmox LXC container (Debian 13 Trixie), proxied through Nginx with TLS.
11 MCP tools spanning read and write operations across multiple email accounts:
| Tool | Description | |------|-------------| | imap_list_accounts | List configured accounts with IDs and labels | | imap_list_folders | List all IMAP folders with message/unread counts | | imap_list_messages | Paginated message summaries (JSON or markdown) | | imap_get_message | Full message content with HTML-to-plaintext, 50K body truncation | | imap_search_messages | Search by text, sender, date range, flags | | imap_get_thread | Thread reconstruction via Message-ID/References headers | | imap_send_email | Compose and send with address validation and rate limiting | | imap_reply | Reply with correct In-Reply-To/References threading | | imap_move_message | Move between folders (COPY + delete pattern) | | imap_delete_message | Move to Trash (auto-detected); never expunges | | imap_set_flags | Mark read/unread, flagged/unflagged |
All tools return structured JSON errors on failure. Attachment content is never returned to the model (metadata only).
git clone https://github.com/L3DigitalNet/mailbridge-mcp.git
cd mailbridge-mcp
uv venv --python 3.13 .venv
source .venv/bin/activate
uv pip install -e ".[dev]"Copy and edit the config files:
cp .env.example .env
cp config/accounts.yaml.example config/accounts.yaml
# EdiLoading reviews...