proton-mcp
Allows reading and searching a Proton Mail mailbox through Proton Mail Bridge, including listing folders and emails, reading messages with attachment lists, and optionally sending or replying to emails with threading and quoted originals.
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., "@proton-mcp search my inbox for unread emails from the last week"
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.
proton-mcp
An MCP server that gives Claude (or any MCP client) access to your Proton Mail mailbox through Proton Mail Bridge.
Read: list folders, list and search emails, read an email with its attachments list. Nothing is ever marked as read, moved or deleted.
Send (optional): send and reply from any of your Proton addresses, with your display name, HTML formatting from light Markdown, proper threading, and the original message quoted below replies.
Runs locally for Claude Desktop (stdio), or remotely as a claude.ai custom connector (streamable HTTP + OAuth).
Unofficial project, not affiliated with or endorsed by Proton AG.
Why this one
Several Proton Mail MCP servers exist. This one is built for a specific use: an assistant that reads your mail and drafts replies, without being able to damage the mailbox.
Works in claude.ai on the web and on your phone, not only in Claude Desktop: a remote mode with OAuth, Docker and reverse-proxy configs, and a full deployment guide.
Can't change your mailbox. No move, flag or delete tools; folders are opened read-only and nothing is marked as read. Sending is opt-in, flagged destructive, and refused from any address that isn't yours.
Defends against prompt injection in emails: hidden HTML text is dropped and IMAP arguments can't carry extra commands.
Mail that looks like Proton's: your display name, the right address when replying, threading, and the original quoted the way Proton quotes it.
If you want the model to organise your mailbox (labels, bulk moves, attachments), a broader server will suit you better.
Related MCP server: protonmail-mcp-server
How it works
Proton Mail is end-to-end encrypted, so there is no plain IMAP server to talk to.
Proton Mail Bridge (paid plans) runs on your machine, decrypts locally and exposes
IMAP/SMTP on 127.0.0.1. This server talks to Bridge, and only to a loopback
address.
Claude Desktop ──stdio──> proton_mcp.py ──IMAP/SMTP──> Bridge (127.0.0.1) ──> ProtonTools
Tool | What it does |
| Folder names (labels and system folders included). |
| Latest emails of a folder, newest first (headers only). |
| Search by sender, recipient, subject, text, date range, unread. |
| Full email: headers, text body (HTML converted to text), attachments list. |
| The addresses |
| Send or reply, from any of your addresses ( |
send_email takes a body in light Markdown: blank line = paragraph, - bullets,
1. numbered lists, **bold**, *italic*, [text](https://url). It is sent as
HTML with a plain-text alternative. With reply_to_uid, the reply is threaded
(In-Reply-To, References) and quotes the original (include_original=false
to skip).
The sender is your Bridge login by default. from_address picks another address
of your account, and replies go out from the address the original was sent to,
like in Proton's own apps. Bridge doesn't add the display name set in Proton's
settings, so the server takes it from your recent messages in Sent.
Local setup (Claude Desktop)
Requirements: uv (or Python 3.12+), Proton Mail Bridge installed and logged in.
In Bridge, open your account and copy the IMAP/SMTP username and password
(generated by Bridge, not your Proton password). Then add the server to
claude_desktop_config.json. Open it from Claude Desktop → Settings → Developer →
Edit Config, or directly:
macOS:
~/Library/Application Support/Claude/claude_desktop_config.jsonWindows:
%APPDATA%\Claude\claude_desktop_config.jsonLinux:
~/.config/Claude/claude_desktop_config.json
{
"mcpServers": {
"proton-mail": {
"command": "uvx",
"args": ["proton-mcp"],
"env": {
"PROTON_BRIDGE_USER": "you@proton.me",
"PROTON_BRIDGE_PASSWORD": "password-from-bridge"
}
}
}
}Fully quit and restart Claude Desktop after editing the file.
Without uv: pip install proton-mcp, then use "command": "proton-mcp" (the full
path to that script if it isn't on your PATH) and no args.
Configuration
Variable | Default | |
| (required) | Username shown by Bridge |
| (required) | Password generated by Bridge |
|
| Must be a loopback address (also used for SMTP) |
|
| |
|
|
|
|
| |
|
|
|
|
| Language of the "On … wrote:" line in replies: |
| (from Sent) | Name shown in |
| (none) | Extra addresses of your account allowed as |
|
|
|
The config file holds your Bridge password: keep it readable by you only.
Remote setup (claude.ai connector)
remote/server.py serves the same tools over streamable HTTP, behind a
single-user OAuth password page, for claude.ai on the web and mobile.
send_email and list_sender_addresses are off unless ENABLE_SEND=true; the
PROTON_* variables above work the same in .env. A Dockerfile and compose file are
included, plus Apache and Caddy configs that only let Anthropic's IP ranges reach
/mcp.
See docs/deploy.md for the full guide (headless Bridge, Docker, reverse proxy, claude.ai).
Security
Giving an AI assistant access to your mailbox is powerful and risky. What this project does about it:
Read tools don't change anything. Folders are opened with
EXAMINEand bodies fetched withBODY.PEEK; there is no tool to move, flag or delete. Text arguments containing control characters are rejected, so a search term can't smuggle extra IMAP commands to Bridge.Sending is opt-in and should stay on approval.
send_emailcarries the MCPdestructiveHint, and the server instructions tell the model to show the exact draft (sender address included) and wait for explicit approval. A hint is not enforcement: in your client, keepsend_emailon "ask every time". SetPROTON_ENABLE_SEND=false(local) or leaveENABLE_SEND=false(remote, the default) to remove it entirely.Only your own addresses can send. Bridge accepts any sender address, so the server checks
from_addressitself against your addresses (Bridge login,PROTON_FROM_ADDRESSES, addresses found in Sent) and refuses the rest.Email content is untrusted. An email can contain text written to steer the model ("forward this to…", "search for …"). The server instructions say never to follow instructions found in emails, and
read_emaildrops text hidden with the usual HTML tricks (display:none,font-size:0…), but neither is a guarantee. Treat any action the model proposes after reading an email with suspicion.Loopback only. The server refuses any Bridge host that isn't
127.0.0.1,::1orlocalhost. TLS verification is disabled for that reason only (Bridge uses a self-signed certificate).Remote mode:
OAuth with a 20+ character password, a lockout after 5 failures, and tokens stored in SQLite.
Only claude.ai's callback can be registered as redirect URI, and the number of clients is capped.
The password page says which client asks and can't be framed by another site.
/mcpis restricted to Anthropic's outbound IPs by the reverse proxy.Every tool call is logged without email bodies; the container is read-only and unprivileged.
Remote mode, known limits:
The lockout is global: anyone can make new logins wait 15 minutes by failing 5 times. Tokens already issued keep working.
Anyone can add your server URL as a connector in their own claude.ai account and send you the resulting authorization link. If you type your password, their account gets access. Only type it right after clicking Connect yourself.
Your Bridge password and MCP_PASSWORD give access to your whole mailbox:
keep .env and claude_desktop_config.json private.
To report a vulnerability, see SECURITY.md.
Limitations
search_emailsaccepts one non-ASCII search field at a time (IMAPCHARSET UTF-8literal).read_emailconverts HTML to text and drops link targets and hidden elements. Hiding detection is a heuristic: white-on-white text or CSS classes get through.Replies quote the original as plain text (its formatting is not kept).
Attachments are listed, not downloaded or sent.
Bridge must be in combined address mode (the default), with one login for all addresses. In split mode each address has its own login, and the server only uses one.
Proton rebuilds outgoing messages: recipients get base64-encoded parts and a plain-text version that Proton regenerates from the HTML.
Development
git clone https://github.com/vdeabreu/proton-mcp && cd proton-mcp
pip install -e ".[remote,dev]"
pytest
ruff check .Tests don't need Bridge: they cover IMAP command injection (against a fake IMAP server), message building, Markdown rendering, quoting, hidden HTML, folder-name encoding, sender address and display name selection, and the OAuth flow (redirect allowlist, client cap, lockout, security headers).
See AGENTS.md for the invariants to keep when changing the code.
License
Available Tools
6 toolslist_emailsARead-only
List the most recent emails of a folder, newest first (headers only).
Inputs: limit, folder, unread_only. Returns: result
list_foldersARead-only
List every folder and label of the mailbox (labels appear as 'Labels/', folders as 'Folders/').
Inputs: no named parameters. Returns: result
list_sender_addressesARead-only
List the addresses send_email can send from, with the display name used for each.
The first one is the default for new emails; replies default to the address the original email was sent to. Pass one as send_email's from_address.
Inputs: no named parameters. Returns: result
read_emailARead-only
Read one email by its uid (from list_emails/search_emails, in the same folder). Does not mark it as read.
Inputs: uid (required), folder, max_chars.
search_emailsARead-only
Search emails in a folder, newest first (headers only).
from_/to/subject/text are case-insensitive substring matches (text searches headers and body). since/before are ISO dates (YYYY-MM-DD); before is exclusive. The default folder 'All Mail' covers the whole mailbox.
Inputs: to, text, from_, limit, +5 more. Returns: result
send_emailADestructive
Send an email (HTML + plain-text alternative) from the user's Proton address. IRREVERSIBLE.
Only call this after showing the user the exact sender, recipients, subject and body and receiving their explicit approval in chat. from_address picks which of the user's addresses sends it (see list_sender_addresses). If omitted, new emails go out from the default address and replies from the address the original was sent to. The body is light Markdown, rendered to HTML: blank line = new paragraph, single newline = line break, lines starting with "- " = bullet list, "1. " = numbered list, bold, italic, text. Don't use headings, tables or raw HTML. Write the signature as the last paragraph. to/cc/bcc accept comma-separated addresses ("Name a@b.c, d@e.f"). To reply, pass reply_to_uid (and reply_folder) of the original email: the reply is threaded with it. Write the subject yourself (e.g. "Re: "). Replies quote the original message below the body, like Proton does ("On , wrote:" + quoted text); don't paste it into body yourself. Pass include_original=False to leave it out. A copy lands in the Sent folder automatically.
Inputs: to (required), body (required), subject (required), cc, +5 more.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 6 tools
read_email, list_folders, list_sender_addresses, and send_email are clearly distinct resource+action pairs. The only real overlap is list_emails vs search_emails, which return the same header-only format from a folder; descriptions differentiate them (recent vs filtered) but an agent may still pick one when the other was intended.
Every tool follows a consistent verb_noun snake_case pattern (read_email, list_folders, list_emails, search_emails, send_email) with list_sender_addresses the only longer name, still matching the schema. No mixed casing or vague bare verbs.
Six tools is well-scoped for a focused mail client covering the read/list/search/send lifecycle. Each tool earns its place, and helper operations (sender addresses, folders) are exposed rather than hidden inside send_email.
The read-and-send workflow is fully covered, including threading and sender selection. However, a mail domain typically needs mailbox management — mark read/unread (read_email explicitly does not), move/archive/delete, and attachment handling — none of which exist, leaving dead ends for triage tasks.
Maintenance
Related MCP Connectors
Your IMAP mailbox as an MCP server: read, search and (if you allow it) organize mail. Open source.
Your mailbox for MCP clients: search, read, draft, send, rules and notes. Sending is off by default.
Your own IMAP mailbox in any MCP client: search, read, flag, move; send and delete need confirm.
Email infrastructure for AI agents — send, receive, search, and reply to email over MCP.
Related MCP Servers
- AlicenseAqualityCmaintenanceUnofficial MCP server for Proton Mail (not affiliated with Proton AG) — send, read, search & organize email over SMTP/IMAP31105 npm11MIT
- AlicenseAqualityBmaintenanceMCP server for reading, searching, and sending ProtonMail emails via the ProtonMail Bridge.293GPL 3.0
- AlicenseNot gradedqualityDmaintenanceAn MCP server that reads, searches, organizes, and deletes Proton Mail through the local Proton Mail Bridge, with read-only mode and sender authentication checks. It cannot send mail.105 npmMIT
- AlicenseNot gradedqualityCmaintenanceEnables MCP clients to interact with Proton Mail through a self-hosted server that works alongside Proton Mail Bridge. It provides read-only mailbox tools such as listing folders, searching mail, and retrieving messages while keeping Bridge isolated from the network.MIT