protonmail-mcp
Provides tools for managing and interacting with ProtonMail via the local ProtonMail Bridge, including reading, searching, sending, replying to, and forwarding emails, managing labels and folders, and downloading attachments.
Click on "Deploy 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., "@protonmail-mcp search my emails for meeting notes from yesterday"
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.
protonmail-mcp
An MCP (Model Context Protocol) server for ProtonMail, connected through ProtonMail Bridge.
Unlike generic IMAP MCP servers, this connector is Bridge-aware:
Auto-detects a local Bridge install and discovers its IMAP/SMTP ports and TLS certificate.
Verifies TLS against Bridge's own certificate — never
verify=False(enforced by a test that scans the source tree).Understands ProtonMail's model: labels are folders under
Labels/, custom folders live underFolders/, and destructive operations on the virtualAll Mailview are refused with an explanation.Turns every Bridge failure mode into an actionable message: not installed, not running, wrong bridge password, certificate mismatch.
Prerequisites
ProtonMail Bridge installed, running, and logged in (Bridge requires a paid Proton plan).
Python ≥ 3.12, or just
uv— it provisions Python for you.
Related MCP server: Proton Mail MCP Server
Install
# Guided setup: discovers Bridge, writes config, checks the login
uvx protonmail-mcp setup
# Run the MCP server (stdio)
uvx protonmail-mcpMCP client configuration
Claude Code:
claude mcp add protonmail -- uvx protonmail-mcpClaude Desktop (claude_desktop_config.json):
{
"mcpServers": {
"protonmail": {
"command": "uvx",
"args": ["protonmail-mcp"]
}
}
}Configuration
~/.config/protonmail-mcp/config.toml (created by setup, permissions 600):
[[accounts]]
name = "default"
email = "you@proton.me"
display_name = "Your Name"
password = "<bridge password from Bridge → Mailbox details>"
# Optional — only needed when Bridge uses non-default ports:
# imap = { port = 1143 }
# smtp = { port = 1025 }Multiple [[accounts]] blocks are supported; tools take an account
parameter (default "default").
Environment variables configure a single account without a file:
PROTONMAIL_MCP_ADDRESS, PROTONMAIL_MCP_PASSWORD, and optionally
PROTONMAIL_MCP_USERNAME, PROTONMAIL_MCP_ACCOUNT_NAME,
PROTONMAIL_MCP_IMAP_HOST, PROTONMAIL_MCP_IMAP_PORT,
PROTONMAIL_MCP_SMTP_HOST, PROTONMAIL_MCP_SMTP_PORT.
Tools
Reading
Tool | Description |
| List configured accounts (no credentials) |
| Folders with message/unread counts |
| Paginated listing with unread/sender/date filters; |
| Full body, headers, threading ids, attachment metadata |
| Keyword search across subject, sender, and body |
| Conversation reconstruction via Message-ID/References |
| One attachment, base64, capped at 5 MB |
Sending
Tool | Description |
| New email (text or HTML, cc/bcc); Bridge files it into Sent |
| Reply with In-Reply-To/References threading, quoting, reply-all |
| Forward with the original quoted |
| Save to Drafts without sending |
Organisation
Tool | Description |
| Move between folders |
| To Trash by default; permanent only with |
| Read/unread, flagged/unflagged |
| New folder (bare names go under |
ProtonMail labels
Tool | Description |
| Labels (folders under |
| Copy the email into |
| Delete the email's copy from the label folder (located by Message-ID) |
| Manage label folders |
Diagnostics
Tool | Description |
| Bridge install, ports (and how they were discovered), certificate, accounts |
| IMAP + SMTP login and latency per account; structured guidance when Bridge is down |
| Server liveness |
Security
All Bridge connections use STARTTLS, verified against Bridge's own self-signed certificate loaded as the only trust root (certificate pinning). TLS verification is never disabled.
Passwords live in a
chmod 600config file (or env vars) and are never logged; validation errors name keys, not values.Message bodies are never logged at info level or above.
Attachment downloads are capped at 5 MB.
Everything stays on 127.0.0.1 — this server talks only to your local Bridge, never to Proton's servers directly.
Development
uv sync
uv run ruff format --check . && uv run ruff check .
uv run mypy
uv run pytestConventional Commits are required — see CONTRIBUTING.md.
The product requirements, including live-verification results against a
real Bridge v3 install, live in docs/prd.md. The
behavioral reference for Proton label semantics is the sibling
email-mcp TypeScript server.
Bridge v3 notes (verified against a real install):
Port settings live in Bridge's encrypted vault, so discovery falls back to the defaults (1143/1025) with a logged notice; override ports in the config if you changed them in Bridge.
The TLS certificate also lives in the vault and must be exported once: Bridge → Settings → Advanced settings → "Export TLS certificates", saving
cert.pemto~/.config/protonmail-mcp/(or setPROTONMAIL_MCP_CERTto its location). Thesetupwizard walks you through this.
License
LGPL-3.0-or-later — see LICENSE.
Available Tools
23 toolsadd_labelA
Add a ProtonMail label to an email (copies it into the Labels/ folder — that is how Bridge represents labels).
Inputs: uid (required), label (required), account, mailbox. Returns: object
bridge_statusA
Report on the local ProtonMail Bridge: installed, running, ports, certificate, and configured accounts.
Inputs: no named parameters. Returns: object
check_healthA
Check IMAP and SMTP connectivity (with latency) for one account or all of them. Returns guidance instead of failing when Bridge is down.
Inputs: account. Returns: object
create_labelC
Create a new ProtonMail label (a folder under Labels/).
Inputs: name (required), account. Returns: object
create_mailboxB
Create a folder. Bare names are created under ProtonMail's Folders/ namespace; pass an explicit Folders/... or Labels/... path to control placement.
Inputs: name (required), account. Returns: object
delete_emailA
Delete an email: moves it to Trash unless permanent=true. Refused on the virtual All Mail folder.
Inputs: uid (required), account, mailbox, permanent. Returns: object
delete_labelB
Delete a ProtonMail label (removes the Labels/ folder).
Inputs: name (required), account. Returns: object
download_attachmentA
Download one attachment (base64), capped at 5 MB.
Inputs: uid (required), filename (required), account, mailbox. Returns: object
forward_emailC
Forward an email with the original content quoted.
Inputs: to (required), uid (required), body, account, +1 more. Returns: object
get_emailA
Read one email in full: body (text preferred), headers, threading ids, and attachment metadata.
Inputs: uid (required), account, mailbox, mark_seen, +1 more. Returns: object
get_threadA
Reconstruct the conversation thread around an email via its Message-ID / References headers (within the given folder).
Inputs: uid (required), account, mailbox. Returns: object
list_accountsA
List configured ProtonMail accounts (never includes credentials).
Inputs: no named parameters. Returns: result
list_emailsA
List emails in a folder, newest first, with pagination and date/sender/unread filters (dates are ISO YYYY-MM-DD). To list emails carrying a ProtonMail label, pass mailbox="Labels/".
Inputs: limit, since, before, offset, +4 more. Returns: object
list_labelsA
List ProtonMail labels. Labels are IMAP folders under Labels/ — use list_emails with mailbox="Labels/" to see tagged mail.
Inputs: account. Returns: result
list_mailboxesA
List folders with message and unread counts. ProtonMail labels appear as folders under Labels/, custom folders under Folders/.
Inputs: account. Returns: result
mark_emailB
Mark an email read/unread and/or flagged/unflagged.
Inputs: uid (required), read, account, flagged, +1 more. Returns: object
move_emailC
Move an email to another folder.
Inputs: uid (required), destination (required), account, mailbox. Returns: object
pingA
Liveness check — returns "pong" if the server is running.
Inputs: no named parameters. Returns: result
remove_labelA
Remove a ProtonMail label from an email (deletes its copy from the Labels/ folder, located by Message-ID).
Inputs: uid (required), label (required), account, mailbox. Returns: object
reply_emailA
Reply to an email with correct threading (In-Reply-To/References) so the conversation stays intact in ProtonMail.
Inputs: uid (required), body (required), quote, account, +2 more. Returns: object
save_draftA
Save an email as a draft in the Drafts folder without sending.
Inputs: to (required), body (required), subject (required), cc, +2 more. Returns: object
search_emailsB
Search a folder by keyword across subject, sender, and body.
Inputs: query (required), limit, account, mailbox. Returns: object
send_emailB
Send a new email through Bridge. Bridge files it into Sent.
Inputs: to (required), body (required), subject (required), cc, +3 more. Returns: object
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 23 tools
Most tools target distinct actions, but several boundaries blur: list_labels overlaps with list_mailboxes since labels appear as folders, create_mailbox can create labels when passed a Labels/ path, and remove_label vs delete_label could easily be confused. The descriptions help, but an agent still faces real misselection risk.
The vast majority of tools follow a clear verb_noun snake_case pattern: list_emails, send_email, create_label, download_attachment. Exceptions like bridge_status and ping break the pattern slightly, but there is no chaotic mixing of styles.
23 tools is on the heavy side for a single server and falls in the borderline range where each tool must clearly earn its place. Most tools are individually justified for a full email client, but the set feels larger than ideal and could be trimmed by merging health-check or label-related operations.
The tool surface covers the core email lifecycle well: list, get, search, send, reply, forward, draft, move, delete, mark, thread, attachments, folders, and labels. Notable gaps include no way to attach files when sending or replying, and no label rename/update operation, but agents can work around most of these gaps.
Maintenance
Related MCP Connectors
Email infrastructure for AI agents — send, receive, search, and reply to email over MCP.
Email for AI agents: read, search and send from your Gmail, Outlook, Yahoo, iCloud or IMAP inbox.
Connect any IMAP/SMTP mailbox to Claude & ChatGPT: search, read, sort, draft. Sends only with OK.
Email inboxes and calendars for AI agents: send, receive, search, draft and schedule.
Related MCP Servers
- AlicenseAqualityBmaintenanceEnables AI agents to send, read, search, and organize emails via ProtonMail using Proton Bridge. Supports MCP-compatible clients like Claude and Cursor.1820 npm4MIT
- AlicenseNot gradedqualityCmaintenanceEnables AI assistants to send, read, search, and organize email from Proton Mail accounts via SMTP and IMAP.105 npmMIT
- AlicenseNot gradedqualityCmaintenanceEnables AI assistants to send, read, search, and organize Proton Mail email via SMTP and IMAP through the Model Context Protocol.MIT
- AlicenseAqualityCmaintenanceEnables AI assistants to read and search Proton Mail inbox through Proton Mail Bridge, providing tools to list mailboxes, list messages, search messages, and fetch full message bodies. Read-only, with secure certificate pinning.444 npm2MIT