Server data from the Official MCP Registry
Unofficial Proton Mail MCP — send, read, search & organize email over SMTP and IMAP
About
Unofficial Proton Mail MCP — send, read, search & organize email over SMTP and IMAP
Security Report
The Proton Mail MCP server uses Bridge credentials from environment variables and connects only to the locally run Bridge or Proton's SMTP submission endpoint, which matches its email purpose. The visible code shows path-allowlisting for attachments and downloads, HTML sanitization on by default, and outbound safety locks. The main caveats are inherent to an email tool: an AI agent can send mail and move or delete messages, and the provided source is truncated, so not every module could be reviewed. Supply chain analysis found 6 known vulnerabilities in dependencies (0 critical, 1 high severity). Package verification found 1 issue.
3 files analyzed · 11 issues found
Security scores are indicators to help you make informed decisions, not guarantees. Always review permissions before connecting any MCP server.
What You'll Need
Set these up before or after installing:
Environment variable: PROTONMAIL_USERNAME
Environment variable: PROTONMAIL_PASSWORD
Environment variable: PROTONMAIL_PASSWORD_FILE
Environment variable: PROTONMAIL_PASSWORD_COMMAND
Environment variable: PROTONMAIL_HOST
Environment variable: PROTONMAIL_PORT
Environment variable: PROTONMAIL_SECURE
Environment variable: IMAP_HOST
Environment variable: IMAP_PORT
Environment variable: IMAP_SECURE
Environment variable: IMAP_USERNAME
Environment variable: IMAP_PASSWORD
Environment variable: READONLY
Environment variable: RESTRICT_OUTBOUND_TO_SELF
Environment variable: ALLOW_FILE_DOWNLOAD_DIR
Environment variable: ALLOW_FILE_ATTACH_DIR
Environment variable: ALLOW_EMPTY_FOLDER
Environment variable: DEBUG
How to Install
Add this to your MCP configuration file:
{
"mcpServers": {
"proton-mail-mcp": {
"command": "npx",
"args": [
"-y",
"proton-mail-mcp@2.0.1"
],
"env": {
"DEBUG": "your-debug-here",
"READONLY": "your-readonly-here",
"IMAP_HOST": "your-imap-host-here",
"IMAP_PORT": "your-imap-port-here",
"IMAP_SECURE": "your-imap-secure-here",
"IMAP_PASSWORD": "your-imap-password-here",
"IMAP_USERNAME": "your-imap-username-here",
"PROTONMAIL_HOST": "your-protonmail-host-here",
"PROTONMAIL_PORT": "your-protonmail-port-here",
"PROTONMAIL_SECURE": "your-protonmail-secure-here",
"ALLOW_EMPTY_FOLDER": "your-allow-empty-folder-here",
"PROTONMAIL_PASSWORD": "your-protonmail-password-here",
"PROTONMAIL_USERNAME": "your-protonmail-username-here",
"ALLOW_FILE_ATTACH_DIR": "your-allow-file-attach-dir-here",
"ALLOW_FILE_DOWNLOAD_DIR": "your-allow-file-download-dir-here",
"PROTONMAIL_PASSWORD_FILE": "your-protonmail-password-file-here",
"RESTRICT_OUTBOUND_TO_SELF": "your-restrict-outbound-to-self-here",
"PROTONMAIL_PASSWORD_COMMAND": "your-protonmail-password-command-here"
}
}
}
}Some servers take additional arguments. See the repository for details.
Documentation
View on GitHubFrom the project's GitHub README.
Proton Mail MCP Server
A Model Context Protocol (MCP) server that gives AI assistants full access to your Proton Mail account -- send, read, search, and organize email over SMTP and IMAP.
⚠️ Unofficial — not affiliated with Proton. This is an independent, community-built project. It is not developed, endorsed, sponsored, or supported by Proton AG. "Proton", "Proton Mail", and "Proton Mail Bridge" are trademarks of Proton AG, used here only to describe interoperability. It talks to Proton Mail through the locally-run Proton Mail Bridge (or, for sending, optionally Proton's standard SMTP submission endpoint); no Proton private API is used. Use at your own risk.
Upgrading from 1.x? 2.0 sends mail through Bridge by default and changes a few tool behaviours. Run
npx -y proton-mail-mcp@2 migrateto see what affects your configs, and read MIGRATION.md.
Demo

Features
- Send, reply, and forward email through Bridge with threading headers; dedicated
reply_all_emailtool; recipients asa@x,Name <a@x>or"Doe, Jane" <a@x>, separated by commas or semicolons - Drafts --
save_draft,saveAsDrafton replies and forwards for review, andsend_draftto send one later - Markdown bodies -- pass
markdownBodytosend_email/reply_email/reply_all_email/forward_email; rendered to HTML - Read email via IMAP through Proton Mail Bridge
- Attachments -- send files as base64 or by path from a folder you allow (
ALLOW_FILE_ATTACH_DIR), download to memory or to disk (saveTo+ALLOW_FILE_DOWNLOAD_DIR), forward a subset by part number - Search messages by sender, recipient, subject, body, date, flags, size, List-ID, attachment presence, attachment name (substring), and attachment MIME type
- Organize -- move, delete, and flag/unflag messages individually or in bulk; bulk-update labels too
- Bulk operations --
bulk_move,bulk_delete,bulk_update_flags,bulk_update_labelswithdryRunpreview and XOR uid/match input - Folder & label management --
create_folder,create_label,rename_folder,delete_folder(non-destructive on Proton);empty_folder(opt-in viaALLOW_EMPTY_FOLDER=true; not recommended) - Labeling --
update_message_labelsadds and removes Proton labels on a message (additive — message stays in its source folder) - Aggregations --
count_messages,folder_stats,top_senders(withexcludeSelf+ per-row direction) for inbox analytics - Thread mutations --
move_thread,delete_thread,flag_threadwith optional cross-folder walk;get_threaddedupes by Message-ID across mailbox copies - Snippets -- optional
includeSnippetonlist_messagesandsearch_messagesfor at-a-glance previews - List folders with message and unread counts; folder names resolve forgivingly (
sent,WorkforFolders/Work) with "did you mean" suggestions - Diagnostics --
check_connection/proton-mail-mcp doctorsay which port, TLS setting or password is wrong - Honest accounting -- post-STORE FETCH verify on flags/labels surfaces silently-dropped operations as
notApplied; sent-copy lookup confirms the send without holding the call (pendingwhen Proton hasn't filed the copy yet); Reply-To rewrites are surfaced in the send response - Safety first -- delete moves to Trash by default (via special-use resolver), read-only mode via
READONLY=true,dryRunon all bulk ops, MCP tool annotations for client-side confirmation prompts, path-traversal defense on filesystem-touching tools - Security hardened -- input validation, credential sanitization, rate limiting (10 sends a minute, at most 50 recipients a message), attachment size limits
- Works with any MCP-compatible client (Claude Desktop, Claude Code, Cursor, etc.)
Prerequisites
- Node.js v24+
- A Proton Mail account
- Proton Mail Bridge running locally. The server reads, searches and sends through it, using the Bridge password from Bridge's mailbox details. (To send through Proton's SMTP submission service instead, set
PROTONMAIL_HOST=smtp.protonmail.ch,PROTONMAIL_PORT=587and its SMTP token as the password; reading still needs Bridge.)
Quick Start
Claude Desktop: install the bundle
The server is also packaged as an MCP Bundle (.mcpb). With a bundle, Claude Desktop installs the server and shows a settings form for your address, Bridge password and ports, so there is no JSON to edit.
- Download
proton-mail-mcp-<version>.mcpbfrom the Releases page. Or build it from a clone withnpm install && npm run build && npm run mcpb:pack; it is written todist/. - Double-click the file, or drag it into Claude Desktop's Settings → Extensions.
- Fill in the settings from Proton Mail Bridge's mailbox details: your address, the Bridge password, and the IMAP port and SMTP port. If Bridge shows SSL for a protocol, turn on IMAP uses SSL or SMTP uses SSL (
IMAP_SECURE/PROTONMAIL_SECURE). The hosts already point at Bridge (127.0.0.1).
If something doesn't connect, ask Claude to run check_connection.
Add to your MCP client
Add the following to your client's MCP server configuration (Claude Desktop, Claude Code, Cursor, etc.):
{
"mcpServers": {
"protonmail": {
"command": "npx",
"args": ["-y", "proton-mail-mcp"],
"env": {
"PROTONMAIL_USERNAME": "your-email@protonmail.com",
"PROTONMAIL_PASSWORD": "your-bridge-password"
}
}
}
}
That's it — npx will download and run the server automatically. It connects to Bridge on its default ports (IMAP 1143, SMTP 1025, both STARTTLS). If Bridge shows other ports or SSL in its mailbox details, add IMAP_PORT / PROTONMAIL_PORT (and IMAP_SECURE / PROTONMAIL_SECURE); proton-mail-mcp doctor --print-config works them out for you. See Configuration for all available environment variables.
Install from source
If you prefer to run from a local clone:
git clone https://github.com/sethbang/proton-mail-mcp.git
cd proton-mail-mcp
npm install
npm run build
Then use this MCP config instead:
{
"mcpServers": {
"protonmail": {
"command": "node",
"args": ["/absolute/path/to/proton-mail-mcp/build/index.js"],
"env": {
"PROTONMAIL_USERNAME": "your-email@protonmail.com",
"PROTONMAIL_PASSWORD": "your-bridge-password"
}
}
}
}
Tools
Sending
All send tools return the Message-ID of the sent message in their response. The five send tools (send_email, reply_email, reply_all_email, forward_email, send_draft) then look for the sent copy in the resolved \Sent folder and lead the response with a machine-parseable token: [sent-copy:verified] (found, with a Sent copy UID: N in Sent clause), or [sent-copy:pending] when it hasn't appeared within about 5 s. Proton can take 30 s or more to file it, and SMTP accepting the message is what counts, so the call doesn't wait for it. Pass verifySent: "wait" to look for up to about 30 s instead; a miss then reports [sent-copy:unverified]. None of the three means the send failed: every send result also carries smtp:accepted right after the sent-copy token, e.g. [sent-copy:pending smtp:accepted]. To confirm a pending copy later, call get_thread with the Message-ID. When replyTo was requested, [reply-to:preserved|rewritten|stripped|pending|unverified] reports whether Proton kept it.
🛡️ HTML sanitization defaults to ON. Send / reply / forward / save_draft tools strip
<script>, event handlers, inlinestyleattributes, and remote<img>beacons via a conservative allowlist before delivery. PasssanitizeHtml: falseto preserve full-fidelity HTML for trusted-content workflows. The success response notes when sanitization ran.⚠️ Display-name spoofing partially defended.
fromNamerejects values containing@by default — without this guard, afromNamelike"Anthropic Security <security@anthropic.com>"reaches the wire asAnthropic Security security@anthropic.comafter angle-bracket sanitization, which mail clients render as a forged sender. PassallowAddressLikeFromName: trueto override for legitimate product names. SMTP itself still prevents address-level spoofing (the envelopeFrom:is bound to your authenticated identity), and arbitrary display names without@are still allowed (e.g."CEO of Acme") — treatfromNamelike any other user-controllable string.
All send/reply/forward/save_draft tools accept an alternative markdownBody parameter (rendered to HTML via marked) — mutually exclusive with body+isHtml. sanitizeHtml applies after Markdown rendering.
🛡️ Outbound preview + self-only lock.
send_email,reply_email,reply_all_email,forward_emailandsend_draftacceptdryRun: true— it runs all validation and resolves the complete recipient set (To/CC/BCC, including the reply-all fan-out) and returns it without sending, leading with an[outbound:*]token and an explicit list of any external (non-self) recipients. Use it to confirm exactly who would receive the mail before a live call. For throwaway/QA accounts, setRESTRICT_OUTBOUND_TO_SELF=true(see Environment variables) to refuse any live send to a non-self recipient — preventing an agent from fanning real mail out to external addresses embedded in seed data. (Preview is caller-opt-in; the env lock is enforced server-side with no per-call override.)
send_email
Send an email using Proton Mail SMTP.
| Parameter | Required | Description |
|---|---|---|
to | Yes | Recipient address(es): a@x.com, Name <a@x.com> or "Doe, Jane" <a@x.com>, separated by commas or semicolons. Errors name any entry that isn't an address |
subject | Yes | Subject line |
body | Conditional | Plain text or HTML content. Required unless markdownBody is provided |
isHtml | No | Whether body is HTML (default: false) |
markdownBody | No | Markdown source — rendered to HTML before sending. Mutually exclusive with body/isHtml. Proton stores only the HTML, so the message reads back as HTML |
sanitizeHtml | No | Strip scripts, event handlers, inline styles, and remote <img> beacons via a conservative allowlist when the body is HTML. Default true. Pass false to preserve full-fidelity HTML. No-op on plain-text |
cc | No | CC recipient(s), same formats as to |
bcc | No | BCC recipient(s), same formats as to |
replyTo | No | Reply-To address. Proton can rewrite it to the From address (in live tests, even a +alias of the account's own address), reported as [reply-to:rewritten]; don't count on it reaching the recipient |
fromName | No | Display name for the From field. Rejects values containing @ by default (display-name-as-address spoofing defense — see warning above). Pass allowAddressLikeFromName: true to override for legitimate cases (product names with @) |
allowAddressLikeFromName | No | Opt-in escape valve for fromName containing @. Default false |
attachments | No | Array of {filename, content, contentType} or {path, filename?, contentType?}. content is base64 (validated). path is a file relative to ALLOW_FILE_ATTACH_DIR, read by the server, so large files don't pass through the model; absolute paths, .. and symlinks out of the folder are refused. contentType is inferred from the filename when omitted. 25 MB in total (Proton's limit) |
dryRun | No | Validate and resolve the full recipient set (To/CC/BCC) + subject + body without sending. Returns a preview leading with an [outbound:*] token and an explicit list of any external (non-self) recipients (default: false) |
verifySent | No | How long to look for the Sent copy: "quick" (default: about 5 s, then [sent-copy:pending]) or "wait" (about 30 s; a miss is [sent-copy:unverified]). Either way the message was sent |
reply_email
Reply to a message with proper threading headers (In-Reply-To, References). Includes the quoted original message with attribution by default.
| Parameter | Required | Description |
|---|---|---|
uid | Yes | UID of the message to reply to |
body | Conditional | Reply body content. Required unless markdownBody is provided |
folder | No | Folder containing the original message (default: INBOX) |
isHtml | No | Whether body is HTML (default: false) |
markdownBody | No | Markdown source. Mutually exclusive with body/isHtml |
sanitizeHtml | No | Strip scripts, event handlers, inline styles, and remote <img> beacons via a conservative allowlist when the body is HTML. Default true. Pass false to preserve full-fidelity HTML. No-op on plain-text |
cc | No | Additional CC recipients, same formats as send_email's to |
bcc | No | BCC recipients, same formats as send_email's to |
replyAll | No | Reply to all recipients instead of just sender (default: false). Prefer the dedicated reply_all_email tool for discoverability |
includeQuote | No | Include quoted original message below reply (default: true) |
dryRun | No | Resolve the reply recipients (incl. reply-all fan-out) + subject without sending; returns a preview of who would receive it (default: false) |
verifySent | No | How long to look for the Sent copy: "quick" (default: about 5 s, then [sent-copy:pending]) or "wait" (about 30 s; a miss is [sent-copy:unverified]). Either way the message was sent |
saveAsDraft | No | Save the message to Drafts (threading headers included) instead of sending it, for a person to review; send it later with send_draft (default: false) |
reply_all_email
Reply to all original recipients (sender + TO + CC), excluding the authenticated user. Same threading + quoting semantics as reply_email. Use this instead of reply_email + replyAll: true for clarity. Self-exclusion covers the whole recipient set including the primary To: replying-all to a message you sent reaches the original recipients rather than looping back to you.
| Parameter | Required | Description |
|---|---|---|
uid | Yes | UID of the message to reply to |
body | Conditional | Reply body content. Required unless markdownBody is provided |
folder | No | Folder containing the original message (default: INBOX) |
isHtml | No | Whether body is HTML (default: false) |
markdownBody | No | Markdown source. Mutually exclusive with body/isHtml |
sanitizeHtml | No | Strip scripts, event handlers, inline styles, and remote <img> beacons via a conservative allowlist when the body is HTML. Default true. Pass false to preserve full-fidelity HTML. No-op on plain-text |
cc | No | Additional CC recipients beyond original to+cc, same formats as send_email's to |
bcc | No | BCC recipients, same formats as send_email's to |
includeQuote | No | Include quoted original message below reply (default: true) |
dryRun | No | Resolve the full reply-all fan-out (sender + original To + CC, minus self) without sending; returns a preview of every recipient. Recommended before a live reply-all on unfamiliar mail (default: false) |
verifySent | No | How long to look for the Sent copy: "quick" (default: about 5 s, then [sent-copy:pending]) or "wait" (about 30 s; a miss is [sent-copy:unverified]). Either way the message was sent |
saveAsDraft | No | Save the message to Drafts (threading headers included) instead of sending it, for a person to review; send it later with send_draft (default: false) |
forward_email
Forward a message to new recipients. Original attachments are carried forward by default. Unlike reply, a forward does not set In-Reply-To/References — it starts its own conversation and leaves the original message's \Answered flag untouched.
| Parameter | Required | Description |
|---|---|---|
uid | Yes | UID of the message to forward |
to | Yes | Recipient address(es), same formats as send_email's to |
folder | No | Folder containing the original message (default: INBOX) |
body | No | Optional message to prepend above the forwarded content |
isHtml | No | Whether body is HTML (default: false) |
markdownBody | No | Markdown source for the prepended message. Mutually exclusive with body/isHtml |
sanitizeHtml | No | Strip scripts, event handlers, inline styles, and remote <img> beacons in the prepended HTML body. Does NOT sanitize the forwarded original content. Default true; pass false to preserve full-fidelity HTML |
cc | No | CC recipients, same formats as to |
bcc | No | BCC recipients, same formats as to |
includeAttachments | No | Include the original's attached files in the forward (default: true). Images embedded in its body aren't included; name them in attachmentParts to add them. Pass false to strip all attachments |
attachmentParts | No | Forward only the listed MIME part numbers (e.g. ["2", "3.1"]). Discover parts via list_attachments. Mutually exclusive with includeAttachments: false |
dryRun | No | Resolve recipients (To/CC/BCC) + subject + attachment count without sending or downloading attachment bytes; returns a recipient preview (default: false) |
verifySent | No | How long to look for the Sent copy: "quick" (default: about 5 s, then [sent-copy:pending]) or "wait" (about 30 s; a miss is [sent-copy:unverified]). Either way the message was sent |
saveAsDraft | No | Save the message to Drafts (threading headers included) instead of sending it, for a person to review; send it later with send_draft (default: false) |
save_draft
Save an email as a draft without sending it. The draft is placed in the user's \Drafts special-use folder (resolved at runtime; falls back to literal Drafts if no annotation). Returns the draft UID when available.
ⓘ Drafts always go to the Drafts folder; there is no
folderparameter.
| Parameter | Required | Description |
|---|---|---|
to | Yes | Recipient address(es), same formats as send_email's to |
subject | Yes | Subject line |
body | Conditional | Plain text or HTML content. Required unless markdownBody is provided |
isHtml | No | Whether body is HTML (default: false) |
markdownBody | No | Markdown source — rendered to HTML before saving. Mutually exclusive with body/isHtml |
sanitizeHtml | No | Strip scripts, event handlers, inline styles, and remote <img> beacons via a conservative allowlist when the body is HTML. Default true. No-op on plain-text |
cc | No | CC recipient(s), same formats as to |
bcc | No | BCC recipient(s), same formats as to |
replyTo | No | Reply-To address. The saved draft is checked; if the server didn't keep it, the result says [reply-to:dropped] and send_draft would send without one. send_email sets one and reports a rewrite, but can't make Proton keep it |
fromName | No | Display name for the From field. Rejects values containing @ by default (display-name-as-address spoofing defense — see warning above). Pass allowAddressLikeFromName: true to override for legitimate cases (product names with @) |
allowAddressLikeFromName | No | Opt-in escape valve for fromName containing @. Default false |
attachments | No | Same as send_email |
replaceDraftUid | No | UID of a prior draft to replace. A full replacement: fields left out (cc, bcc, replyTo…) aren't carried over. Saves the new draft first and deletes the old one only on success. Refused if the UID isn't in Drafts, or if the old draft looks unrelated (different subject, no shared recipient) |
replaceUnrelated | No | Allow replaceDraftUid to replace a draft that looks unrelated (default: false) |
Drafts keep their BCC recipients.
send_draft
Send a draft from the Drafts folder, then remove it from Drafts. It goes to the draft's To, CC and BCC exactly as saved; BCC recipients aren't shown to the others. Works for drafts from save_draft, from saveAsDraft on a reply or forward, or written in Proton's apps. The same safeguards as send_email apply: the rate limit, the 50-recipient limit, RESTRICT_OUTBOUND_TO_SELF, and Sent-copy verification. Refuses a draft that isn't from this account.
| Parameter | Required | Description |
|---|---|---|
uid | Yes | UID of the draft in the Drafts folder (save_draft returns it) |
threadWith | No | For a reply: {folder, uid} of the message it answers. Bridge drops a saved draft's threading headers, so they're rebuilt from this message; a saveAsDraft result gives the exact value |
dryRun | No | Show the recipients and subject without sending (default: false) |
verifySent | No | How long to look for the Sent copy: "quick" (default: about 5 s, then [sent-copy:pending]) or "wait" (about 30 s; a miss is [sent-copy:unverified]). Either way the message was sent |
Reading
check_connection
Diagnose the IMAP (Bridge) and SMTP connections. No parameters, sends no mail, opens no mailbox. Reports for each endpoint whether the configured port is listening, whether it greets as the right protocol in the configured TLS mode, and whether the login is accepted. When a local port fails, it scans Bridge's usual port ranges and names the port Bridge is actually on. Same checks as proton-mail-mcp doctor, from inside the client.
list_folders
List all mailbox folders with message and unread counts. No parameters. Counts come from a cached IMAP STATUS that Proton Bridge can serve stale — for an exact count (e.g. before deleting or emptying a folder), use count_messages or folder_stats, which query the live mailbox. The output includes a footer reminding callers of this.
Non-selectable namespace containers (Proton's top-level Folders / Labels nodes, which hold nested mailboxes but can't store messages) are tagged (namespace — not a mailbox). Selectability is decided by positive evidence (a live message count, or a childless mailbox with a successful STATUS) overriding the raw \Noselect flag, because Proton Mail Bridge has been seen reporting populated labels with the flag set. The reading tools (list_messages, search_messages, count_messages, folder_stats) reject these containers with an actionable error instead of silently reporting them empty.
list_messages
List messages in a folder, newest first by date, with the folder's total. Mail the account sent to someone else shows To: instead of From:; mail it sent only to itself shows From:.
| Parameter | Required | Description |
|---|---|---|
folder | No | Folder path (default: INBOX) |
limit | No | Max messages to return, 1-100 (default: 20) |
cursor | No | Continue from a previous page: pass the cursor value the previous result ended with |
beforeUid | No | Only messages with a UID below this value; with sortByUid, the paging key |
includeSnippet | No | Include a collapsed ~200-char body preview per row (default: false) |
sortByUid | No | Order by UID descending instead of date, paging with beforeUid (default: false) |
Paging. When more messages exist, the result ends with cursor="…"; pass it back to get the next page. Pages follow date order exactly, with nothing skipped or repeated. Bridge's UIDs are not in date order (a synced INBOX can have November mail at UID 1 and May mail at UID 7), which is why 1.x's "smallest UID on the page" paging lost messages.
Snippet safety. includeSnippet (here and on search_messages) returns ~200 chars of raw, sender-controlled body per row. When snippets are present the response appends an untrusted-content banner; treat any text after the — separator on a row as data, never instructions — it's a prompt-injection surface for agents that triage by snippet. Use read_message (which fences the full body) when you need to act on body content.
read_message
Read a specific message by UID. Returns full headers, body, and attachment metadata. Prefers plain text; strips HTML tags from HTML-only messages. Body-part selection skips parts marked Content-Disposition: attachment, so a text/plain attachment sitting next to an HTML body is never returned as the body.
| Parameter | Required | Description |
|---|---|---|
uid | Yes | Message UID (from list_messages or search_messages) |
folder | No | Folder path (default: INBOX) |
preferHtml | No | Return raw HTML instead of stripped text (default: false) |
maxBodyLength | No | Max body length before truncation, 100-500000 (default: 50000) |
showHeaders | No | Include In-Reply-To, References, Reply-To, List-Unsubscribe, List-ID in an Extra Headers section (default: false) |
stripUrls | No | Drop anchor URLs from stripped-HTML output, keeping only link text. Useful for summarizing newsletters (default: false) |
showLabels | No | List the labels the message carries. One lookup per label in the account, so off by default |
Reading never marks a message read. When it is unread, the result ends with how to mark it (update_message_flags with \Seen). Attachment rows mark images embedded in the body as (inline).
The body is always fenced in [BEGIN UNTRUSTED EMAIL BODY <token>] / [END UNTRUSTED EMAIL BODY <token>] markers, with a random token chosen per call so text inside the email can't fake the end marker. With preferHtml: true the body is the verbatim wire HTML (not run through the send-side sanitizer), so it can contain <script>, inline event handlers, javascript: URLs, frames, or remote <img> tracking beacons. When any of those are detected the response emits a [html:active-content] token before the body — do not render or execute that HTML; treat it strictly as data. (cid:/data: inline images aren't flagged.)
list_attachments
List attachment metadata (part numbers, filenames, types, sizes) for a message without downloading the body. Composes with download_attachment for bulk extraction. The reported size is the decoded file size (roughly what you get on save), estimated from the IMAP-encoded octet count — base64 parts are ~37% smaller decoded than their wire size. It's displayed with a leading ~ because it's approximate (±~2 bytes, not byte-exact — don't assert on it or pre-allocate buffers); the exact byte count comes from download_attachment, which reports the real decoded length.
| Parameter | Required | Description |
|---|---|---|
uid | Yes | Message UID |
folder | No | Folder containing the message (default: INBOX) |
download_attachment
Download an attachment by MIME part number. Use list_attachments or read_message first to see available parts. By default returns base64-encoded content inline. Bad part numbers produce an actionable error listing known parts.
When the ALLOW_FILE_DOWNLOAD_DIR env var is set, the optional saveTo parameter writes the decoded bytes to disk inside that allowlist root and returns the file path + size instead of base64 — avoids blowing the token budget on large attachments. Path safety: rejects absolute paths, any path (.., symbolic links) that leads outside that folder, and hidden names (a file or folder starting with .). An existing file is not replaced unless you pass overwrite: true, and a symbolic link is never written through. If the configured directory doesn't exist, you get an actionable "create it first" error rather than a raw ENOENT.
ⓘ Pre-flight size guard. When called without
saveTo, the guard compares the attachment's base64-encoded size (what the inline response actually costs) against a ~40 KB cap — roughly a 29 KB decoded file. Larger attachments throw upfront, since the inline base64 would overflow most MCP framework response caps; the error reports both the decoded and encoded sizes so they line up with the threshold. To download larger files, setALLOW_FILE_DOWNLOAD_DIRin your client config and passsaveTo. For Claude Desktop, add toclaude_desktop_config.json:{ "mcpServers": { "proton-mail": { "command": "npx", "args": ["-y", "proton-mail-mcp"], "env": { "ALLOW_FILE_DOWNLOAD_DIR": "/Users/you/proton-attachments" } } } }Then call
download_attachmentwithsaveTo: "report.pdf"(relative to that directory). The response returns the file path + byte count instead of inline base64.⚠️ For an agent to read back what it saved, the same directory must also be mounted into the agent's workspace/file tools.
ALLOW_FILE_DOWNLOAD_DIRonly grants this server permission to write there — it does not grant the calling agent permission to read it. If the two don't overlap, the agent can save an attachment but not open it, making "download this attachment and tell me what's in it" a dead end. PointALLOW_FILE_DOWNLOAD_DIRat a folder that's already connected to the agent's environment (e.g. a Claude Cowork directory) so the round-trip works end-to-end.
| Parameter | Required | Description |
|---|---|---|
uid | Yes | Message UID |
partNumber | Yes | MIME part number (from read_message / list_attachments) |
folder | No | Folder containing the message (default: INBOX) |
saveTo | No | Relative path inside ALLOW_FILE_DOWNLOAD_DIR to write the decoded attachment to. Requires the env var to be set |
overwrite | No | With saveTo: replace a file that already exists at that path (default false) |
asText | No | Return a text, JSON, XML or CSV attachment as text (fenced as untrusted) instead of base64 (default: false). Ignored with saveTo; the ~40 KB inline cap still applies |
search_messages
Search messages by various criteria. since is inclusive, before is exclusive.
ⓘ Dates are UTC calendar days, the zone every timestamp in the results is shown in. The server widens Bridge's search by a day on each side and applies the exact range itself, so a message at
03:14 UTCon May 26 matchessince: "2026-05-26"wherever the server runs.
| Parameter | Required | Description |
|---|---|---|
folder | No | Folder to search (default: INBOX) |
from | No | Filter by sender |
to | No | Filter by recipient |
subject | No | Case-insensitive substring of the decoded subject; emoji, accents and multi-word phrases work |
body | No | Filter by body content (substring match) |
since | No | Messages on or after this date (YYYY-MM-DD, UTC, inclusive) |
before | No | Messages strictly before this date (YYYY-MM-DD, UTC, exclusive) |
seen | No | true = read, false = unread |
flagged | No | Filter by flagged/starred status |
larger | No | Messages larger than this many bytes (maps to IMAP LARGER) |
smaller | No | Messages smaller than this many bytes (maps to IMAP SMALLER) |
listId | No | Filter by List-ID header substring (useful for newsletters/mailing lists) |
hasAttachment | No | true: messages with at least one attached file; false: messages without one. Images embedded in an HTML body (logos, banners) don't count. Checks the newest 500 candidates by date |
attachmentName | No | Case-insensitive substring of any file part's name (e.g. "invoice", ".pdf"), embedded images included |
attachmentType | No | Case-insensitive MIME-type prefix of any file part (e.g. "application/pdf", "image/"), embedded images included |
limit | No | Max results, 1-100 (default: 20) |
cursor | No | Continue from a previous page, as for list_messages |
includeSnippet | No | Include a collapsed ~200-char body preview per row (default: false) |
ⓘ For subject/body queries on freshly-sent mail, results may lag by 30–60 seconds (Proton's index updates asynchronously). The response surfaces a staleness footer pointing at
list_messages, orget_threadwith the Message-ID, when applicable.
get_thread
Get all messages in a conversation thread by walking In-Reply-To and References headers. Returns messages sorted chronologically (oldest first).
Prefer messageId — Message-IDs are globally unique, so this sidesteps the UID-collision footgun (UIDs are per-folder in IMAP) and walks INBOX + Sent + All Mail by default to catch replies that span folders. (uid mode is single-folder and will silently undercount a cross-folder thread.) Output rows are tagged UID X @FolderName in both modes, and the response dedupes by Message-ID across mailbox copies — the same physical message appearing in INBOX and All Mail collapses into one row tagged (also in: All Mail) instead of double-counting the thread. A thread member that lives in a user folder (e.g. Folders/Development) and surfaces only via the All Mail virtual copy is rewritten to its real storage folder and UID, so the folder/uid pair each row reports is valid in a single-folder tool (move_message / delete_message) rather than an All Mail UID that would misfire.
| Parameter | Required | Description |
|---|---|---|
messageId | No | RFC 5322 Message-ID (preferred over uid+folder) |
uid | No | UID of a thread message (used when messageId is omitted; folder-scoped) |
folder | No | Folder the UID lives in when using uid mode (default: INBOX) |
folders | No | Override the default folder walk when messageId is set (default: ["INBOX", "Sent", "All Mail"]) |
limit | No | Max messages to return, 1-50 (default: 25) |
Scope: reply chain only. This walks In-Reply-To/References, so it returns the reply chain. Forwards are not included — a forward doesn't reference the original (it starts its own conversation), so a forwarded copy of a message won't appear in that message's thread. A 1-result thread doesn't mean a bug when only forwards (not replies) exist.
Organizing
move_message
Move a message to a different folder. Returns the new UID in the destination folder when available (requires UIDPLUS server support). The destination must be a folder: moving into Labels/… is refused (use update_message_labels), as is moving into the folder the message is already in. Moving a UID from All Mail or Starred is resolved to the message's real folder first (Bridge refuses moves out of those views). If the same message is also shown in INBOX or Sent, the result says it leaves there too; the Sent copy of mail you sent yourself is a separate message and stays.
| Parameter | Required | Description |
|---|---|---|
uid | Yes | Message UID |
destination | Yes | Destination folder (e.g. Archive, Spam, Folders/Work; Work resolves to Folders/Work) |
folder | No | Source folder (default: INBOX) |
dryRun | No | Preview the move, with the message's date, sender and subject, without changing anything (default: false) |
delete_message
Delete a message. By default moves to Trash for safety (resolved via special-use annotation); permanent: true with confirm: true deletes it for good, the way Proton does: it is moved to Trash and removed there, then checked to be gone (removing it in place would only take it out of that folder). Returns the new UID in Trash when available. Soft-deleting a message that is already in Trash is a no-op on the server; the tool says so and how to delete it permanently.
| Parameter | Required | Description |
|---|---|---|
uid | Yes | Message UID |
folder | No | Folder containing the message (default: INBOX) |
permanent | No | If true, permanently expunge instead of moving to Trash (default: false). Requires confirm: true |
confirm | No | Must be true with permanent: true: a permanent delete can't be undone (default: false) |
dryRun | No | Preview the delete, with the message's date, sender and subject, without changing anything; needs no confirm (default: false) |
update_message_flags
Add or remove flags on a message. System flags: \Seen (read), \Flagged (starred), \Answered, \Draft. \Recent (server-managed) and \Deleted (doesn't delete on Proton; use delete_message) are refused as flags to add; \Deleted can be removed, to clear one left by an earlier failed delete. The same flag can't be in both lists. A system flag written without its backslash or in another case (Seen, \seen) gets "Did you mean \Seen?". User-defined keywords without a backslash prefix are also accepted (alphanumeric + underscore, e.g. Important, Custom_Tag), though Bridge usually drops them.
Post-STORE verify: the server's FETCH response is checked against the requested operation. Flags the server failed to apply (commonly user keywords silently dropped by Proton Mail Bridge) are reported in the response as no-op (not applied): ....
| Parameter | Required | Description |
|---|---|---|
uid | Yes | Message UID |
folder | No | Folder containing the message (default: INBOX) |
flagsToAdd | No | Flags to add (e.g. ["\\Seen", "\\Flagged"]) |
flagsToRemove | No | Flags to remove (e.g. ["\\Seen"]) |
update_message_labels
Add or remove Proton labels on a message. Labels live under the Labels/ namespace and are additive — the message stays in its source folder while gaining or losing label tags.
- Add is implemented as IMAP
COPYfrom the source folder toLabels/<name>. The source UID is unchanged. - Remove locates the message in the label mailbox by its
Message-IDheader andmessageDeletes that UID — removing only the label, not the underlying message.
Adds are strict: copying to a missing label throws Label not found: <path> (create it first with create_label). Removes are idempotent — removing a label that doesn't apply, or doesn't exist as a mailbox, is a silent no-op.
| Parameter | Required | Description |
|---|---|---|
uid | Yes | Message UID in the source folder |
folder | No | Source folder containing the message (default: INBOX) |
labelsToAdd | No | Labels to add, by name or path, any case (e.g. ["Important", "Labels/Work"]) |
labelsToRemove | No | Labels to remove, by name or path |
mark_all_read
Mark all unread messages in a folder as read. Optionally limit to messages older than a given date. Pass dryRun: true to preview the affected count without flipping any flags.
Documentation truncated — see the full README on GitHub.
Reviews
No reviews yet
Be the first to review this server!
More Developer Tools MCP Servers
Rea
Freeby Morluto · Developer Tools
Reverse engineer anything from your terminal or agent with one CLI and MCP server.
Paperclip
Freeby Paperclipai · Developer Tools
Trending hip-hop artist momentum scores across four cultural dimensions.
Scrapling
Freeby D4Vinci · Developer Tools
Web scraping with stealth HTTP, real browsers, and Cloudflare bypass. CSS selectors supported.
Server Time
Freeby Modelcontextprotocol · Developer Tools
Current time lookup and conversion between IANA timezones
Toleno
Freeby Toleno · Developer Tools
Toleno Network MCP Server — Manage your Toleno mining account with Claude AI using natural language.
MCP Marketplace
Freeby mcp-marketplace · Developer Tools
Search and install MCP servers from inside your AI client.
