Proton Mail Bridge MCP
A local MCP server + CLI that lets an AI client read, search, draft, send and organize Proton Mail through Proton Bridge, with safety modes, approvals and an audit log.
Read & search mail — live IMAP search, a fast local SQLite index (offline, accent/variant aware), fetch full messages and batches, count messages, folder stats, snippets.
Threads & triage — normalize conversations, rank actionable threads, inbox digest, follow-up candidates, meeting prep, document/attachment threads, thread briefs.
Compose & send — send, reply, reply-all, forward (threading preserved) with Markdown bodies, signatures, priority, read receipts, and dry-run previews.
Draft workflow — create/update/list/get/delete drafts locally and sync to Proton Drafts, including reply/forward/thread-reply drafts and token-cheap
bodyEditsfind/replace.Delayed & scheduled sends — undo-send window, cancel queued sends, schedule a draft, snooze emails, list pending items.
Mailbox actions — mark read/unread, star, move, archive, trash, restore, permanent delete, label updates, arbitrary IMAP flags, batch and whole-thread operations with dry-run.
Folders & labels — list/refresh, create, rename, delete, plus namespaced
Folders/andLabels/handling.Attachments — list, inline base64, save to disk, read text from plain text, PDF, DOCX/XLSX/PPTX (optional OCR), export raw .eml, import .eml into a folder.
Templates — create, list, get, render
{{variable}}substitution, delete.Analytics — top senders, volume trends, mailbox stats, contacts by interaction volume.
Multi-account — several Proton logins/addresses, each isolated, with
slug::id prefixes and per-account status.Sync & monitoring — background sync, IMAP IDLE watching, manual/incremental/full sync, index freshness, connection and runtime status.
Diagnostics — doctor health check, ephemeral logs, persistent audit log verification, account listing.
Unsubscribe & trust — read List-Unsubscribe headers, send mailto unsubscribes, DKIM/SPF/DMARC security block on messages.
Safety controls — read-only/drafts/assisted/full modes, allowlists, send restriction to self, destructive-action confirmation, human approval via elicitation, hash-chained tamper-evident audit log.
Everything scriptable — every tool is also a CLI command with
--jsonoutput.
Provides interaction with Proton services via the local Proton Bridge, enabling secure access to mailbox data, thread management, and analytics.
Enables comprehensive management of Proton Mail through Proton Bridge, allowing users to read, send, reply, and forward emails, manage attachments, and perform mailbox operations like archiving and labeling.
____ ____ ___ _____ ___ _ _ __ __ _ ___ _
| _ \| _ \ / _ \_ _/ _ \| \ | | | \/ | / \ |_ _| |
| |_) | |_) | | | || || | | | \| | | |\/| | / _ \ | || |
| __/| _ <| |_| || || |_| | |\ | | | | |/ ___ \ | || |___
|_| |_| \_\\___/ |_| \___/|_| \_| |_| |_/_/ \_\___|_____|
Bridge Client · MCP + CLI for Proton Mail, with safety modes
Let Claude Desktop (or Cline, or any MCP client) work with your Proton Mail, with you in control of what it may do. The server can be set to read-only or drafts mode, where nothing is sent, moved or deleted. Sending and deleting can be set to wait for your approval: assisted mode asks for confirmed: true, and PROTONMAIL_APPROVAL=elicit|require makes the server ask you through the client instead of trusting the model. Every change can be recorded in a hash-chained, tamper-evident audit log. The server talks only to Proton Bridge on 127.0.0.1 and keeps its index on your disk; the mail text the AI model reads goes to the model provider unless the model runs locally (see fully local). The threat model says what is and is not covered. The same tools are also available as a full CLI for scripting, cron and piped automation, with no Claude required. A daily brief of new mail and threads waiting on you can be shown as a notification each morning: see scheduled digest.
Know the default: with
PROTONMAIL_MODEunset the server runs infullmode (sending allowed, no approval), but a newsetup-claude-desktopinstall writesPROTONMAIL_MODE=drafts(Claude can read and write drafts, not send; moves and permanent delete are off in its action list). Re-running setup on an existing install keeps its mode. To allow sending setPROTONMAIL_MODE=full; for read-only useread-only(see Safety controls). Approval by elicitation depends on the client supporting it; onlyrequirefails closed.
Using Proton Drive too? See proton-drive-mcp, the companion MCP server and CLI for Proton Drive (upload, download, share and manage your encrypted files from Claude). Run both side by side to handle mail and files in one conversation, for example save an attachment from here, then upload it to Drive. More in Related projects.
Battle-tested at scale (v2.0.0): full mailbox backfill validated end-to-end against a real account with 57,000+ indexed messages across 62 folders/labels — including a 22,800-message Archive folder backfilled from scratch, UID-window by UID-window, with zero data loss across restarts, transient IMAP disconnects, and connection timeouts.
Quick start (2 minutes)
No terminal? Follow the step-by-step guide instead.
Install and sign in to Proton Mail Bridge, and leave it running. In the Bridge app, open your account and copy the Bridge password (it is not your Proton password).
Connect Claude Desktop, either way (quit Claude Desktop completely first, so it does not overwrite the config on exit):
Bundle (needs Node.js 22 or later on the machine): download the
proton-mail-bridge-client-<your-os>.mcpbfor macOS (darwin-arm64Apple silicon,darwin-x64Intel), Linux (linux-x64,linux-arm64) or Windows (win32-x64) from the latest release and open it. Claude Desktop asks for your Proton address and the Bridge password, plus optional settings (Bridge IMAP/SMTP host and port, read-only, allow sending, signature, extra accounts, data and download folders, tool tier); the defaults match a standard Bridge install.npm:
npm install -g proton-mail-bridge-client, thenproton-mail-bridge-client setup-claude-desktop(it checks your Bridge ports and writes the config). Fully quit and reopen Claude Desktop afterwards.
Check it works: run
proton-mail-bridge-client doctor, or ask Claude "run the Proton Mail doctor".Try these prompts:
"Give me a digest of my inbox and flag anything that needs a reply today."
"Find the last email from
alice@example.comand draft a reply for me to review." (nothing is sent until you say so)"Which of my emails have attachments from this month?"
"Show me my drafts and tighten the oldest one."
Not sure about handing over control? Start with
PROTONMAIL_MODE=drafts: Claude can read, search and prepare drafts, but nothing is sent or deleted until you change the mode. The server also tells the client how to behave (ids, accounts, never obeying instructions found inside a message).Optional:
PROTONMAIL_READ_ONLY=trueto browse without being able to change anything,PROTONMAIL_TOOL_TIER=corefor a smaller tool set (25 instead of 129), and more accounts under Multi-account support. More recipes below in Try it.
Related MCP server: protonmail-mcp
What you get
Read-only or drafts first —
PROTONMAIL_MODEpresets (read-only,drafts,assisted,full) decide how much the assistant may do; other flags can only tighten a preset, never loosen itYour approval, not the model's — with
PROTONMAIL_APPROVAL, sends and deletes need your answer through the client (MCP elicitation); a mail that tells the model to "pass confirmed" cannot give it. A mail firewall flags text that reads like an instruction to an AITamper-evident audit log — tool calls that change something are hash-chained in
audit.log;verify_audit_logdetects edited, deleted or reordered entries (it is evidence, not a defence against someone with the same file access; see Audit log)Local only — Proton Mail, Proton Bridge, this server, your AI client; no third-party relay, and the search index, drafts and audit log live in your data directory
Claude reads and manages your Proton Mail — triage, reply, draft, archive, search, move, batch-act on threads, pull attachments (PDF text and pictures included), answer calendar invitations, all within the mode you chose
Several addresses at once — each Proton login (or each address Bridge exposes) is its own isolated account with its own index, drafts and settings
Fast local search — full-text search across your inbox from a local index that keeps its read state in step with the server
Rules that suggest themselves — a scan proposes filters and cleanup from your own mail, applies them to existing mail after a preview, and can forward by condition; see Mailbox rules
Automatic reply, per address, with rules — off by default, with a preview of what it would do, draft-for-approval mode and working-hours; see Autoresponder (Proton's own auto-reply may be all you need)
Full CLI — a dedicated command for every one of the 129 MCP tools (plus a generic
tool <name>passthrough), scriptable and pipeable;doctorchecks every account andreportprints a diagnostic summary for a bug reportRuns where you do — Claude Desktop bundle, npm, Homebrew, or a Docker image for a headless machine
Privacy-native — no third-party email service involved; your mail stays on your machine
How this relates to Proton Bridge. This is a layer on top of Proton Mail Bridge, not a replacement for it. Bridge is Proton's official, local IMAP/SMTP gateway and the only supported way to reach a Proton mailbox from other software; this project talks to it. Bridge's own --cli mode manages Bridge itself (signing in, account details and the Bridge password, ports and other settings), it is not a mail client. Proton does not publish a terminal mail client, so reading, searching, drafting and sending from Claude or a script is what this adds on top, together with the safety controls above. Bridge has to be running and signed in.
Privacy model
Your emails travel: Proton Mail → Proton Bridge (local) → this server (local) → your AI client.
Nothing goes through a third-party email relay. Proton Bridge decrypts your mail locally; this server reads it over a local IMAP connection on 127.0.0.1. The AI model (Claude Desktop, Cline, etc.) sees the email content you ask it to act on — that's the whole point — but no email leaves your machine except through your own Proton account when you send.
If you use Claude Desktop with the default Anthropic API, conversation content (including email snippets) is sent to Anthropic per their privacy policy. If you self-host an LLM or use a local-only Claude setup, nothing leaves your machine at all.
Prerequisites
1. Proton Bridge — must be installed, signed in, and running. Download: proton.me/mail/bridge
Bridge password vs Proton password: Proton Bridge generates a separate local password that is not your Proton account password. Find it inside the Bridge app under Account → Copy password (or similar — exact label varies by Bridge version). You'll need this for setup.
2. Node.js 22 or later — node --version to check.
3. Your Bridge credentials — from the Bridge app:
IMAP host/port (default:
127.0.0.1:1143)SMTP host/port (default:
127.0.0.1:1025); the IMAP and SMTP password is the same Bridge passwordUsername (your Proton email address)
Bridge password (see note above)
Install
npm (recommended):
npm install -g proton-mail-bridge-clientHomebrew:
brew tap googlarz/tap
brew install proton-mail-bridge-clientgit clone https://github.com/googlarz/proton-mail-bridge-client.git
cd proton-mail-bridge-client
npm install
npm run buildThe proton-mail-bridge-client binary is available inside the repo after build.
Connect to Claude Desktop
Run the guided setup wizard:
proton-mail-bridge-client setup-claude-desktopThe wizard:
checks your local Bridge ports
asks for your Bridge username and Bridge password
writes the Claude Desktop MCP config entry
makes one read-only check against Bridge ("Bridge reachable, signed in as ..., INBOX has N messages", or the likeliest cause if it fails) and lists what to try first;
--no-checkskips the check
The runtime is installed into a staging directory first, checked (Node starts, better-sqlite3 opens a database, dist imports, version matches) and only then swapped in; the previous runtime stays next to it as <runtime dir>.previous, and a failed install leaves the working one untouched. The config is merged, not replaced: existing env keys you added by hand are kept, and the config is rewritten atomically (the newest 5 .bak-* copies are kept). Passwords are never printed. Run npm run check:claude-desktop to verify an install; it exits non-zero when the command, the runtime or the database module is broken.
After setup: restart Claude Desktop, make sure Proton Bridge is open, then check + → Connectors → proton-mail-bridge.
Updating
npm update -g proton-mail-bridge-client
proton-mail-bridge-client setup-claude-desktopManual config
The wizard handles config automatically. If you need to set it up by hand, three credential methods are supported:
{
"mcpServers": {
"proton-mail-bridge": {
"command": "proton-mail-bridge-mcp",
"env": {
"PROTONMAIL_USERNAME": "you@proton.me",
"PROTONMAIL_PASSWORD": "your-bridge-password",
"PROTONMAIL_IMAP_HOST": "127.0.0.1",
"PROTONMAIL_IMAP_PORT": "1143",
"PROTONMAIL_IMAP_SECURE": "false",
"PROTONMAIL_SMTP_HOST": "127.0.0.1",
"PROTONMAIL_SMTP_PORT": "1025"
}
}
}
}{
"mcpServers": {
"proton-mail-bridge": {
"command": "proton-mail-bridge-mcp",
"env": {
"PROTONMAIL_USERNAME_FILE": "/path/to/username.txt",
"PROTONMAIL_PASSWORD_FILE": "/path/to/password.txt",
"PROTONMAIL_IMAP_HOST": "127.0.0.1",
"PROTONMAIL_IMAP_PORT": "1143",
"PROTONMAIL_IMAP_SECURE": "false",
"PROTONMAIL_SMTP_HOST": "127.0.0.1",
"PROTONMAIL_SMTP_PORT": "1025"
}
}
}
}{
"mcpServers": {
"proton-mail-bridge": {
"command": "proton-mail-bridge-mcp",
"env": {
"PROTONMAIL_USERNAME_COMMAND": "pass proton/username",
"PROTONMAIL_PASSWORD_COMMAND": "pass proton/password",
"PROTONMAIL_IMAP_HOST": "127.0.0.1",
"PROTONMAIL_IMAP_PORT": "1143",
"PROTONMAIL_IMAP_SECURE": "false",
"PROTONMAIL_SMTP_HOST": "127.0.0.1",
"PROTONMAIL_SMTP_PORT": "1025"
}
}
}
}Connect to Claude Code
Install globally, then register the server with one command:
npm install -g proton-mail-bridge-client
claude mcp add proton-mail-bridge \
-e PROTONMAIL_USERNAME=you@proton.me \
-e PROTONMAIL_PASSWORD=your-bridge-password \
-- proton-mail-bridge-mcpyour-bridge-password is the Bridge app's own password (Bridge → account → Mailbox details), not your Proton account password — see the note under Prerequisites.
By default this registers the server for the current project only. Add -s user to make it available in every project:
claude mcp add proton-mail-bridge -s user \
-e PROTONMAIL_USERNAME=you@proton.me \
-e PROTONMAIL_PASSWORD=your-bridge-password \
-- proton-mail-bridge-mcpVerify it's connected:
claude mcp listFor file-based or command-based credentials instead of plaintext env vars, add -e PROTONMAIL_USERNAME_FILE=/path/to/file (or _COMMAND) the same way — see the credential methods under Manual config above.
Connect to Cline (VS Code)
Install globally (npm install -g proton-mail-bridge-client), then open Cline's MCP settings:
VS Code → Cline extension panel → MCP servers icon → Edit MCP Settings
Or edit directly:
~/Library/Application Support/Code/User/globalStorage/saoudrizwan.claude-dev/settings/cline_mcp_settings.json(macOS)
Add the server:
{
"mcpServers": {
"proton-mail-bridge": {
"command": "proton-mail-bridge-mcp",
"env": {
"PROTONMAIL_USERNAME": "you@proton.me",
"PROTONMAIL_PASSWORD": "your-bridge-password",
"PROTONMAIL_IMAP_HOST": "127.0.0.1",
"PROTONMAIL_IMAP_PORT": "1143",
"PROTONMAIL_IMAP_SECURE": "false",
"PROTONMAIL_SMTP_HOST": "127.0.0.1",
"PROTONMAIL_SMTP_PORT": "1025"
}
}
}
}For file-based or command-based credentials, use the same PROTONMAIL_USERNAME_FILE / PROTONMAIL_PASSWORD_COMMAND pattern from the Claude Desktop manual config above.
Reload the Cline extension after saving. Proton Mail tools will appear in Cline's tool list.
Running in Docker (headless machines)
Home server or NAS? A step-by-step recipe with a Compose file (untested end to end) shows Bridge without a GUI next to this server. No cloud model at all? See fully local use (experimental).
For a server with no desktop, next to a headless Bridge. The image installs the published npm package and is published for each release to ghcr.io/googlarz/proton-mail-bridge-client (:<version> and :latest, linux/amd64 and linux/arm64). To build it yourself from this repo:
docker build -f docker/Dockerfile --build-arg VERSION=2.20.2 -t proton-mail-bridge-client .
docker run -i --rm --network host \
-e PROTONMAIL_USERNAME=you@proton.me -e PROTONMAIL_PASSWORD_FILE=/run/secrets/bridge \
-v /path/to/bridge-password:/run/secrets/bridge:ro -v bridge-client-data:/data \
proton-mail-bridge-clientdocker run -i speaks MCP over stdio. The container must reach Bridge's IMAP and SMTP ports (--network host, or --network container:<bridge> to share Bridge's network). The CLI is in the same image: add --entrypoint proton-mail-bridge-client and a command such as doctor. If Bridge is reached by a host name (for example host.docker.internal or another container), its self-signed certificate fails verification: export it from Bridge and point PROTONMAIL_TLS_CA_FILE at it, or list the name in PROTONMAIL_TLS_INSECURE_HOSTS. The server has no network transport of its own; reaching it from a remote client needs your own wrapper. The image was checked to build, report its version, run as a non-root user and answer an MCP initialize, and (by a tester, against a real Bridge) to pass doctor, list folders, sync and exit cleanly, with --network container:<bridge> or with Bridge reached by host name using PROTONMAIL_TLS_CA_FILE or PROTONMAIL_TLS_INSECURE_HOSTS.
Autoresponder (automatic reply per address)
Proton Mail has its own auto-reply (Settings → Filters / Forward and auto-reply; Proton lists it on its paid plans). It runs inside Proton, works while your computer is off, and applies to the whole account unless you write a filter. If that is enough, use it and leave this one off: enabling both would send each sender two replies. This one adds what a filter cannot do from a chat, and it only runs while this server runs.
An automatic reply for one address, plus a note that address appends to what it sends. Off by default, and it can send mail without asking each time, so it is held to stricter rules than a normal send:
Who gets a reply. Only a person (not a list, not automatic mail, not a
no-reply/mailer-daemonsender) who wrote to this address (To or Cc), after the rule was switched on and inside its dates, and whom you have not already answered since. One reply per sender perreplyEveryDaysdays (default 7), at mostdailyLimita day (default 50). A reply is recorded before it is sent, so a failure never becomes a second one.When. After a background sync has indexed new mail, so only while this server runs with
PROTONMAIL_AUTO_SYNCon; with several clients open, the instance holding the sync lock does it.outsideHours(with atimezone) limits it to when you are not at work.What it does.
mode: "send"sends;mode: "draft"leaves a draft in your drafts for you to review and send. If the server may not send (PROTONMAIL_MODE=drafts,ALLOW_SENDoff, or outbound mail confined to yourself), a reply becomes a draft by itself; if it may not write drafts either (read-only), it is refused.Rules, first match wins: by sender (
boss@example.com,*@client.example), words in the subject, and whether you have written to the sender before (known: "yes"/"no"). Each givesreply,draftorskip, optionally with its own text. Mail that matches none gets the default reply.Text. Placeholders
{senderFirstName},{senderName},{senderAddress},{subject},{startsAt},{endsAt},{returnDate},{backupContact}.returnDateandbackupContactare plain text you set once (returnDatemay be a date such as2027-01-04, written out in the reply's language); nobody is written to at the backup contact.Language.
bodiesandsubjectsmap a language code (en,pl,de) to a text. If the message answered is detected to be in one of those languages, that text is used and dates are written in it; anything else, or a language with no text, getsbody/subject. Detection is a word-list guess on the subject and the start of the message, so a short or mixed-language message may be taken for the wrong language or none.Draft in your style. In draft mode, if a style profile exists (
get_style_profile), the draft opens and closes with your usual greeting and closing for that language instead of a fixed text. Sent replies use the text as written.VIP rules. A rule's
fromacceptstag:vip(or any tag you set withset_contact), so a rule can treat people you tagged differently. The tag is looked up by the sender address in the message header.Safety headers.
Auto-Submitted: auto-replied,Precedence: bulk,X-Auto-Response-Suppress: All; the reply threads under the message it answers.Control. Switching it on needs
confirmed: truewhenPROTONMAIL_CONFIRM_DESTRUCTIVEis on and the server can send. Switching it off is always allowed, in every mode.
preview_autoresponder account=work@example.com days=3 # what it WOULD do with recent mail; changes nothing
set_autoresponder account=work@example.com enabled=true confirmed=true
body="Hi {senderFirstName}, I am away until {endsAt} and will answer then."
endsAt=2027-01-04 timezone=Europe/Warsaw outgoingNote="I am away until 4 January."
rules=[{"name":"boss","from":["boss@example.com"],"action":"reply","body":"Urgent? Call my mobile."},
{"name":"clients","from":["*@client.example"],"action":"draft"},
{"known":"no","subjectContains":["unsubscribe"],"action":"skip"}]
get_autoresponder account=work@example.com # state, counts, who wrote, why mail was skipped, the logFor a reply in the sender's language add bodies={"pl":"Dzień dobry {senderFirstName}, wracam {returnDate}.","de":"Guten Tag {senderFirstName}, ich bin ab {returnDate} zurück."} and returnDate=2027-01-04. preview_autoresponder shows, for each message, the language it detected, where the text came from (textFrom: rule, language or default), whether a draft would be styled, and the text itself.
outgoingNote is appended, after the signature, to every mail sent from that address while the rule is active (a send with appendSignature: false opts out). On the command line: set-autoresponder, autoresponder and preview-autoresponder. The rule, the log and the memory of who was answered live in autoresponder.json in the account's data directory; every account (every address Bridge exposes) has its own.
Mail firewall (prompt-injection guard)
Mail is untrusted text that a model reads. get_email_by_id and get_emails_by_ids add a risk note (caution or high, with the reasons) when a message looks written to steer an AI or to deceive you: instructions addressed to an assistant (English, Polish, German), text hidden by markup or zero-width characters, a link that reads one address and goes to another, a Reply-To on another domain, a sender name that shows a different address, a failed SPF/DKIM/DMARC check. Normal mail carries no note. The instruction patterns are also checked wherever else text reaches the model: attachment text, thread reads, lists with previews and reading a message as an MCP resource.
After a high message has been read, the tools that reach outside (send_email, replies, forward_email, send_draft, schedule_draft, delete_email, delete_thread, bulk_delete, empty_folder, unsubscribe_sender, respond_to_invite, and switching on set_rule or set_autoresponder) ask for confirmed: true and quote the reason, even when PROTONMAIL_CONFIRM_DESTRUCTIVE is off. Previews (dryRun) and switching things off pass. Rules and the autoresponder never act by themselves on a high-risk message. This narrows what a persuaded model can do; it cannot read intent (see the threat model).
What is scanned. The scan walks a whole result and reads every string in it: deeply nested ones, any field (not only body and subject), nodes without an id, and text split across adjacent fields. Hidden characters (control, zero-width, direction-changing, compatibility forms) are normalised before the patterns are matched, at every size, so a word split by one is still found. A result part that is not JSON is read as plain text, and structuredContent and resource parts are scanned too. An object key longer than 24 characters or containing whitespace is scanned as text. Short machine fields (id, date, mimeType, hash, size and the like) are skipped only while the value looks like what the key claims. A big result that is clean is scanned without tainting the session. get_events results are scanned too (sender, subject and detail of each event), and a high rating there taints the session like a message does.
The scan has a budget. At most 24,000,000 characters and about 1 second of work per result. Only when that runs out is whatever was not looked at reported as high risk with the reason oversized-unscanned, which taints the session exactly like a message that reads like an instruction, so that padding cannot buy a bypass. The cost: a very slow machine can run out of time on a large result that is entirely harmless and taint the session early; the tools that reach outside then ask for confirmed: true as described above (or for your approval, with PROTONMAIL_APPROVAL).
One large mail text. When a single mail text is longer than 512 KB (512,000 characters), it is not matched whole: its two ends and a few windows between them are assessed, and the assessment reports oversized-unscanned ... (partially assessed) as high risk, so such a message taints the session like one that reads like an instruction. In short: a single mail text above 512 KB counts as high risk. Ordinary mail below that size is assessed whole.
Known gaps. Short object keys (up to 24 characters, no whitespace) are not scanned; a space-free, filename-like value under a key such as id is skipped as a machine field and not scanned; a result that is not JSON and is longer than 2,000,000 characters has only its first and last 100,000 characters scanned (and is reported as high risk). Text you own can taint a session as well: logs, templates or rules that contain instruction-like phrases read as such. The patterns remain pattern-based: the scan narrows common tricks and does not read intent.
Human approval (MCP elicitation)
confirmed: true is an argument, so a model that was persuaded (or a mail that says "pass confirmed") can set it itself; the gate above is a speed bump, not a lock. With PROTONMAIL_APPROVAL set, the server asks you, through the client, and only your answer counts:
| What happens |
| Nothing changes: |
| For a call that needs approval, the server sends an MCP elicitation request and runs the call only if you accept. If the client does not support elicitation, nothing changes (the model's |
| As |
In elicit (with a client that supports it) and in require, a confirmed the model passes is ignored: it is removed from the arguments before anything looks at it, so the model's word never counts, only yours. Which calls ask: the ones the confirmation gate covers (sends, replies, forwards, send_draft, schedule_draft, deletes, empty_folder, unsubscribe_sender, respond_to_invite, apply_rules with dryRun: false, bulk and thread deletes and trashes, switching on set_autoresponder, set_rule with forwarding, adding the \Deleted flag), plus approve_plan, send_test_email, delete_draft, delete_template and delete_label. A preview (dryRun) does not ask.
What you are asked. A question with the tool, the account and the details that decide the effect: the recipients that will really be used (for a stored draft, those in the draft), the subject, how many messages, or what the plan would change. For the calls that change standing behaviour or touch many messages the question carries the effect too: set_autoresponder (on or off, mode, whether it answers people outside your contacts, subject and text, window, limits, rules), set_rule (the rule as it would be stored, from the proposal or stored rule it names, and for forwarding the cap of 50 messages a day), apply_rules (the matches of a real run, counted per rule), bulk_delete with a filter, empty_folder and delete_folder (a message count from the local index, which may be out of date, shown as "count unknown" when the index has nothing for the folder), unsubscribe_sender (by mail or by a link the server does not open), respond_to_invite (organiser and event) and send_test_email. The summary is built by the server from what it knows (its own stores and the call's arguments), never from text the model wrote about the action. Pieces that come from mail (subjects, addresses, ids) are shown as quoted single-line values, stripped of control, bidirectional and zero-width characters and cut short, after a fixed label; the whole text is cut at 1,500 characters (2,500 for set_rule, set_autoresponder and apply_rules) and only the first three messages are listed. A lookup that takes more than 5 seconds or fails leaves that line out; the question is still asked.
For a reply or forward the recipients shown are the ones the reply tool will really use, Reply-To included, marked when it differs from the sender. set_contact and import_contacts show the person, aliases (as stored), tags, merge target (both people and the name that remains) and, for an import, the file, its card count and the first 20 people with their addresses. With approval on, a set_contact that sets aliases, a name or a merge, and every import_contacts, is always asked about. With PROTONMAIL_APPROVAL=off nobody is asked and the model's own confirmed is all there is.
What you approved is what runs. For send_draft, schedule_draft, delete_draft, approve_plan, import_contacts, set_rule and set_autoresponder, the server keeps a digest of the draft, plan, vCard file, rule or automatic reply it showed you, on the call itself under a symbol that JSON from a client cannot carry, so the model can neither set nor forge it. If the content is different when the call runs (a draft edited in between, a file replaced, a rule or automatic reply changed), the call is refused and you are not asked to approve something else by accident. schedule_draft sends the snapshot it took when it was scheduled. The confirmation gate and the handlers read dryRun, enabled, active and action the same way; a malformed value gives the same error in both, instead of one skipping the gate.
If you decline, dismiss it, do not answer within PROTONMAIL_APPROVAL_TIMEOUT_SECONDS (default 120, 1 to 3600), or the question cannot be delivered, the call is not run and the model is told not to retry unless you ask.
Limits: elicit on a client that cannot ask falls back to the model's own confirmed: true, so it is not a lock there; only require fails closed. This also depends on the client. A client that shows the question without its details, or that answers it automatically, takes the protection away; which clients support elicitation, and how they present it, has not been surveyed here. The question is only as good as the facts the server has, and it cannot judge whether a send is wise. Approval does not replace read-only mode, PROTONMAIL_ALLOWED_ACTIONS, the outbound allow-list or the other checks, which run as before.
Mailbox events (get_events, protonmail://events)
What happened while nobody was asking, kept as a small log per account in the data directory (events.jsonl). get_events (CLI: events) returns the newest events, or only what is new since a cursor: pass the returned nextCursor back as sinceCursor. The cursor survives restarts; missed: true means older events were dropped to keep the log small. types takes event types or a whole group (mail, snooze, send, autoresponder, plan); limit is 1 to 200 (default 50); account narrows it.
Type | Meaning |
| Recent unread INBOX mail from someone else that a sync brought in (at most 25 per sync, from the last 7 days); the overflow event says how many more were not listed |
| A snoozed message returned, or the attempt failed |
| A reply reminder came due with no answer |
| A queued or scheduled send went out, or failed |
| A rule acted on a message |
| The automatic reply was sent, drafted, or failed |
| A triage plan was applied or taken back |
| A delegation grant was spent on a send |
An MCP client that supports resource subscriptions can subscribe to protonmail://events (the only resource that can be subscribed to) and is told when it changes, instead of polling; nothing is watched until a client subscribes. Notifications are batched (about half a second), and events that another server process wrote to the same data directory are noticed within about 5 seconds.
Retention and content: at most 1000 events or 512 KB per file, two generations kept, then the oldest are dropped; when that happens the newest 200 events of each type that matters (sends, delegation use, plans, rules, reply reminders, snoozes) are kept. No message bodies: an event holds a type, a time, an id, and for some the sender address, subject and a short detail (cleaned, and cut to 254, 160 and 300 characters). Events with a sender, subject or detail carry untrusted: true: that text came from a mail, so it is data, never an instruction. The result of get_events is scanned by the mail firewall, and a high rating taints the session.
Flood limits: mail.new is recorded at most 50 per sender and 200 in all per hour, so a sender or a burst of spam cannot fill the log; the excess is counted in a mail.new_overflow event (at most 20 of those per hour).
Limits: events are recorded only while a server (or a command that runs the same code) is running, and new-mail events only while background sync runs; mail that arrives while nothing runs is announced by the first sync afterwards, and only if it is still unread, from the last 7 days and among the newest 25 of that sync. A message already announced is not announced again. The log is a convenience for noticing, not an audit trail (that is the audit log).
Delegation grants (PROTONMAIL_DELEGATION=on)
For narrow, repetitive sends you can hand the assistant a grant instead of answering every question: "these tools, to these recipients, this many times, until this date". It is off by default; with PROTONMAIL_DELEGATION=off grants are ignored.
Grants are made only by a human, on the command line: grant-create --tools send_email,reply_to_email --recipients pat@client.example,@my-team.example --expires 7d --uses 5 --note "weekly report". It requires an interactive terminal (stdin and stdout) and a typed confirmation: the whole grant is shown and you type a phrase such as grant 2 recipients back; grant-revoke asks the same. There is no flag or variable that answers for you, so a script or a shell command run by the assistant is stopped. There is no tool that creates, widens or revokes a grant; the model can only read them with list_grants (CLI list-grants). The CLI also has grant-list (--all includes spent, expired and revoked ones) and grant-revoke <id>. Grants live in grants.json in the account's data directory.
What a grant can cover: only send_email, reply_to_email, reply_all_email, forward_email, send_draft and schedule_draft; recipients as exact addresses or @domain (exactly that domain: no wildcards, no subdomains; at most 50); at most 50 uses and at most 30 days; a note of up to 200 characters. Every To, Cc and Bcc address that the send will really use must match, so a reply is matched on the recipients worked out from the message and a draft on the ones in the draft. An address that cannot be read exactly (non-ASCII look-alikes, odd formatting) is never covered. What a grant cannot cover: deletes, empty_folder, rules, the autoresponder, plans, flags or anything else.
It stands in for the answer only where one would be asked (your approval, or confirmed: true under PROTONMAIL_CONFIRM_DESTRUCTIVE or a mode that confirms). It never bypasses the taint gate (after a message that reads like an instruction to an AI, grants do not apply and you are asked), read-only mode, PROTONMAIL_ALLOW_SEND, PROTONMAIL_ALLOWED_ACTIONS or the outbound allow-lists; those still run. A use is spent before the mail is sent ("claim before send"), in one locked step shared by every server process on the data directory, so two processes cannot both take the last use. The use is written to the audit log and as a delegation.used event. It is at most once: a send that then fails does not give the use back (and a crash can never create an extra one). A call that a grant answers for carries no draft digest (nobody was asked), so a draft edited in the short window between the grant check and the send is not caught by a digest; that gap is known and open. A grant that no longer covers the call at that point (used up, expired, revoked, a draft edited in between) stops the send. An unreadable grants.json honours no grant. A stored grant whose createdAt is missing, or whose expiresAt is more than 30 days after createdAt, is not honoured either (the cap is checked on read, not only when the grant is made). A forward grant covers only messages of the grant's own account, and so does a reply: it must be sent from the account of the original message. A mail scheduled with schedule_draft goes out as the snapshot taken when it was scheduled.
The boundary, plainly. Grants protect against a model that has only MCP tools. They do not protect against a model that can write files or run a shell: grants.json is a plain file in the data directory and is not signed, so such a model can write a grant itself. The terminal and typed phrase stop a shell command, but not a model that drives a pseudo-terminal and types the phrase. If your client gives the model file or shell access, do not rely on grants. A key held in the system keychain, so that a file alone is not enough, is a possible future step; it is not built.
A forward grant is the whole mailbox. A grant on forward_email lets the model forward any message of the grant's own account to the granted recipients, not one thread. Grant forwarding only to addresses you would trust with the entire mailbox.
Limits: a grant is a standing permission for whoever can reach the assistant while it lasts, so keep recipients narrow and expiries short. It does not judge content: within its recipients, a persuaded model can send what it likes until the uses run out.
Brief (what changed since you last looked)
get_brief (CLI: brief) reports from the local index how much mail came since the last brief, split into people and automatic mail, what waits for your reply, replies you are waiting for that are overdue, and suspicious mail (see the mail firewall above). markSeen moves the "since" mark, so a daily run reports only the day. To get it without opening anything, run it from your system's scheduler:
proton-mail-bridge-client brief --sync --mark-seen --notify--notify shows the few lines as a system notification (macOS and Linux with notify-send). schedule --job brief prints the launchd, systemd, cron or Windows task definition that runs it every day (it installs nothing).
Tidy in one approval (plan_inbox)
Ask Claude to tidy the inbox and it prepares a plan: a numbered list of changes that can all be taken back (archive, move, mark read, label), from its own proposals and from a scan for automatic mail nobody reads (unread for 3 days, or read and over 14 days old). Nothing changes until you approve. approve_plan applies everything, only some numbers, or everything except some; each change goes through the same runtime policy as the single tools. undo_plan puts the applied changes back (mail returns to its folder, read marks and labels are reverted). Senders of scanned items you left out are not proposed again. A plan never contains delete or trash.
Taking back a bulk action. bulk_move, bulk_update_flags and a manual apply_rules now return an undoId; undo_plan with that undoId puts back what the call really changed (for a move, it finds the message in its new folder by id, then by Message-ID, and only when exactly one message matches). The journal is kept 7 days (at most 100). Undo goes through the same mode and approval checks as the original action. Permanent deletes, forwards and empty_folder cannot be taken back and are marked so; bulk_delete to Trash, label bulk changes, batch_email_action, thread actions and rules that run automatically after a sync are not journaled yet.
Commitments ("I'll send it by Friday")
A local ledger of what you promised and what was promised to you. find_commitments reads recent sent mail (and, if you ask, mail from people) and returns sentences that look like promises, in English, Polish and German, with the date each names ("by Friday", "do piątku", "bis Freitag", 05.11.). They are only candidates: Claude confirms with you, then set_commitment records the real ones. list_commitments shows each open entry as overdue, due today, open or probably done (the person who owed it wrote again in the thread). Overdue and due-today entries appear in the brief. Closing an entry is set_commitment with id and status. Nothing in the mailbox changes.
Style profile (drafts that sound like you)
get_style_profile works out how you write from your own sent mail, on your machine: language, how you open and close ("Dzień dobry {name},", "Cheers"), tone, typical length. It returns a few plain hints for drafting, overall and for a given recipient or company ("to pat@client.example you write in Polish, formally"), and the server tells Claude to call it before drafting. The profile is cached for a week in style-profile.json and holds patterns and counts only: no sentences, no names.
Search by meaning (several wordings)
search_indexed_emails takes queries: several wordings of one question, up to 8. Claude supplies the variants (synonyms, other languages: ["deposit", "kaucja", "Kaution", "rental agreement"]), the server searches each in the local index and fuses the results, so a message found by several wordings ranks first and every hit says which wordings found it (matchedBy). By default there is no model and no download: the meaning comes from the model you already use. What it cannot find is mail that uses none of the words tried.
Optional: search by meaning with vectors. Set PROTONMAIL_EMBEDDINGS_URL to an embedding endpoint you run, and search_indexed_emails gains mode: lexical (words), semantic (vectors) or hybrid (both, fused). Unset, which is the default, none of this runs and nothing is built. No model is shipped or downloaded.
Endpoint. Ollama (
http://127.0.0.1:11434/api/embed) or anything OpenAI-compatible (a URL ending/v1/embeddings).PROTONMAIL_EMBEDDINGS_MODELnames the model (defaultnomic-embed-text).Privacy. The text of each indexed message that gets a vector (subject, sender and the first 1000 characters of its preview), and each semantic query, is sent to that endpoint. Only a host on this machine (loopback) is accepted. A remote host is refused unless you set
PROTONMAIL_EMBEDDINGS_ALLOW_REMOTE=true, which logs a warning; your mail text then goes to that host. Redirects are not followed.What is built. Vectors for the newest 10000 indexed messages, built in the background and stored in
mail-embeddings.binnext to the index. It is derived from your mail, so treat it like the index.get_index_statushas anembeddingsblock: configured, model, vectors built, pending.Fallback. The default
modeishybridonce the endpoint is set up and vectors exist, otherwiselexical. If semantic ranking cannot run (endpoint down, no vectors yet) you get the lexical result, withmodeandsemanticNotessaying why. Semantic hits carry a cosinesimilarity.Quality is your model's. Results are only as good as the embedding model you pick. A small local model can miss what a person would call obvious or rank a loose match high; treat
similarityas a hint. This project has not compared models.
Contacts (people, not addresses)
find_contact (CLI: find-contact) finds a person by name, part of a name or address and returns them as one identity: their addresses (merged ones included), organisation, tags, your notes, first and last contact, message counts both ways, the last few subjects, and whether you have ever written to them. Counts, dates and names come from the local index each time; only what you say is stored. set_contact sets a display name, notes, aliases (nicknames) and tags (such as vip), merges another address into the same person, or splits one out again. import_contacts reads a local .vcf file (vCard 2.1, 3.0, 4.0) and takes name, e-mail addresses, organisation and note; it fills only what is not set yet, never reads CATEGORIES and never sets a tag, so a file cannot mark anyone as a VIP. An import also never attaches an address to a person who already exists: a card that names a known person (or whose address belongs to another person) adds nothing for those addresses and is reported under conflicts (the first 20, with conflictCount for the total). Merging two addresses into one person is something only set_contact with mergeWith does, so a file cannot give its own address someone's tags. A tag can be used in an autoresponder rule as tag:vip in from. Because tags change what the autoresponder does, set_contact and import_contacts are gated like the tools that reach outside: after a suspicious message was read in the session they ask for confirmed: true (or for your approval, with PROTONMAIL_APPROVAL). Addresses that are not plain valid addresses (control, bidi or invisible characters in a store file) are left out of every result and hint. With PROTONMAIL_APPROVAL=off (the default) nobody is asked when contacts change: set_contact and import_contacts run at once, and the only check is the model's own confirmed: true, which is asked for only after a suspicious message was read and which the model can set itself. Because aliases and names decide whom resolve_recipient suggests, use PROTONMAIL_APPROVAL=elicit (with a client that supports elicitation) or require for contacts that feed recipient suggestions: then you are asked every time a call sets aliases, a name or a merge, and for every import, and a confirmed from the model is ignored. The approval questions for set_contact and import_contacts are built from the contact store's own dry run (the very code the call then runs, on a copy of the store), so they show exactly what will be stored (the effect first, then the people the call started from; at most 5 addresses and 5 tags per person, the rest counted; an import lists the first 20 cards with at most 3 addresses each, after its summary): each person's final name with its source (set by you or imported from a vCard file), aliases and addresses, or why the call will be refused; they are not worked out a second time. A call that would be refused is not put to you at all, and the answer is bound to what you were shown: the contact service recomputes what the call would store inside its lock, and if the contacts changed while you decided (another call, another process) the call is refused as stale and nothing is stored. Tags that a merge carries over are shown. The approval question for set_contact lists all aliases (each exactly as it will be stored, with a note when cleaning changed it), for an unmerge the addresses that stay together and the name and aliases that stay with them, and for a merge (mergeWith) it shows both people as stored (name, aliases, addresses), which address ends up first and the name that remains (the name the call sets, if it sets one). The question for import_contacts lists the first 20 people of the file with their addresses and says how many more cards there are. A name that came from an imported file is never an exact match on its own (resolve_recipient rates it likely at most), because it is whatever the file's author wrote, until you give the contact a different name with set_contact; passing the same imported name again (which an unmerge asks for) keeps it marked as imported. In a merge, a name keeps the imported mark when it equals the imported name of either person being merged; any other name becomes a name you set yourself, and the approval question says which. The approval questions for a merge and an unmerge say when a name came from an imported file, and show every name and alias exactly as it will be stored (invisible characters removed), noting when cleaning changed what was given.
Nicknames and typos: aliases and resolve_recipient. set_contact takes aliases: up to 10 nicknames per person (each 1-40 characters, no @), replaced as a list, an empty list clears them. An alias belongs to one person: the same alias (case, diacritics and full-width forms ignored) for a second person is refused, and the error names the first; so is an alias that is another person's display name, and a display name that is another person's alias (an import leaves such a name out and lists it under nameConflicts). A merge that would give one person more than 10 aliases is refused, naming the aliases that do not fit, rather than dropping any. Splitting an address out of a merged person (unmerge) is refused while the people left would keep a name or aliases, so a merged-in address cannot be left holding "Boss": clear them with displayName: null and aliases: [] in the same call and set them again where they belong. find_contact matches aliases and shows them.
resolve_recipient (CLI: resolve-recipient <text>, read-only, also in the reader profile) turns what you typed for a recipient (a name, a nickname, a part of a name, or an address that may have a typo) into a short list of candidates with the real address, a confidence (exact, likely, possible) and matchedBy (displayName, alias, address, typo-of-address, name-prefix), plus multipleFits: true when more than one candidate is likely or better. Candidates come only from your saved contacts, the people you saved with set_contact or import_contacts. Nothing is taken from your mail: not from the index, a header, the Sent folder or any message. The reason is that all of that is text a sender controls (a reused Message-ID, a forged From, a lookalike address in a Cc), and a recipient chosen from it could be an attacker's. Someone who is not saved gives no candidate, and the result tells the caller to ask you for the address. multipleFits: false does not mean "no need to ask": every result with a candidate carries askBeforeUse: true, and a single candidate is shown to you and confirmed like several. A person with more than one address (merged addresses) that is found by name or alias comes back with needsAddressChoice: true, all addresses and no single address, so no merge can quietly make a nickname point at one address: you say which. Matching ignores case and diacritics (Polish letters included) and folds full-width letters (NFKC); letters of another alphabet that merely look alike (a Cyrillic "а" for a Latin "a") are different letters and are not unified. An entry with an @ is compared with the saved addresses only, up to 2 edits: one edit away from an entry that is not an address at all is likely, two edits possible. A query that is already a valid address and is not saved is never corrected: it may be a different person's address, so the nearest saved contacts are shown as possible only, with their full address and name, next to a note saying the query was not replaced. It never picks for you: it only suggests, the client is told to show the candidate and the real address and to ask before using it, and nothing is ever substituted or sent on its own. Names imported from a vCard file are labelled imported from a vCard file, not saved; they are text someone else wrote, shown and never followed. The same holds for create_draft, the reply and forward drafts, send_email and the other tools that take to, cc or bcc: when an entry is not a valid address, the error keeps its original text (cleaned to one short line, since an entry can be text a mail header carried, as in reply-all and forward) and adds up to 3 suggestions from the saved contacts of the account the call works on (named by account, the email or draft id, or from, else the primary) as text, naming that account; a person with several addresses is listed with all of them and "ask which"; an entry that is a valid address is never looked at or changed (a valid address with a typo in it, such as ann@exmaple.com, is not corrected: use resolve_recipient for that).
The limit on Polish inflection. Names change their ending in Polish ("Maciek", "Maćka", "Maćkowi"). resolve_recipient does not know Polish grammar and has no dictionary; it recognises a few common patterns only: a name with up to 3 extra letters at the end ("Jana" for "Jan", "Piotrowi" for "Piotr"), a final vowel that changes ("Kasię" for "Kasia", "Mamy" for "Mama"), the "-ek" / "-iek" names that lose the "e" ("Marka" for "Marek", "Maćka" for "Maciek"), and the start of a name typed so far ("Mac", at least 3 letters, possible only). Other forms (a changed stem such as "Ewie" for "Ewa", a diminutive that is not stored as an alias, a surname in another case) are not found: add the form you use as an alias. Names in other languages get the same rules, which fit them by chance only. Only saved contacts are searched, for names and for addresses: a person who has only written to you and is not saved gives no candidate (find_contact still shows what the index knows about them, for your own reading).
Proton's own address book. Reading or syncing Proton's own address book is not possible through Bridge (it exposes IMAP and SMTP only). Until Proton offers an official, supported way to sync contacts other than exporting a .vcf file, contacts here are a local store you fill with import_contacts. Some community tools reach Proton's contacts and calendar through Proton's undocumented private API; this project does not, because that needs your real Proton account password (not just the Bridge password) and can break without notice. We are waiting for Proton to expose a supported way and will add it then.
Limits: at most 5 MB and 5000 cards per import (the result says if cards were left); nothing is fetched over the network and nothing changes in the mailbox. This is a store of your own (in the account's data directory, one per account), not Proton's address book, which Bridge does not expose: export your contacts from Proton as vCard if you want them here. A name taken from mail headers is whatever the sender wrote; it is cleaned of control and invisible characters and shown, never followed.
Own categories (separate from Proton's)
Proton Mail sorts mail into its own categories. According to public sources they are server-side and not exposed over IMAP, so this server cannot read what Proton decided, change it or add to it. These categories are a different thing: yours, kept on this machine, per account. define_category gives one a name, a description in your words (shown, never used for sorting), and the signals that put mail in it: example senders (a@b.example, or @b.example for a domain), subject words, list/bulk mail or not, mail from people you have written to, and optionally a label to add. The name, description, label and keywords are checked for text that reads like an instruction to an AI and are refused if it does; that check folds compatibility forms, drops invisible characters and reads Cyrillic and Greek look-alike letters as Latin, but the folding is partial: a heuristic, not a complete list of disguises. starter: true adds a starter set (Receipts, Newsletters, Social, Updates, People) when you ask for it. A name that matches one of Proton's is reported as a clash.
categorize_inbox sorts the newest INBOX messages (default 30, up to 100) and says why for each one. It is deterministic: no model decides, and who the sender is counts only when the message passed authentication. By default it is a preview. With dryRun: false it makes a plan that adds each category's label, which goes through approve_plan and can be taken back with undo_plan like any other plan. Mail that already has the label, categories without a label and labels that do not exist yet are left out and listed. correct_category tells it where a message really belongs: the sender's weight towards that category goes up (stored locally), the sender's next mail follows, and the answer lists which other recent messages would change. Corrections are not copied between accounts.
Reply-To is no longer used for sorting; the sender, subject words, list headers, whether you wrote to the sender and your corrections are. define_category and correct_category change a local store, so PROTONMAIL_READ_ONLY blocks them, and they are written to the audit log.
What it does not do: see or touch Proton's categories, run by itself (it sorts what is in the INBOX when you ask), or place a message that fits no category.
Mailbox rules (suggestions, filters, cleanup, forwarding)
Proton's own filters act on new mail, the free plan has one custom filter, and auto-delete of Trash and Spam is a paid feature with a fixed 30 days (see Proton's pages on filters and auto-delete). These rules work alongside them: on mail that is already there, with a preview, and with a scan that suggests rules instead of waiting for you to write them. They run on this server, so they only act while it runs.
Scan, then decide. suggest_rules looks through the mail in the local index and proposes, with the evidence for each: newsletters and other automatic mail you never open (archive and mark as read; or move to Trash when old), people whose mail you always file in the same folder, and an old Trash or Spam that was never emptied. Each says how risky it is (low: only moves and marks; recoverable: moves to Trash; permanent: deletes). Nothing changes until you accept one with set_rule proposalId=...; delete_rule on a proposal dismisses it for good.
A rule is when (sender or *@domain, words in the subject, folder, olderThanDays, hasAttachment, automated, unread) and actions (markRead, label, archive, moveTo, trash, delete, forwardTo). A rule needs a real condition, so it cannot touch a whole folder.
By itself, on new mail, after each background sync: mark read, label, archive, move, forward. Only mail that arrived after the rule was switched on, once per message.
Only when you ask: a rule that trashes or deletes never runs by itself.
apply_rulesruns the rules on mail already in the index and is a preview unlessdryRun: false; deleting for good also needsconfirmed: true. Every action goes through the same permissions as the other tools (PROTONMAIL_MODE, allowed actions), and a disallowed one is refused before anything is touched.Forwarding (
actions.forwardTo, up to 3 addresses, optionalforwardNote) sends mail out on its own, so it is held to the rules of a send: sending must be allowed, the recipients must be allowed (not withPROTONMAIL_RESTRICT_OUTBOUND_TO_SELF), switching it on needsconfirmed: truewhenPROTONMAIL_CONFIRM_DESTRUCTIVEis on, and the rule needs a condition on the sender, the subject or an attachment. It forwards mail that arrives after the rule is switched on, once per message, at most 50 a day, with the original attachments, and by default only mail from people (not lists or automatic mail). The copy carriesAuto-Submitted: auto-generatedandX-Forwarded-By.
suggest_rules days=90 # proposals, with evidence; nothing is changed
set_rule proposalId=p-1a2b3c4d5e # accept one
set_rule name="Clients to Projects" when={"from":["*@client.example"]} actions={"moveTo":"Projects","markRead":false}
set_rule name="Boss to phone" when={"from":["boss@example.com"]} actions={"forwardTo":["me@elsewhere.example"]} confirmed=true
apply_rules # preview of what the rules would do to existing mail
apply_rules dryRun=false limit=100
get_rules # rules, waiting proposals, what the rules did latelyExport to Proton's own filters (export_sieve). Proton's filters run on Proton's servers, also while this server and your computer are off, and accept Sieve. export_sieve (CLI: export-sieve) compiles the enabled rules, in order, to one script you paste into a new Sieve filter in Proton's settings. It changes nothing and sends nothing.
Checked against Proton's Sieve page and the public source of Proton's web client (read 2026-10-29): the extensions, the
address/header/existstests and thefileinto,addflagandstopactions the script uses, and the namesarchive, folders and labels are given by.Assumed, not verified: that a custom folder is named by its path without
Folders/, a label by its name withoutLabels/, and thatexists "X-Attached"means an attachment (taken from Proton's web client). The script has not been run on a real Proton account. Paste it into the filter editor, which checks the syntax, and try it on a test message before you rely on it. The folders and labels it names must already exist.Not exported, each listed in
unsupportedwith its reason: rules on a folder other than INBOX or on age (olderThanDays), since Proton filters run once, as mail arrives; anything that trashes or deletes (here those run only on request, after a preview);forwardTo(Proton's Sieve documents no redirect, and a forward on Proton's side would skip this server's send checks); switched-off rules; rules whose only condition isunread. A condition that cannot be expressed keeps the whole rule out, because dropping it would widen what the rule matches; an action that cannot be expressed is left out of an otherwise exported rule.Known limit: locally the first matching rule that archives or moves a message decides where it goes, and the script keeps a later move from overriding an earlier one by guarding it with the earlier rule's condition. That guard can only name an earlier rule whose conditions could be exported. If an earlier rule's conditions cannot be expressed in Sieve, that rule is left out and a later rule's move is not guarded by it: on Proton a message may be moved by the later rule where locally the earlier rule would have decided. Read the
unsupportedlist for rules left out before you paste the script.Behaviour differs: the script acts on every new message, which on Proton may include mail it puts in Spam (the local rules never touch it), and your existing Proton filters run as well. Locally the first matching rule that moves a message decides where it goes; the script guards later moves the same way. A rule name, folder or label containing a control character or
${is kept out, since Proton's Sieve can read${as a variable.
The scan and apply_rules work from the local index (by default INBOX and Sent; run sync_emails for other folders), so check that it is fresh. Rules, proposals and the log live in rules.json in the account's data directory; each account has its own.
Audit log (tamper-evident)
Tool calls that change something are recorded in audit.log in the data directory, with credentials and message bodies redacted. Each entry carries a sequence number and the SHA-256 hash of the entry before it, so verify_audit_log (CLI: verify-audit-log) can tell that an entry was edited, deleted from the middle or reordered. It returns ok, how many entries it checked, the first broken seq with the reason, and the head hash. Entries written before the chain existed have no hash and are counted as legacyEntries, not checked.
What it does not catch:
Someone who can write both files. Next to
audit.logthe server keepsaudit.head, the sequence number and hash of the newest entry (written after each append). Someone who can write onlyaudit.logcannot hide anymore: deleting or truncating the newest entries, emptying or removing the file, or stripping the chain fields makes verification fail (reported asdeletedoredited), and a new entry carries on from the headaudit.headrecorded. But whoever can write both files can rewrite the chain, recompute every hash and write a matchingaudit.head, and that is not detected. Only a head hash kept somewhere else catches it: note the oneverify_audit_logreturns and compare it later; this server cannot store one out of its own reach. So this is evidence against a careless or partial edit, not a defence against someone with the same access as the server.audit.headis in the same directory as the log, so anyone (or any model with file access) who can write one can write the other; for real evidence, store the head hash elsewhere, outside the machine or at least outside the data directory.A repaired head. If
audit.headis damaged, or is unreadable and then replaced, the next entry the server records writes a newaudit.headfrom the log's own newest entry. Verification reports the problem until then, but the signal can disappear after the next append, so checkverify_audit_log(and keep the head hash) rather than relying on seeing an old failure later. Anaudit.headthat cannot be read at all makes verification returnok: falsewith the reasonhead-unreadable; the server keeps appending to the log regardless.Planted files. Every file the server reads from its own data directory,
audit.logandaudit.headincluded, is read through a regular-file guard: a FIFO, device or dangling symlink in its place is refused (ENOTREG) instead of hanging the server, and an oversized file is refused (EFBIG). Anaudit.headthat cannot be read giveshead-unreadable.Rotation. The log rotates at 5 MB into
audit.log.1andaudit.log.2, and the oldest is dropped. Verification reads all three files and reportsrotatedBeforeSeqwhen older entries have been rotated away; that is not treated as tampering, but entries before it can no longer be checked, and a head hash saved before the rotation drops out of the log cannot be found in it.A write cut short. A last line left half-written by a crash is skipped and counted (
detailsays how many), the next entry starts on a fresh line, and the entries around it are checked as usual. An unreadable line in the middle of the chain is still reported as an edit.
verify_audit_log only reads.
Multi-account support (v2.1.0+)
Use more than one Proton mailbox from the same server: either several addresses of one account (Bridge's Split Addresses feature) or separate Proton accounts signed in to the same Bridge. Each one gets its own isolated service stack, local index, and drafts storage.
Setup
In Proton Bridge, make each address or account its own login: with Split Addresses on, every address has a login; separate accounts each have their own. Bridge generates a separate password for each login, and the same password works for IMAP and SMTP. The first account is PROTONMAIL_USERNAME / PROTONMAIL_PASSWORD; PROTONMAIL_ACCOUNTS_JSON lists only the additional ones, as a JSON array on one line:
{
"mcpServers": {
"proton-mail-bridge": {
"command": "proton-mail-bridge-mcp",
"env": {
"PROTONMAIL_USERNAME": "primary@proton.me",
"PROTONMAIL_PASSWORD": "primary-bridge-password",
"PROTONMAIL_ACCOUNTS_JSON": "[{\"address\": \"alias@proton.me\", \"password\": \"alias-bridge-password\"}, {\"address\": \"business@custom.com\", \"password\": \"business-bridge-password\"}]"
}
}
}
}Instead of password an entry can use passwordFile (path to a file with the Bridge password) or passwordCommand (a command that prints it), so the password need not sit in the client config; use only one of the three. autoSyncFolder sets that account's folders for background sync (default PROTONMAIL_AUTO_SYNC_FOLDER). Folders in a list that an account does not have are skipped and reported as skippedFolders.
Listing the primary address again is refused at startup ("duplicate address"). Host, ports and the TLS mode default to the primary account's; an entry can override them with imapHost, imapPort, imapSecure, smtpHost, smtpPort and smtpSecure.
Note: The password is the Bridge password for each login, not your Proton account password.
How it works
Primary account: the
PROTONMAIL_USERNAME/PROTONMAIL_PASSWORDpair. Email IDs from the primary account have no prefix.Additional accounts: each has an auto-generated slug (e.g.,
alias,business). Email IDs carry an account prefix:alias::message-id,business::message-id.Sending:
send_email,reply_to_email, etc. route through the account matching thefromaddress. If no account matches, the primary connection is used with a header override (for non-configured aliases).Search and read: all read tools (search, threads, analytics, digest) automatically fan out across all configured accounts and merge results, preserving the account prefix in returned IDs.
One account only: the triage, statistics, draft and folder tools (
get_threads,get_inbox_digest,get_follow_up_candidates,get_labels,list_drafts,get_folders,top_senders, ...) take an optionalaccount(address or slug) to look at a single account instead of all of them; an unknown value is an error.
Tools across accounts
Fan out across all accounts:
Search & read:
search_indexed_emails,get_emails,get_threads,get_thread_by_id,count_messages,get_labels,folder_stats,top_senders,get_contacts,get_volume_trends,get_email_analytics,get_email_stats,get_foldersTriage:
get_inbox_digest,get_follow_up_candidates,get_actionable_threads,find_document_threads,prepare_meeting_contextDiagnostics:
get_connection_status,get_runtime_status,run_doctor(include anaccountsarray showing per-account status)Drafts:
list_drafts— lists every configured account's drafts, merged and re-sorted by last update; supports optionallimit/offset
Account-specific (prefix to target):
Actions:
mark_email_read,star_email,move_email,delete_email, etc. — prefix theemailIdwith account slug if targeting a non-primary accountDrafts:
create_draft,get_draft,send_draft, etc. — drafts live per account; prefixdraftIdto access non-primary draftsSend:
send_email,reply_to_email,forward_email— match thefromaddress to route through the correct account's SMTPSync and index maintenance:
sync_emails,sync_folders,run_background_sync,wait_for_mailbox_changes— passaccount(address or slug) to act on a non-primary account; without it they act on the primary account, and an unknown value is an error
Primary-only (for now):
list_remote_drafts— shows the primary account's remote Proton Drafts folder onlyThread actions (
move_thread,delete_thread,flag_thread) — operate on the account the thread ID's prefix names
Verify setup
Use list_accounts to check configured accounts and verify connection status:
proton-mail-bridge-client list_accounts --jsonOutput:
[
{ "slug": "primary", "address": "primary@proton.me", "isPrimary": true, "index": "fresh", "imap": "ok", "smtp": "ok" },
{ "slug": "alias", "address": "alias@proton.me", "isPrimary": false, "index": "fresh", "imap": "ok", "smtp": "ok" },
{ "slug": "business", "address": "business@custom.com", "isPrimary": false, "index": "stale", "imap": "timeout", "smtp": "ok" }
]Try it: example Claude prompts
Morning triage
"Give me a digest of my inbox. Flag anything that needs a reply today and anything that looks like a bill or invoice."
Inbox zero
"Go through my unread emails from the past 3 days. Archive newsletters, trash anything promotional, and tell me what's left that needs action."
Folder filing
"Find all emails from stripe.com and move them to Folders/Receipts. Create the folder if it doesn't exist."
Meeting prep
"I have a call with alice@example.com in an hour. Pull up our last 5 email threads and summarise the open items."
Draft review
"Show me my drafts, pick the oldest one, and suggest a better subject line and closing paragraph."
Calendar invitations
"Do I have any unanswered meeting invitations this week? Accept the ones that don't clash with each other and show me the rest."
Follow-up
"I just sent the proposal to Ann. If she hasn't answered in five days, remind me."
Tip: When creating folders, use
Folders/Name(not justName) — that's the Proton Bridge namespace for real folders vs. labels.
More recipes — expanded triage prompts, cron scripts for scheduled digests, and a Claude Code /mail-triage slash command — are in examples/.
Ready-made workflows. The server offers seven prompts that clients can show as menu items: Morning brief, Who is waiting on me, Waiting on others, Prepare for a meeting, Answer calendar invitations, Clean up newsletters and Draft replies. Each only instructs the assistant and says to ask before sending or changing anything. To get a digest written to a file every morning without opening Claude, see proton-mail-bridge-client schedule in docs/cli.md.
Recommended System Prompt
Add this to Claude Desktop's system prompt (Settings → Claude Desktop → System Prompt) for safer defaults:
You have access to my Proton Mail inbox via the proton-mail-bridge tool.
Rules:
- Always use dryRun: true before any batch operation (batch_email_action, apply_thread_action).
- Before calling send_email, reply_to_email, or forward_email, summarise what you are about to send and ask me to confirm.
- For anything important or hard to walk back (a wide CC list, a sensitive topic, an attachment), offer a short undo window via send_email's undoWindowSeconds instead of sending immediately — remind me it only protects against mistakes noticed in the next few seconds, not a change of mind days later.
- Before calling delete_email, confirm with me — deletion is permanent.
- Prefer create_draft over send_email when composing from scratch.
- When revising a draft, change parts of it with update_draft's bodyEdits (find/replace) instead of resending the whole body, and pass syncToRemote:false while iterating; call sync_draft_to_remote once when I say the draft is ready. Each synced edit costs seconds (see "Performance and token cost").
- Use get_inbox_digest or get_actionable_threads as your starting point for triage sessions.CLI
Every capability is also a scriptable terminal command — no Claude required:
proton-mail-bridge-client digest # morning triage summary
proton-mail-bridge-client search --from stripe.com --json | jq . # scriptable search
echo "Deploy done" | proton-mail-bridge-client send --to you@x.com --subject "Deploy"
proton-mail-bridge-client notify & # background new-mail alertsAll commands support --json for machine-readable output, and any MCP tool is directly callable via proton-mail-bridge-client tool <name> --args '{...}'.
<command> --help prints that command's usage without running it. Flags accept --flag value or --flag=value (a value starting with -- needs the = form, or must come after a bare --); unknown flags are an error. Exit codes: 0 success, 1 failure (including a failed doctor or connection-status check, or a failed item in a batch/bulk-* run), 2 usage error.
Using Lumo Desktop? See docs/lumo-desktop.md (set-up and what is not yet verified).
Full command reference: docs/cli.md (a named command for every one of the 129 tools, across read, triage, compose, mailbox actions, folders, drafts, templates, analytics, and diagnostics).
Safety controls
One switch: PROTONMAIL_MODE
If you would rather not combine the flags below yourself, pick how much the assistant may do:
| Reads | Drafts | Flags (read, star) | Archive, trash, move | Send | Permanent delete |
| yes | no | no | no | no | no |
| yes | yes | yes | no | no | no |
| yes | yes | yes | yes | yes, with | no |
| yes | yes | yes | yes | yes | yes |
A mode is a floor: the individual flags below can make things stricter (PROTONMAIL_MODE=full with PROTONMAIL_READ_ONLY=true is read-only; assisted with PROTONMAIL_ALLOWED_ACTIONS=mark_read allows only that) but never looser (drafts with PROTONMAIL_ALLOW_SEND=true still does not send). If you want a combination a mode does not give you, leave PROTONMAIL_MODE unset and use the flags. An unknown value is an error that lists the valid ones. The mode in force is shown by get_runtime_status, and the Claude Desktop bundle has a Safety mode setting for it.
All flags work in both the MCP server and CLI:
PROTONMAIL_TOOL_TIER=core # expose 25 core tools instead of all 129 — saves context window
PROTONMAIL_READ_ONLY=true # disable all write operations
PROTONMAIL_ALLOW_SEND=false # disable SMTP sends only (other writes still work)
PROTONMAIL_CONFIRM_DESTRUCTIVE=true # require confirmed:true on send, reply, forward, delete
PROTONMAIL_RESTRICT_OUTBOUND_TO_SELF=true # every send may only go to your own address — the safe way to try the server
PROTONMAIL_ALLOW_EMPTY_FOLDER=true # enable empty_folder (off by default): permanently deletes ALL messages in a folder
PROTONMAIL_ALLOWED_ACTIONS='mark_read,archive,trash' # per-action allowlistbatch_email_action and apply_thread_action both support dryRun: true regardless of the above flags.
PROTONMAIL_ALLOWED_ACTIONS gates message actions (mark read/unread, star/unstar, archive, trash, restore, move, delete, and the flag/bulk/thread variants) and deleting folders or labels (as delete). Creating or renaming folders and labels, creating or deleting templates, importing messages, and clearing the cache or index are not in that list: they are blocked by PROTONMAIL_READ_ONLY=true and nothing else. To forbid them, run read-only.
Trying it safely: PROTONMAIL_RESTRICT_OUTBOUND_TO_SELF=true. With this on, the server can compose, draft, reply, forward and send for real, but every recipient (To, CC and BCC) must be your own Bridge login address; a +tag alias of it counts as yours. Anything else is refused with RESTRICT_OUTBOUND_TO_SELF is enabled. Cannot send to: … before any mail is built or queued. It covers send_email, reply_to_email, reply_all_email, forward_email, send_draft, schedule_draft, send_test_email and unsubscribe_sender, and it is checked again when a queued or scheduled send fires, so a send queued before you turned it on cannot slip out later. It does not stop the model from writing a message to someone else into a draft; it stops it from being sent.
PROTONMAIL_ALLOW_EMPTY_FOLDER. empty_folder deletes every message in a folder at once and cannot be undone, so it is switched off unless this is true (the call then fails with a message naming the variable). When enabled it still needs an explicit confirmed: true to delete: without it, it only returns a preview of what would be removed. For anything less than an entire folder use bulk_delete.
Environment reference
# Credentials (required)
PROTONMAIL_USERNAME='you@proton.me'
PROTONMAIL_PASSWORD='your-bridge-password' # Bridge password, not Proton account password
PROTONMAIL_IMAP_HOST='127.0.0.1'
PROTONMAIL_IMAP_PORT='1143'
PROTONMAIL_IMAP_SECURE='false'
PROTONMAIL_SMTP_HOST='127.0.0.1'
PROTONMAIL_SMTP_PORT='1025'
PROTONMAIL_SMTP_SECURE='true' # true = implicit TLS, false = STARTTLS. Unset, the server tries the other mode itself if Bridge's SMTP mode differs
PROTONMAIL_IMAP_USERNAME='' # optional: log in to IMAP as a different user than PROTONMAIL_USERNAME (default: the same). The send identity, and RESTRICT_OUTBOUND_TO_SELF, still use PROTONMAIL_USERNAME.
PROTONMAIL_IMAP_PASSWORD='' # optional: a different IMAP password than PROTONMAIL_PASSWORD (default: the same)
# Secrets via file or command (avoids raw credentials in config)
PROTONMAIL_USERNAME_FILE='/path/to/user.txt'
PROTONMAIL_PASSWORD_FILE='/path/to/pass.txt'
PROTONMAIL_USERNAME_COMMAND='pass proton/username'
PROTONMAIL_PASSWORD_COMMAND='pass proton/password'
# Storage
PROTONMAIL_DATA_DIR="$HOME/.proton-mail-bridge-client"
# Tools
PROTONMAIL_TOOL_TIER='full' # 'core' exposes 25 essential tools, incl. draft review/edit and list_accounts (saves context window); 'full' exposes all 129
PROTONMAIL_TOOLSET='full' # 'full' (all tools), 'core' (the same 22 as TOOL_TIER=core) or 'reader' (read-only tools only, nothing that writes or sends); hides tools and refuses calls to them, never widens PROTONMAIL_MODE; wins over TOOL_TIER; invalid -> full
# Safety
PROTONMAIL_READ_ONLY='false'
PROTONMAIL_ALLOW_SEND='true'
PROTONMAIL_ALLOW_REMOTE_DRAFT_SYNC='true'
PROTONMAIL_ALLOWED_ACTIONS='mark_read,mark_unread,star,unstar,archive,trash,restore,move,delete'
PROTONMAIL_CONFIRM_DESTRUCTIVE='false'
PROTONMAIL_APPROVAL='off' # off | elicit | require: ask the person through MCP elicitation instead of trusting the model's confirmed:true (see Human approval)
PROTONMAIL_APPROVAL_TIMEOUT_SECONDS='120' # 1-3600: how long the question waits; no answer means the call is not run
PROTONMAIL_DELEGATION='off' # off | on: honour delegation grants made with grant-create (see Delegation grants)
PROTONMAIL_RESTRICT_OUTBOUND_TO_SELF='false' # true: sends may only go to your own Bridge login address (To, CC and BCC; +tag aliases count as yours); anything else is refused, and queued/scheduled sends are re-checked when they fire. Covers send_email, reply_to_email, reply_all_email, forward_email, send_draft, schedule_draft, send_test_email, unsubscribe_sender. The safest way to try the server.
PROTONMAIL_ALLOW_EMPTY_FOLDER='false' # true: enables empty_folder, which permanently deletes ALL messages in a folder (still needs confirmed:true; without it only a preview is returned). Off by default; use bulk_delete for a subset.
PROTONMAIL_ALLOW_UNSAFE_HTML='false' # HTML in outgoing mail is always sanitized (scripts, event handlers and remote images/beacons removed). A send that passes sanitizeHtml:false is IGNORED — still sanitized, with a warning logged — unless this is exactly 'true'. Leave it off unless you deliberately send raw HTML.
PROTONMAIL_SEND_DELAY_SECONDS='0' # >0: send_email, reply_to_email, reply_all_email and forward_email queue instead of sending immediately, cancelable via cancel_send (undoWindowSeconds overrides per call). send_draft is not delayed; use schedule_draft. Only fires while this server stays running.
PROTONMAIL_SIGNATURE='' # Plain text, appended to send_email/reply_to_email/reply_all_email/forward_email bodies (text + HTML), after your own text and before any quoted/forwarded content. Every send now goes out multipart (a plain-text send auto-gets an html alternative too), so the signature always gets its HTML treatment, not just the text/plain part. Opt out per-message with appendSignature: false. Never applied to send_draft/schedule_draft — draft content is already finalized.
#
# Note: a signature configured inside Proton Mail itself (Settings → Identity and addressing)
# is only inserted by Proton's own web/app compose UI — it is NEVER applied to mail submitted
# over SMTP by an external client, including this one. There is no way to make Bridge apply it
# for you. Set PROTONMAIL_SIGNATURE above instead if you want a signature on messages this
# server sends.
# Sync
PROTONMAIL_AUTO_SYNC='true'
PROTONMAIL_AUTO_SYNC_FOLDER='INBOX,Sent' # comma-separated folders the background sync keeps indexed
PROTONMAIL_AUTO_SYNC_FULL='false' # true: each background pass is a full sync (larger sample per folder, and messages moved/deleted elsewhere are pruned from the index) instead of incremental
PROTONMAIL_AUTO_SYNC_LIMIT_PER_FOLDER='100' # messages fetched per folder per background pass (1-500)
PROTONMAIL_STARTUP_SYNC='true'
PROTONMAIL_SYNC_INTERVAL_MINUTES='5'
PROTONMAIL_IDLE_WATCH='true'
PROTONMAIL_IDLE_MAX_SECONDS='30'
# Attachments
PROTONMAIL_TLS_CA_FILE='' # PEM file with Bridge's exported certificate: trusted when Bridge is reached by a name other than localhost (another container, another machine)
PROTONMAIL_TLS_INSECURE_HOSTS='' # comma-separated host names whose certificate is not verified, like localhost is (only for a private network you trust)
PROTONMAIL_SHORTEN_LINKS='false' # true = long tracking links in Markdown bodies become host/… (unsubscribe, confirm, reset links are kept)
PROTONMAIL_MAX_INLINE_KB='40' # in KB (older name PROTONMAIL_MAX_INLINE_BYTES still works, also in KB): largest attachment get_attachment_content returns inline as base64
PROTONMAIL_PDF_MAX_MB='10' # largest PDF get_attachment_text extracts text from (1-100 MB); bigger ones are refused with a message
PROTONMAIL_PDF_MAX_PAGES='50' # pages get_attachment_text reads from a PDF (1-2000); a longer PDF is cut off with a note saying how many pages are missing
PROTONMAIL_OCR_COMMAND='' # optional: a program run as '<command> <image file> stdout' (tesseract's convention) so get_attachment_text can read images and PDF pages without a text layer. Started without a shell, 60 s limit; unset, such images and scans fail
PROTONMAIL_INDEX_ATTACHMENTS='false' # true: text of PDF, DOCX, XLSX and PPTX attachments is added to the local index so search finds it (bounded, no OCR); more disk, slower sync
PROTONMAIL_INDEX_BODY_CHARS='220' # how much of each message body the local index keeps for search: 220 (default) to 20000. Higher finds words deep in a message but stores more plain text in mail-index.sqlite (0600, not encrypted) and roughly doubles its size per character; changing it clears the index, which is rebuilt by the next syncs
PROTONMAIL_MAX_TRIAGE_PLANS='200' # most plan_inbox plans kept (positive integer; anything else = 200). Applied plans hold the undo data and are never dropped: when all stored plans are applied, plan_inbox refuses until you undo_plan some or raise this
# Semantic search (optional; nothing runs unless the URL is set)
PROTONMAIL_EMBEDDINGS_URL='' # http://127.0.0.1:11434/api/embed (Ollama) or an OpenAI-compatible .../v1/embeddings; mail text is sent there
PROTONMAIL_EMBEDDINGS_MODEL='nomic-embed-text'
PROTONMAIL_EMBEDDINGS_ALLOW_REMOTE='false' # true: accept an endpoint on another machine (your mail text goes to that host)
# Tuning and diagnostics
PROTONMAIL_OP_DELAY_MS='0' # minimum gap in ms between IMAP mailbox operations (0-5000); raise it to be gentler on a slow Bridge. 0 = no throttling
PROTONMAIL_DEBUG='false' # true: get_connection_status and run_doctor include the raw underlying connection error text (otherwise only a classified cause and suggestion)
PROTONMAIL_CLAUDE_RUNTIME_DIR='' # where the Claude Desktop installer puts its runtime copy (default: ~/Library/Application Support/Proton Mail Bridge Client on macOS, %APPDATA%\Proton Mail Bridge Client on Windows, ~/.local/share/proton-mail-bridge-client on Linux)Ask before sending: address and signature (optional skill)
With several accounts or a signature, the server sends from whichever from the caller passes and cannot know which one you meant. skills/send-with-identity is a Claude skill that makes the agent ask "from which address, and with which signature?" before every send, reply, forward or schedule, then pass from and its own signature. On the four immediate-send tools (send_email, reply_to_email, reply_all_email, forward_email) that means appendSignature: false plus isHtml: true for an HTML signature, so nothing is doubled; drafts never get PROTONMAIL_SIGNATURE appended, so the skill writes the signature into the draft body, and send_draft/schedule_draft take no from, so the address and signature are settled on the draft first. It does not replace your explicit approval to send. Copy the folder to ~/.claude/skills/send-with-identity, and fill in your addresses and signatures there (keep that copy private).
Compared with Claude's native Gmail connector
Capability | Gmail connector | Proton Mail Bridge Client |
Setup | First-party OAuth | Requires Proton Bridge + this client |
Search and read | Native Claude UX | IMAP + local index |
Send email | No | Yes |
Draft workflows | Better first-party UX | Full control incl. remote draft sync |
Attachment content | Limited | Fetch, save to disk, read text from PDFs |
Mailbox actions | Limited | Full (star, move, archive, trash, restore, delete, batch) |
Folder management | No | Yes (create, rename, delete) |
CLI access | No | Full parity with MCP |
Privacy | Google-hosted | Proton E2E encryption, local Bridge |
Tool surface
Send
send_email · send_test_email · reply_to_email · reply_all_email · forward_email · respond_to_invite (answer a calendar invitation)
Drafts
create_draft · create_reply_draft · create_forward_draft · create_thread_reply_draft · list_drafts · list_remote_drafts · get_draft · update_draft · sync_draft_to_remote · send_draft · delete_draft
Read
get_emails · get_email_by_id · count_messages · search_emails · search_indexed_emails · list_attachments · get_attachment_content · save_attachment · save_attachments
Triage
get_folders · sync_folders · get_labels · get_threads · get_thread_by_id · get_thread_brief · get_actionable_threads · get_inbox_digest · get_follow_up_candidates · set_reply_reminder · list_reply_reminders · cancel_reply_reminder · find_document_threads · prepare_meeting_context · delete_thread · flag_thread · move_thread
Actions
mark_email_read · star_email · move_email · archive_email · trash_email · restore_email · delete_email · batch_email_action · apply_thread_action · empty_folder · bulk_delete · bulk_move · bulk_update_flags · bulk_update_labels · update_message_flags · update_message_labels
Folder management
create_folder · rename_folder · delete_folder · create_label · rename_label · delete_label
Analytics
get_email_stats · get_email_analytics · get_contacts · get_volume_trends · folder_stats · top_senders
Diagnostics
get_connection_status · get_runtime_status · run_doctor · get_audit_logs · verify_audit_log · get_events · list_grants · run_background_sync · wait_for_mailbox_changes · sync_emails · get_index_status · clear_cache · clear_index · get_logs
Unsubscribe & trust
get_unsubscribe_info · unsubscribe_sender — get_email_by_id also returns a security block (DKIM/SPF/DMARC, encryption, spam score)
Undo-send, scheduling & snooze
cancel_send · list_scheduled_sends · schedule_draft · snooze_email · cancel_snooze · list_snoozed — send_email, reply_to_email, reply_all_email and forward_email queue instead of sending immediately when PROTONMAIL_SEND_DELAY_SECONDS is set; all three only fire while this server process stays running, see Operational notes
Templates
create_template · list_templates · get_template · delete_template · render_template — {{variable}} substitution, render then pass the result to send_email
Contacts & categories
find_contact · resolve_recipient · set_contact · import_contacts · define_category · list_categories · categorize_inbox · correct_category — see Contacts and Own categories
Import/export & attachments
export_email · import_email · get_attachment_text · get_emails_by_ids
get_attachment_text reads text-like attachments and PDFs. A PDF comes back page by page, each page headed --- Page N of M ---, and the result has a pdf field with totalPages, extractedPages, omittedPages and truncated. It is limited by PROTONMAIL_PDF_MAX_MB (default 10) and PROTONMAIL_PDF_MAX_PAGES (default 50); past the page limit the text ends with a line saying how many pages were left out. A password-protected PDF, a damaged file and a scan without a text layer each fail with a short explanation. The PDF is read in memory with unpdf (pure JavaScript, no native module): nothing is written to disk, nothing is downloaded, and a document that takes longer than 30 seconds is stopped.
It also reads Word, Excel and PowerPoint files (.docx, .xlsx, .pptx): a DOCX as its text, an XLSX as each sheet's name followed by its cells row by row, a PPTX slide by slide. They are opened in memory by a small built-in reader (no Office, no macros run, nothing written to disk). Limits: files up to 20 MB, the text cut at 500000 characters, and a ZIP with too many or too large parts is refused. Not supported: the old binary .doc, .xls and .ppt, password-protected files, and files with a DTD declaration; they are not read. Text inside images or embedded objects is not read either. Office files are read in a separate process (a worker thread only when the server runs inside Electron) with a 10 second limit, so a heavy file cannot stall the server; control characters in the text are dropped. With PROTONMAIL_OCR_COMMAND set (for example tesseract, or with arguments such as tesseract --psm 6; words are split on spaces, single and double quotes group, and there is no shell, no variable or glob expansion), an image, and up to 10 pages of a PDF that has no text layer, are read by that program instead of failing; it is run without a shell as <program> <arguments> <image file> stdout, with a 60 second limit (the process is killed with SIGKILL at the limit), on images up to 20 MB. OCR is off unless you set it, and its output is only as good as the program's. With PROTONMAIL_INDEX_ATTACHMENTS=true the text of PDF and Office attachments (up to 8000 characters per attachment and 32000 per message, the first 20 pages of a PDF, no OCR) is added to the local index when a message is synced, so search_indexed_emails finds words that appear only in an attachment; an attachment that cannot be read is skipped.
Using it as a library
Beyond the CLI and MCP server, the underlying service classes are importable directly:
import { SimpleIMAPService, SMTPService } from "proton-mail-bridge-client/services";
const imapService = new SimpleIMAPService(config, logger);
const smtpService = new SMTPService(config);proton-mail-bridge-client/services has no side effects on import — unlike the package's
main entry point, which also self-starts the MCP server when run directly. Also exported:
all shared types (ProtonMailConfig, EmailSummary, EmailDetail, …), planFolderSync,
isLikelyAuthenticationError, and sanitizeHeader.
Performance and token cost
Measured against a real Proton Bridge with a ~57,000-message mailbox (INBOX 29k, Archive 23k, Sent 5k), September 2026. Your numbers depend on mailbox size and machine; the ratios are what to rely on.
Call | Typical time |
| ~10 ms |
| ~0.2 s |
| < 1 s |
| ~2 s |
| ~1 s |
| ~2–2.5 s |
| ~1.6 s |
| ~2.5 s |
| ~5.5–7 s |
| ~3 s |
| ~15 ms |
Bridge answers IMAP SEARCH itself, and its cost grows with folder size. That is why a live search is slower than the local index, and why narrowing the scope matters most.
Local index: filters and thread tools
Measured in October 2026 (v2.7.0) on a copy of the same ~57,000-message index. "Warm" is a second call; the first call after the index changes (a sync, or another process writing to it) builds a map of which thread every message belongs to, which takes about 0.5 s (0.8 s for follow-ups and the digest) and about 31 MB of memory.
Call | Warm |
filter by | ~20 ms |
filter by | ~40 ms |
| ~25 ms |
| ~40 ms |
| ~1 ms |
| 20-40 ms |
| ~80 ms |
| 17-35 ms |
| ~30 ms |
| ~225 ms |
Make searches faster
Prefer
search_indexed_emailswhen the index is current (get_index_status,sync_emails). It does not touch Bridge at all.Pass
folderwhen you know it. With nofolder,search_emailscovers every real folder and skips All Mail, Labels/* and Starred: those are views of mail that already lives in INBOX/Sent/Archive, and scanning them made an all-folders search about three times slower and inflatedtotalMatched. Passfolder: "All Mail"(or"Labels/x") to search a view on purpose.Use
labelfor labels. On Proton Bridge a label is the folderLabels/<name>, solabel: "Newsletters"searches only that folder. A name that matches no label answers immediately with nothing instead of scanning.Date filters are the cheapest filter Bridge offers — about 1 s in INBOX and 2–2.5 s across every real folder, against 1.6 s / 5.5 s for
subjectand 2.5 s / 6–7 s for free-textquery. When you can say when ("last week", "this month"), lead withdateFrom/dateTo. Even a wide range is fine: everything older than a year (about 20,000 messages) still took under 2 s.Adding a date range to a text search does not make the text search faster. In INBOX,
dateFrom(last 30 days) +subjecttook about as long assubjectalone (1.6 s vs 1.6 s), and +query2.1 s vs 2.5 s: Bridge still does the text work. Use dates on their own to find the window, then search inside it (for example byfolder, or by fetching that window and reading it).Free-text
querysearches message bodies on Bridge's side and is the slowest filter;subjectandfromare cheaper.(Single runs on one machine, so read them as ratios, not guarantees.)
Keep responses (and token use) small
List and search results are compact by default: attachments are metadata only, and empty or derivable fields are left out. Pass
fields: ["subject","from","date"]to trim further — 10 results is roughly 800 tokens that way, versus about 11,000 for 50 full results.Defaults are bounded:
search_emails/search_indexed_emailsreturn 50 (passlimitfor more),list_drafts20,list_scheduled_sends50 newest first. Each reportshasMore; page withoffset.Draft and queued-message bodies are shortened to a preview in list and update responses (
bodyTruncated,bodyLength); useget_draftfor one full draft. Attachment content is never inlined in a listing.Large attachments: set
PROTONMAIL_ALLOW_FILE_DOWNLOAD_DIRand passsaveTo, rather than raisingPROTONMAIL_MAX_INLINE_KB. Do not pointPROTONMAIL_ALLOW_FILE_DOWNLOAD_DIRat a broad directory such as$HOME:save_attachmentcould then overwrite shell startup files, LaunchAgents or~/.claude/settings.json. The server refuses destinations inside any account's data directory (itsattachmentsfolder excepted) and the trusted CA file (save_attachment(s),export_email), even when the download directory contains them, but it protects nothing else. This was already true before 2.17.Office files are read in a small pool: at most 2 documents at a time, up to 16 waiting (further ones fail with a
busyerror), each reader memory-limited and each job stopped after 10 seconds from its start. PDFs have their own pool with the same 2 and 16.PROTONMAIL_TOOL_TIER=coreexposes 22 tools instead of 129: about 8k tokens of tool definitions instead of about 37k, paid on every conversation that loads the server. These are estimates (the JSON of each tool's name, description and input schema, divided by four), not a tokenizer measurement.coreis built for thedraftsmode: it can read, search, draft and reply-draft, but has no tool that sends, moves, archives or deletes; setPROTONMAIL_TOOLSET=fullfor those.Repeating an
update_draftthat changes nothing on a draft whose remote copy is already in sync does no store write and no IMAP upload. (A draft whose last sync failed, or that was edited withsyncToRemote:false, still syncs.)
Working with drafts
Drafts live in a local store first; the copy in Proton's Drafts folder is a separate upload.
Edit a long draft with
bodyEdits, not by resendingbody.update_drafttakesbodyEdits: [{find, replace}](optionallyall:true) and changes just those fragments of the stored body: a two-sentence change to a ~14,000-character draft is a request of about 200 characters instead of about 14,000 (roughly 70 times smaller), and the model only has to write the words that change. Eachfindmust match exactly once (add surrounding text, or setall:true); otherwise nothing is changed and the error says which edit failed and why. Edits apply in order, all-or-nothing, and match the stored text literally — for an HTML draft, the HTML source. Pass eitherbodyorbodyEdits, not both. The response reportsbodyEditsApplied.Each
update_draftuploads the whole draft to the Drafts folder (the full message, attachment bytes included — about 1.4 MB of MIME for a 1 MiB attachment) unless you passsyncToRemote:false. That upload is the slow part, and it is Bridge's, not ours: on the reference mailbox a local edit takes 2–6 ms, the first sync of a draft about 1.5 s, and a later sync that replaces the previous remote copy about 3.5 s (upload ≈ 1.4 s, then Bridge deleting the old copy ≈ 2.1 s; Bridge does not replace a draft appended with the same Message-ID, so the delete is required). Sending a change asbodyEditsor as a fullbodycosts the same on the server side;bodyEditssaves the model's tokens, not Bridge time. So when you are making several edits in a row, do them withsyncToRemote:falseand finish with onesync_draft_to_remote— six edits are then about 3.5 s of waiting instead of about 20 s.The response stays small however big the draft is.
create_draft, the reply/forward/thread-reply draft creators,update_draftandsync_draft_to_remotereturn a body preview and attachment metadata only (an edit of a ~200 KB draft cost about 300 tokens; a draft with a 1 MiB attachment about 220–300). Onlyget_draftreturns the full body and attachment content.Nothing to do if nothing changed: repeating an
update_draftthat changes nothing on an already-synced draft does no write and no upload.list_draftsis local and returns the 20 most recently updated (hasMore,offsetto page);list_remote_draftsreads the Drafts folder over IMAP (about 15 ms for 79 drafts).Large attachments make every draft operation slower. The store is one JSON file, so an edit reads and rewrites the whole file, attachment content of every draft included. In a benchmark (mocked IMAP), a tiny edit took about 1 ms normally and about 15 ms when a different draft held a 10 MiB attachment. If you edit drafts constantly, attach big files as late as possible.
A draft cannot be edited while it is being sent, and simultaneous syncs of the same draft are serialized (so two clients cannot upload two copies).
IMAP IDLE and the shared connection. The server keeps one IMAP connection per account. The IDLE watcher (PROTONMAIL_IDLE_WATCH, on by default) waits on it, and since 2.1.25 it steps aside as soon as another operation needs the mailbox, so it no longer adds delay. Before that, with IDLE on, a single-folder search took 26–31 s and a multi-folder search did not finish.
To check a real Bridge yourself, run the read-only smoke test: PROTONMAIL_USERNAME=… PROTONMAIL_PASSWORD=… node test/live/readonly-smoke.mjs. It uses PROTONMAIL_READ_ONLY=true and a throwaway data directory, sends nothing, and prints counts and timings only.
Operational notes
get_emailsandsearch_emailsreturn a compositeemailId— use it for all subsequent reads and actions.search_indexed_emailssupportsfrom:,to:,subject:,label:,domain:shortcuts.The local index lives at
PROTONMAIL_DATA_DIR/mail-index.sqlite. Background sync and IMAP IDLE keep it warm.Several clients at once. Every MCP client starts its own server. Per data directory, only one of them runs the background sync and the IDLE watch (it holds
background-sync.lock); the others serve tools from the index and take over when it exits.get_runtime_statusshowsbackgroundSync.leader. A manualsync_emails/run_background_syncalways runs.Filters on the local index ignore case and accents, and match spelling variants:
MüllerfindsMueller,lodzfindsŁódź,strassefindsStraße. Livesearch_emailsandcount_messagesgo through Bridge: a query with umlauts or other non-ASCII letters also matches the spelled-out form (MüllerfindsMueller), but a plain ASCII query is sent as typed, soMuellerdoes not findMüllerthere. Usesearch_indexed_emailsfor that.Audit logs live at
PROTONMAIL_DATA_DIR/audit.log.Draft sync is best-effort — the local draft is always preserved even if remote sync fails.
System folders (INBOX, Sent, Trash, Spam, Archive, All Mail) are guarded against accidental deletion.
Troubleshooting
"Wrong password" or connection refused Make sure you're using the Bridge password, not your Proton account password. Find it in the Bridge app under Account → Copy password. Bridge must be running before the MCP server or CLI can connect.
Every tool answers "not configured"
PROTONMAIL_USERNAME and PROTONMAIL_PASSWORD are not set for the server. Since 2.7.2 it still starts without them, lists its tools and answers each call with that message (it used to exit at once, which clients showed as "Connection closed"). Set both (the password is the Bridge password) and restart; proton-mail-bridge-client setup-claude-desktop does it for Claude Desktop. Any other configuration mistake, such as a bad port, still stops the server at start.
macOS native module crash after update
better-sqlite3 is a native binary built for your machine. After a major Node.js upgrade or environment change, rebuild it:
proton-mail-bridge-client setup-claude-desktopThis reinstalls the runtime and rebuilds native modules in place.
Claude can't see the connector
After changing the MCP config, restart Claude Desktop fully (not just reload). Then check + → Connectors → proton-mail-bridge. If it's not there, run proton-mail-bridge-client doctor to validate the connection.
Searches take ~30 seconds, or time out
Upgrade to 2.1.25 or later. Before that, the IMAP IDLE watcher held the shared connection for its whole idle period and every other operation waited behind it (see Performance and token cost). On a current version, a slow search_emails is Bridge's own SEARCH over a large folder: pass folder or label, or use search_indexed_emails.
Folder not found when moving email
Use Folders/Name for real folders (e.g., Folders/Receipts), not just Name. Labels and folders share the same namespace in Proton Bridge but are structurally different.
Related projects
proton-drive-mcp — the companion MCP server and CLI for Proton Drive: upload, download, share and manage your end-to-end encrypted files from Claude. Run it next to this server to work with Proton Mail and Proton Drive in one conversation, for example by saving an attachment with
save_attachmentand then uploading it to Drive. IfPROTONMAIL_ALLOW_FILE_DOWNLOAD_DIRpoints inside a folder that the Proton Drive desktop app syncs, attachments saved there also end up in Drive without any extra step.
Changelog
See CHANGELOG.md for release history.
Contributing
Bug reports and pull requests welcome: github.com/googlarz/proton-mail-bridge-client/issues
Testers wanted: some things (answering invitations from Outlook, Proton Calendar and Apple Calendar, Windows and Linux with a real Bridge, brew install) could not be verified by the maintainer. See issue #32.
License
MIT
Available Tools
96 toolsapply_thread_actionADestructive
Apply a reversible mailbox action to every message in a normalized thread at once. Use when you want to act on a full thread identified by threadId (e.g. archive or mark-read an entire conversation). Supports dryRun, unreadOnly to scope impact, and syncBefore to refresh the index first. Prefer batch_email_action when you have explicit emailIds rather than a threadId.
Inputs: action (required), threadId (required), dryRun, syncBefore, +4 more.
archive_emailA
Move a single email to the standard Archive folder. Use for messages that are resolved but worth keeping long-term. Prefer trash_email when the message is no longer needed. Prefer move_email to route to a custom folder. Prefer batch_email_action for archiving multiple emails at once.
Inputs: emailId (required).
batch_email_actionADestructive
Apply one action to a known list of email IDs in a single IMAP pass. Prefer bulk_delete when selecting messages by search criteria (from/subject/date) rather than by ID. Prefer apply_thread_action when acting on a thread by threadId. Prefer empty_folder to clear an entire folder. Use when you already have the IDs and want to archive, trash, move, mark-read/unread, star/unstar, restore, or permanently delete them. Actions: mark_read, mark_unread, star, unstar, archive, trash, restore, move (requires targetFolder), delete (permanent expunge). Supports dryRun.
Inputs: action (required), emailIds (required), dryRun, maxBatchSize, +2 more.
bulk_deleteADestructive
Delete multiple emails by explicit ID list or by search criteria (from/subject/date/flags). Prefer empty_folder to clear an entire folder. Prefer delete_email for a single message. Prefer batch_email_action when the same set of IDs needs a mix of actions, not just deletion. Use when you have specific IDs to delete or want to filter by sender, subject, or date range. Accepts emailIds[] OR match criteria (XOR). permanent:true permanently expunges; false moves to Trash. Use dryRun to preview.
Inputs: match, dryRun, folder, emailIds, +3 more.
bulk_moveA
Move multiple emails to a target folder in one IMAP pass. Accepts either explicit emailIds[] or a match criteria object (XOR). Supports dryRun to preview. For single-message moves use move_email.
Inputs: targetFolder (required), match, dryRun, folder, +2 more.
bulk_update_flagsA
Add or remove IMAP flags on multiple messages simultaneously. Prefer update_message_flags for a single message when you need per-flag server verification. Use when the same flag change (e.g. \Seen, \Flagged) should apply to several messages. Accepts emailIds[] OR match+folder (XOR). Returns notApplied[] per message for flags the server silently dropped. \Seen/\Flagged/\Deleted are gated the same as mark_email_read/star_email/bulk_delete: each requires the matching action in PROTONMAIL_ALLOWED_ACTIONS, and setting \Deleted also requires confirmed:true when PROTONMAIL_CONFIRM_DESTRUCTIVE is enabled.
Inputs: match, dryRun, folder, emailIds, +4 more.
bulk_update_labelsA
Add or remove Proton labels on multiple messages simultaneously. Use when the same label change should apply to several messages. Labels are IMAP folders under Labels/ namespace. Accepts emailIds[] OR match+folder (XOR).
Inputs: match, dryRun, folder, emailIds, +3 more.
cancel_sendA
Cancel a send_email call that was queued because PROTONMAIL_SEND_DELAY_SECONDS is set. Only works while the item is still pending — once it has actually sent, this returns canceled: false. No effect (throws) if PROTONMAIL_SEND_DELAY_SECONDS is 0, since nothing is ever queued in that case.
Inputs: id (required).
cancel_snoozeA
Wake a snoozed email immediately, moving it back to its original folder before wakeAt. No effect (throws) if the snooze has already woken or was already canceled.
Inputs: id (required).
clear_cacheA
Evict all in-memory caches: folder list, message metadata, and analytics data. Use when cached data appears stale after external mailbox changes (e.g. folders modified via Proton webmail). Does NOT affect the persistent SQLite index — use clear_index for that.
Inputs: no named parameters.
clear_indexADestructive
Delete the entire persistent SQLite mailbox index from disk. Use only to reset a corrupted or schema-incompatible index. After clearing, call sync_emails to rebuild. Irreversible — all indexed metadata and search history is lost. Does NOT clear in-memory caches — use clear_cache for that.
Inputs: no named parameters.
count_messagesARead-only
Count messages matching live IMAP search criteria without fetching message data. Use to preview how many results a search would return before running it. Prefer folder_stats for a simple unread/total count on one folder without filters.
Inputs: to, from, label, query, +11 more.
create_draftA
Save a new outbound message as a local draft in SQLite, optionally syncing it to the Proton Drafts IMAP folder. Use to compose and review before sending. Prefer create_reply_draft when replying to a specific emailId, or create_forward_draft when forwarding. Returns a draftId for later update, sync, or send via send_draft.
Inputs: body (required), subject (required), cc, to, +8 more.
create_folderA
Create a new mailbox folder via IMAP. Use 'Folders/' prefix for user folders and 'Labels/' for labels in Proton Bridge (e.g. 'Folders/Receipts'). Do NOT attempt to create system folders such as INBOX, Sent, Trash, Archive, or Spam. Returns the created path on success.
Inputs: path (required).
create_forward_draftA
Create a forward draft for an existing email, pre-filling the original message as quoted body and preserving its attachments. Use when you have an emailId and want to stage a forward for review before sending. Prefer forward_email to send immediately without saving. Returns a draftId for later update or send via send_draft.
Inputs: to (required), emailId (required), cc, bcc, +7 more.
create_labelA
Create a Proton label (IMAP folder under Labels/ namespace). Idempotent — safe to call if the label may already exist. For folder creation use create_folder with a Folders/ prefix.
Inputs: name (required).
create_reply_draftA
Create a reply draft for a specific email, pre-filling To, Subject, and quoted body from the original message. Use when you have an emailId and want to stage the reply for review before sending. Prefer create_thread_reply_draft when you only have a threadId. Prefer reply_to_email to send immediately. Returns a draftId.
Inputs: body (required), emailId (required), cc, bcc, +6 more.
create_templateA
Save a reusable email template. Subject and body may contain {{variable}} placeholders (e.g. {{firstName}}), auto-detected and stored on the template. Fails if a template with the same name already exists — delete it first to replace it.
Inputs: body (required), name (required), subject (required), isHtml.
create_thread_reply_draftA
Create a reply draft from a threadId, automatically selecting the latest inbound message to reply to. Use when you have a threadId from get_threads or get_actionable_threads and want to stage a reply for review. Prefer create_reply_draft when you already have a specific emailId. Returns a draftId for later update or send.
Inputs: body (required), threadId (required), cc, bcc, +8 more.
delete_draftADestructive
Permanently delete a locally saved draft from SQLite. Use to discard a draft you no longer need. Does NOT remove a matching draft from the Proton Drafts IMAP folder — that requires a separate mailbox action. Irreversible; requires confirmed:true when PROTONMAIL_CONFIRM_DESTRUCTIVE is enabled.
Inputs: draftId (required), confirmed.
delete_emailADestructive
Permanently delete a single email via IMAP expunge. Use only when certain the message is no longer needed. Prefer trash_email if recovery may be required. Prefer bulk_delete to delete multiple emails at once. Prefer delete_thread to delete all messages in a conversation. Irreversible.
Inputs: emailId (required), confirmed.
delete_folderADestructive
Delete an empty mailbox folder via IMAP. The folder must contain no messages — move or trash all messages first. Do NOT delete system folders (INBOX, Sent, Trash, Archive, Spam). Irreversible; messages already removed cannot be recovered this way.
Inputs: path (required), confirmed.
delete_labelADestructive
Delete a Proton label (IMAP folder under Labels/ namespace). Deletes the label itself, not the messages — they remain in their other folders/labels. Irreversible. For deleting a folder use delete_folder with a Folders/ prefix.
Inputs: name (required), confirmed.
delete_templateADestructive
Delete a saved email template. Irreversible; requires confirmed:true when PROTONMAIL_CONFIRM_DESTRUCTIVE is enabled.
Inputs: id (required), confirmed.
delete_threadADestructive
Delete all messages in a thread, identified by RFC 5322 Message-ID header. permanent:true permanently expunges; false moves to Trash. Use when you have the raw Message-ID. Prefer apply_thread_action with action 'trash' or 'delete' when you have a local threadId from get_threads or get_actionable_threads.
Inputs: messageId (required), dryRun, confirmed, permanent, +1 more.
empty_folderADestructive
Permanently delete ALL messages in a folder at once. Prefer bulk_delete when removing a subset of messages rather than everything in the folder. Use only when the goal is to clear an entire folder (e.g. emptying Trash or Spam). Only available when PROTONMAIL_ALLOW_EMPTY_FOLDER=true. Irreversible.
Inputs: folder (required), confirmed.
export_emailA
Save a message's full raw source (RFC822/.eml) to disk. Use for backup or migrating a message elsewhere. Requires PROTONMAIL_ALLOW_FILE_DOWNLOAD_DIR to be configured, same as save_attachment.
Inputs: emailId (required), outputPath.
find_document_threadsARead-only
Find email threads likely containing important document attachments such as invoices, contracts, travel confirmations, or calendar invites. Use to locate attachment-heavy threads by category without knowing the exact sender or subject. Prefer search_indexed_emails with hasAttachment:true for custom attachment queries beyond the built-in categories.
Inputs: limit, query, category, syncBefore.
flag_threadA
Add or remove IMAP flags across all messages in a thread, identified by RFC 5322 Message-ID header. Use when you have the raw Message-ID and want to flag an entire conversation at once. Prefer apply_thread_action with action 'mark_read', 'mark_unread', 'star', or 'unstar' when you have a local threadId from get_threads. \Seen/\Flagged/\Deleted are gated the same as mark_email_read/star_email/delete_email: each requires the matching action in PROTONMAIL_ALLOWED_ACTIONS, and setting \Deleted also requires confirmed:true when PROTONMAIL_CONFIRM_DESTRUCTIVE is enabled.
Inputs: messageId (required), dryRun, confirmed, flagsToAdd, +2 more.
folder_statsA
Return live message count, unseen count, uidNext, and uidValidity for a single mailbox folder. Use to check unread counts or folder health without fetching messages. Prefer count_messages when you need to apply filters (sender, subject, date). Prefer get_email_stats for an aggregate summary across all folders.
Inputs: folder.
forward_emailADestructive
Immediately forward an existing email to new recipients, preserving original attachments and prepending an optional note. Use when you have an emailId and want to re-route the message without review. Prefer create_forward_draft to stage a forward for review first. Requires PROTONMAIL_ALLOW_SEND.
Inputs: to (required), emailId (required), cc, bcc, +13 more.
get_actionable_threadsARead-only
Return mailbox threads ranked by reply urgency, filtered to those requiring action. Use for daily triage to surface what needs a response from you. Supports pendingOn filter to distinguish threads waiting on you vs. them. Prefer get_inbox_digest for a broader summary including stale items. Prefer get_threads for an unranked thread list.
Inputs: label, limit, query, offset, +3 more.
get_attachment_contentARead-only
Fetch metadata for a specific email attachment and optionally return its base64-encoded content inline. Use when you need to read or process attachment data in-memory. Set includeBase64:false (default) to retrieve metadata only without loading the full payload. Prefer save_attachment to write the file to disk instead.
Inputs: emailId (required), attachmentId (required), saveTo, includeBase64.
get_attachment_textARead-only
Extract plain text from a text-like attachment (text/plain, text/csv, text/markdown, application/json, application/xml, text/html stripped of markup, text/calendar summarized) without dealing with base64 encoding. Not gated by the smaller inline-base64 size limit that get_attachment_content uses — bounded separately at 512KB of raw content. Fails clearly for non-text formats (e.g. PDF, images) — use get_attachment_content or save_attachment for those.
Inputs: emailId (required), attachmentId (required).
get_audit_logsARead-only
Return recent entries from the persistent on-disk audit log of all write operations performed by this server. Use to review what mutations (sends, moves, deletes, draft operations) were executed across sessions. Prefer get_logs for debugging in-session behavior and transient connection errors.
Inputs: limit, offset.
get_connection_statusARead-only
Check whether Proton Bridge SMTP and IMAP are reachable and return authentication status for each. Use to diagnose connectivity before sending or syncing, or when tools return connection errors. Returns individual pass/fail for each protocol, plus this server's own version and entrypoint path — check these first if behavior doesn't match the latest release notes; an old/orphaned install elsewhere on disk can silently shadow an upgrade. Prefer run_doctor for a full end-to-end health check including index integrity.
Inputs: no named parameters.
get_contactsARead-only
Return the most frequently contacted email addresses ranked by interaction volume within the analytics sample window. Use to identify key correspondents or to pre-populate recipient lists. Reads from the local index (auto-refreshed if stale or empty) — reflects the last sync. Note: results are frequency-derived from recent email history, not a Proton contacts address book.
Inputs: limit.
get_draftARead-only
Fetch the full content of a single locally saved draft by its draftId. Use to read or verify a draft before sending or updating. Prefer list_drafts to discover draftIds first. Does NOT fetch drafts from the Proton server — use list_remote_drafts for those. Attachments are metadata only (filename/contentType/size, no base64 content) by default — set includeAttachmentContent:true if you actually need the raw bytes back (e.g. to re-attach them elsewhere); a large attachment's base64 content can be hundreds of thousands of tokens.
Inputs: draftId (required), includeAttachmentContent.
get_email_analyticsARead-only
Generate sampled mailbox analytics including top senders, busiest hours of day, and volume breakdown by folder. Use for productivity insights and communication pattern analysis. Prefer get_email_stats for a fast aggregate count summary. Prefer get_volume_trends for per-day message volume history. Reads from the local index (auto-refreshed if stale or empty), not live IMAP — reflects the last sync.
Inputs: days, limit.
get_email_by_idARead-only
Fetch the full content of a single email using a composite emailId. Use after get_emails or search_emails to read a specific message in full. The emailId format is FOLDER::UID — always use the id returned by a prior tool call; do not construct it manually. Response includes a security block (dkim/spf/dmarc pass-fail, Proton's spam score/action, and encryption metadata) for phishing/legitimacy triage.
Inputs: emailId (required), preferHtml, showHeaders, maxBodyLength.
get_emailsARead-only
Fetch emails from a mailbox folder via live IMAP, defaults to newest first; set sortByUid to asc for oldest first. Use to browse or paginate recent messages in a specific folder. Prefer search_emails to filter by sender, subject, or date. Prefer search_indexed_emails for fast repeated queries when the local SQLite index is populated and Bridge availability is uncertain. Each email's attachments are metadata only (id/filename/contentType/size/disposition) — use list_attachments or get_email_by_id for full attachment detail.
Inputs: limit, fields, folder, offset, +3 more.
get_emails_by_idsARead-only
Fetch full content for multiple emails by composite id in one call (max 25). Use to read a batch of specific messages from a prior get_emails/search_emails/search_indexed_emails result without one get_email_by_id round trip per message. One failed id does not fail the whole batch — check each result's ok field. Prefer get_email_by_id for a single message.
Inputs: emailIds (required), preferHtml, maxBodyLength.
get_email_statsARead-only
Return aggregate mailbox statistics: folder message counts, total unread counts, and a brief analytics sample. Use for a quick mailbox health overview. Prefer get_email_analytics for richer breakdowns such as top senders and hourly patterns. Prefer get_volume_trends for time-series daily volume data. Reads from the local index (auto-refreshed if stale or empty), not live IMAP — reflects the last sync, so read/unread counts can lag a change made from another client. Unread counts specifically can also lag a flag change (e.g. \Seen set shortly after send) until that message's folder is next fully synced.
Inputs: days, limit.
get_foldersARead-only
Return all mailbox folders with message counts and unseen counts from the live IMAP session. Use to discover available folder names before targeting get_emails, move_email, or create_folder. Prefer sync_folders to force a fresh fetch when the folder list appears stale. Folders with noselect:true cannot be used for IMAP operations.
Inputs: no named parameters.
get_follow_up_candidatesARead-only
Return threads that appear overdue for follow-up based on age and pending-on state. Use when looking for outbound messages you sent that haven't received a reply, or to surface stale inbound threads. Prefer get_actionable_threads for threads where someone is currently waiting on you.
Inputs: limit, offset, pendingOn, syncBefore, +1 more.
get_inbox_digestARead-only
Return a structured inbox summary: unread counts, top actionable threads, and overdue threads where a reply is pending from you. Use as the starting point for an inbox review session to get an at-a-glance picture. Prefer get_actionable_threads for a deeper, filterable list of threads needing action.
Inputs: limit, offset, syncBefore, minAgeHours.
get_index_statusARead-only
Return metadata about the local SQLite email index: row count, last sync timestamp, index schema version, and per-folder coverage. Use to verify the index is fresh and complete before querying it with search_indexed_emails or get_threads. If the index is empty or stale, call sync_emails first.
Inputs: no named parameters.
get_labelsARead-only
Return normalized Proton folders and labels from the local mailbox index, including message counts per label. Use to enumerate available labels before filtering with search_indexed_emails or get_threads. Prefer get_folders for live IMAP folder counts when the index may be stale.
Inputs: limit.
get_logsARead-only
Return recent in-memory server log entries, filterable by level (debug, info, warn, error). Use to diagnose unexpected tool behavior or connection errors during the current session. Logs are ephemeral and not persisted across server restarts — use get_audit_logs for a persistent audit trail of write operations.
Inputs: level, limit, offset.
get_runtime_statusARead-only
Return the server's current runtime state: policy flags (read-only, allow-send, allowed actions), background sync schedule and last-run time, IMAP IDLE watch state, draft store statistics, and local index freshness. Use to understand how the server is configured and whether sync is actively running. Prefer get_connection_status for protocol reachability only.
Inputs: no named parameters.
get_templateARead-only
Get a single saved email template by id.
Inputs: id (required).
get_thread_briefARead-only
Return a summarized view of a single thread: latest inbound message preview, latest outbound preview, attachment list, and a recommended next action. Use for a quick status check on a specific thread without reading every message. Prefer get_thread_by_id when you need the full raw thread data and all messages.
Inputs: threadId (required).
get_thread_by_idARead-only
Fetch the complete normalized thread record from the local index, including all messages, participants, labels, and full metadata. Use when you need all messages in a thread. Prefer get_thread_brief for a summarized quick view that avoids returning the full message list.
Inputs: threadId (required), folders.
get_threadsARead-only
Return normalized email threads from the local mailbox index, grouping individual messages into conversations by subject and participants. Use to view mail as threads rather than individual messages. Note: searches subject and participants only — use search_indexed_emails to search body content. Prefer get_actionable_threads when you want threads prioritized by reply urgency. Prefer get_inbox_digest for an executive-summary view.
Inputs: label, limit, query, offset.
get_unsubscribe_infoARead-only
Read the List-Unsubscribe header of a message and report how to unsubscribe from it — a mailto address, an https link, or both. Does not take any action. Use before unsubscribe_sender to see what's available, or to hand an https link to the user/agent to open manually (this server never auto-fetches unsubscribe URLs).
Inputs: emailId (required).
get_volume_trendsARead-only
Return daily inbound and outbound message counts for a trailing window. Use to spot volume spikes, identify quiet periods, or track communication trends over time. Prefer get_email_analytics for sender-level breakdowns and hourly patterns. Reads from the local index (auto-refreshed if stale or empty), not live IMAP — reflects the last sync.
Inputs: days.
import_emailA
Import a raw RFC822 message (.eml content) into a folder via IMAP APPEND. Use to restore a backed-up message or migrate mail from another provider's export. Does not send anything — this only inserts a message directly into the mailbox. Many real .eml exports use a legacy 8-bit charset (ISO-8859-1, Windows-1252, etc.) rather than UTF-8 for their header/body text outside of MIME-encoded parts — passing that content through raw corrupts or rejects it. Use rawBase64 instead for any message not already known to be valid UTF-8.
Inputs: raw, rawBase64, markAsRead, targetFolder.
list_accountsARead-only
List every configured Proton address (the primary Bridge login plus any additional addresses from PROTONMAIL_ACCOUNTS_JSON), each with its own IMAP/SMTP connection status and local index freshness. Use to see which accounts this server is managing, and each account's slug — prefix an emailId/draftId with <slug>:: to target that account explicitly in any other tool (a plain, unprefixed id always means the primary account). Set checkConnections:true to verify each account's IMAP/SMTP reachability live (slower).
Inputs: checkConnections.
list_attachmentsARead-only
List all attachments on a specific email with stable attachmentIds, filenames, content types, and sizes. Use before calling get_attachment_content or save_attachment to discover what attachments are available and get their IDs. Prefer save_attachments when you want to download all attachments at once.
Inputs: emailId (required), contentType, includeInline, filenameContains.
list_draftsARead-only
List all locally saved drafts with their status, subject, and timestamps. Does NOT list drafts stored only on the Proton server — use list_remote_drafts for those. Prefer get_draft when you already have a draftId and need the full content. Attachment content is omitted here (filename/type/size only) — use get_draft for the full attachment content of one draft. Each draft's body is also truncated to a short preview (bodyTruncated:true, bodyLength gives the real size) — use get_draft for the full body of one draft. Use to review in-progress or unsent messages.
Inputs: limit, offset, includeSent.
list_remote_draftsARead-only
List draft messages currently stored in the Proton Drafts IMAP folder on the server. Use to see drafts created via Proton webmail or mobile app that have not been synced locally. Prefer list_drafts to see drafts managed by this server. Requires an active IMAP connection.
Inputs: limit, offset.
list_scheduled_sendsARead-only
List items in the local undo-send / scheduled-send queue (from send_email with PROTONMAIL_SEND_DELAY_SECONDS set, or schedule_draft), newest first, 50 per page (returns total/hasMore; page with offset, raise limit for more), including id, status, and sendAt — use this to rediscover the id needed for cancel_send if it was lost with the conversation. Message bodies are shortened and HTML/attachments omitted.
Inputs: limit, offset, status.
list_snoozedARead-only
List every snoozed email, including its id, status, and wakeAt — use this to rediscover the id needed for cancel_snooze if it was lost with the conversation.
Inputs: status.
list_templatesARead-only
List all saved email templates.
Inputs: no named parameters.
mark_email_readA
Mark a single email as read or unread by setting the IMAP Seen flag. Use for individual triage or to reset read state. Prefer batch_email_action with action 'mark_read' or 'mark_unread' when updating multiple emails at once.
Inputs: emailId (required), isRead.
move_emailA
Move a single email to any specified mailbox folder. Use when routing a message to a custom folder. Prefer archive_email to move to the standard Archive folder, or trash_email to move to Trash. Use get_folders first to confirm the target folder path.
Inputs: emailId (required), targetFolder (required).
move_threadA
Move all messages in a thread to a destination folder, identified by its RFC 5322 Message-ID header. Use when you have the raw Message-ID (e.g. from email headers) and want to move the full conversation. Prefer apply_thread_action with action 'move' when you have a local threadId from get_threads or get_actionable_threads.
Inputs: messageId (required), destination (required), dryRun, acrossFolders.
prepare_meeting_contextARead-only
Fetch recent threads and communication history for a person or company domain to prepare for a meeting or call. Use before a scheduled meeting to surface relevant recent correspondence. Provide at least one of person (name or email fragment) or domain. Returns matched threads sorted by recency.
Inputs: limit, domain, person, syncBefore.
rename_folderA
Rename or move a mailbox folder to a new IMAP path. Existing messages are preserved in place. Do NOT rename system folders (INBOX, Sent, Trash, Archive, Spam). Refreshes the local folder cache after the operation.
Inputs: path (required), newPath (required).
rename_labelA
Rename a Proton label (IMAP folder under Labels/ namespace). Messages keep the label, just under the new name. For renaming a folder use rename_folder with a Folders/ prefix.
Inputs: name (required), newName (required).
render_templateARead-only
Render a saved template's subject and body, substituting {{variable}} placeholders with the given values. Placeholders left unfilled stay literal (e.g. {{firstName}}) and are listed in missingVariables — check that field is empty before passing the rendered subject/body to send_email, or the recipient will see literal {{placeholder}} text in the message.
Inputs: id (required), variables.
reply_all_emailADestructive
Immediately reply to all original recipients (sender + all To/CC addresses) of an existing email. Identical to reply_to_email with replyAll enabled. Use when the conversation involves multiple parties and all should receive the reply. Threading headers (In-Reply-To, References) are preserved. Requires PROTONMAIL_ALLOW_SEND.
Inputs: emailId (required), cc, bcc, body, +11 more.
reply_to_emailADestructive
Immediately send a reply to an existing email, threading it correctly via In-Reply-To and References headers. Use when you have an emailId and want to send the reply right away. Prefer create_reply_draft to save the reply for review first, or create_thread_reply_draft when replying from a threadId. Use reply_all_email to reply to all original recipients. Requires PROTONMAIL_ALLOW_SEND.
Inputs: body (required), emailId (required), cc, bcc, +12 more.
restore_emailA
Move an email from Trash back to INBOX or to a specified folder. Use to undo a trash_email operation. Does not work on permanently deleted messages — only messages currently in Trash can be restored.
Inputs: emailId (required), targetFolder.
run_background_syncA
Immediately trigger the configured background mailbox sync cycle outside its normal schedule and return its updated status. Use to force a sync when the index may be stale. Does nothing useful if PROTONMAIL_AUTO_SYNC is disabled. Prefer sync_emails for an on-demand, configurable sync with folder and depth options.
Inputs: no named parameters.
run_doctorARead-only
Run a comprehensive production health check covering SMTP auth, IMAP auth, optional IMAP IDLE probe, SQLite index integrity, sync-failed drafts, runtime policy validation, and what this server can/cannot do (capabilities). Also reports this server's own version and entrypoint path — worth checking first when behavior doesn't match the changelog, since an old/orphaned install elsewhere on disk can silently shadow an upgrade and every other field here would still report healthy. Connection failures include a classified diagnosis (authentication_failed vs bridge_unreachable) with a specific fix. Use to fully diagnose or validate the setup. Prefer get_connection_status for a quick protocol-only reachability check.
Inputs: includeImap, includeSmtp, includeIdleProbe, idleTimeoutSeconds.
save_attachmentA
Save a single email attachment to disk by its attachmentId and return the written file path. Use when you have a specific attachmentId from list_attachments and want to write that file. Prefer save_attachments to save all or filtered attachments from an email without needing individual attachment IDs.
Inputs: emailId (required), attachmentId (required), saveTo, outputPath.
save_attachmentsA
Save all qualifying attachments from an email to a directory on disk, with optional filename substring or content-type filters. Use to batch-download attachments from a single email. Returns the list of written file paths. Prefer save_attachment when you need to save one specific attachment by its attachmentId.
Inputs: emailId (required), outputPath, contentType, includeInline, +1 more.
schedule_draftADestructive
Queue a saved draft to send at a future time instead of immediately. IMPORTANT: this only fires while this MCP server process stays running (it's a stdio server that exits when its client disconnects) — if the app is closed before sendAt, the send fires on next server startup instead of the originally requested time, not at sendAt itself. This is best-effort tied to the app being open, not a reliable scheduler. The draft's content is snapshotted at schedule time; the draft record itself is NOT automatically marked sent or deleted once it fires — check list_drafts or get_email_stats afterward, or clean it up yourself. Cancelable via cancel_send until it fires.
Inputs: sendAt (required), draftId (required), confirmed.
search_emailsARead-only
Search emails via live IMAP filters, across ALL configured accounts by default (accounts are queried one at a time; pass account = address or slug to search only one; non-primary ids are prefixed '::'), with optional local post-processing for attachments and labels. Use when you need real-time results or must find messages received after the last sync. Prefer search_indexed_emails when the local index is current — it is significantly faster and works even when Bridge IMAP is unavailable. Each email's attachments are metadata only (id/filename/contentType/size/disposition) — use list_attachments or get_email_by_id for full attachment detail. Without folder it searches every real folder but not the All Mail / Labels/* / Starred views (they only duplicate mail already in a real folder and made an all-folders search ~3x slower); pass folder (e.g. 'Labels/x' or 'All Mail') or label/mailboxRole to search those. Values with non-ASCII letters (accents, ł, ä, ß...) are matched ignoring accents and case: Proton Bridge's own IMAP search cannot match them, so they are narrowed server-side and verified locally over the newest 500 candidates (hasMore:true if the candidates were cut). count_messages does not do this and still counts only ASCII matches.
Inputs: cc, to, bcc, from, +21 more.
search_indexed_emailsARead-only
Search the local SQLite mailbox index (of ALL configured accounts by default; pass account = address or slug to search only one; non-primary ids are prefixed '::') without making any IMAP connection. Supports free-text and field shortcuts inline: from:alice@example.com, to:bob, subject:invoice, label:Archive, domain:acme.com. Use for fast, offline-capable searches when the index is populated. Prefer search_emails when you need live IMAP results or when the index is stale or empty. Prefer this over search_emails when the index is current. Use search_emails if messages were received after the last sync. Each email's attachments are metadata only (id/filename/contentType/size/disposition) — use list_attachments or get_email_by_id for full attachment detail.
Inputs: to, from, label, limit, +14 more.
send_draftADestructive
Send a previously saved local draft through Proton Bridge SMTP. Use as the final step in a draft-review-send workflow after create_draft and optional update_draft. Marks the draft as sent in the local store but does not delete it. Refuses if this draft has a still-pending scheduled send (from schedule_draft) — cancel that with cancel_send first, otherwise sending now would deliver the draft twice. Requires PROTONMAIL_ALLOW_SEND.
Inputs: draftId (required), dryRun, confirmed.
send_emailADestructive
Compose and send a new outbound email through Proton Bridge SMTP. Use for one-shot messages that need no review. Prefer create_draft when you want to save and review before sending, or reply_to_email when responding to an existing message. Fails if PROTONMAIL_ALLOW_SEND is false or if Bridge SMTP is unreachable. If PROTONMAIL_SEND_DELAY_SECONDS is set, this queues the send instead of sending immediately and returns a cancelable id — call cancel_send within the window to abort. Otherwise returns delivery confirmation immediately.
Inputs: to (required), subject (required), cc, bcc, +14 more.
send_test_emailADestructive
Send a minimal diagnostic email to confirm Proton Bridge SMTP credentials and connectivity. Use before relying on send_email in a new environment. Prefer get_connection_status for a connectivity check that does not actually send mail. Returns transport debug info and delivery status. Requires PROTONMAIL_ALLOW_SEND, and confirmed:true when PROTONMAIL_CONFIRM_DESTRUCTIVE is enabled; subject to PROTONMAIL_RESTRICT_OUTBOUND_TO_SELF like every other send path.
Inputs: to (required), from, confirmed, customMessage.
snooze_emailA
Move an email out of sight into Folders/MCP-Snoozed and bring it back to its original folder at wakeAt. IMPORTANT: like scheduled sends, wake only fires while this MCP server process stays running — if the app is closed before wakeAt, the email wakes on next server startup instead of at the requested time, not reliably at wakeAt itself. Cancelable via cancel_snooze, which wakes it immediately.
Inputs: wakeAt (required), emailId (required).
star_emailA
Star or unstar a single email using the IMAP Flagged flag. Use to bookmark an important message for later follow-up. Prefer batch_email_action with action 'star' or 'unstar' when flagging multiple emails at once.
Inputs: emailId (required), isStarred.
sync_draft_to_remoteA
Force-push a locally saved draft to the Proton Drafts IMAP folder and return the remote UID. Use when a draft was created with syncToRemote:false or when the automatic sync failed. Do NOT use this if PROTONMAIL_ALLOW_REMOTE_DRAFT_SYNC is false — the call will be rejected.
Inputs: draftId (required).
sync_emailsA
Incrementally sync email metadata from IMAP into the local SQLite index, using stored checkpoints to avoid re-fetching already-indexed messages. Use before calling search_indexed_emails or get_threads when the index may be stale. The default incremental sync only ever adds/updates recent messages — it never notices a message that was archived, trashed, or moved out of the synced folder by any client, so search/thread/digest tools can keep showing a message as still present indefinitely. Set full:true (per folder — sync each folder you want cleaned up) to also detect and prune those, in addition to fetching a larger sample. Prefer run_background_sync to trigger the scheduled sync cycle (also incremental-only by default; see PROTONMAIL_AUTO_SYNC_FULL).
Inputs: full, folder, limitPerFolder, timeBudgetSeconds, +1 more.
sync_foldersARead-only
Refresh the in-memory folder list from the IMAP server and return the updated list. Use when folders have been created, renamed, or deleted externally (e.g. via Proton webmail) and get_folders is returning stale data. Prefer get_folders for a read-only view that does not force a refresh.
Inputs: no named parameters.
top_sendersARead-only
Return a frequency table of the top senders in a folder over a date range. Keyed on the sender address, not the display name, so display-name spoofing does not conflate different senders. Use for inbox analytics, unsubscribe triage, and contact discovery.
Inputs: limit, since, before, folder, +2 more.
trash_emailA
Move a single email to the Trash folder. Messages in Trash can be recovered with restore_email. Use instead of delete_email when you may want to recover the message later. Prefer batch_email_action with action 'trash' for multiple emails at once.
Inputs: emailId (required).
unsubscribe_senderADestructive
Execute the mailto: variant of a message's List-Unsubscribe header by sending a minimal unsubscribe email through Proton Bridge SMTP. Only works when the header includes a mailto address — if it only has an https link, this throws and returns that link for you to open manually instead (this server never auto-fetches unsubscribe URLs, to avoid firing an unreviewed request from mail content). Call get_unsubscribe_info first to see what's available.
Inputs: emailId (required), confirmed.
update_draftA
Update an existing locally saved draft's recipients, subject, body, or other fields. Use to edit a draft before sending. Only provided fields are updated — omitted fields retain their current values. After updating, call send_draft to send or sync_draft_to_remote to push to Proton Drafts. The response's attachments are metadata only (filename/contentType/size, no base64 content) even if the draft has attachments from a previous call — use get_draft if you need the actual attachment bytes back.
Inputs: draftId (required), cc, to, bcc, +10 more.
update_message_flagsA
Add or remove arbitrary IMAP flags on a single message, then verify the server applied them. Prefer bulk_update_flags to update flags across multiple messages at once. Returns notApplied[] listing flags the server silently dropped. Use for custom IMAP flags (e.g. \Answered) or when mark_email_read / star_email don't cover the flag you need. \Seen/\Flagged/\Deleted are gated the same as mark_email_read/star_email/delete_email: each requires the matching action in PROTONMAIL_ALLOWED_ACTIONS, and setting \Deleted also requires confirmed:true when PROTONMAIL_CONFIRM_DESTRUCTIVE is enabled.
Inputs: emailId (required), confirmed, flagsToAdd, flagsToRemove.
update_message_labelsA
Add or remove Proton labels on a single message without moving it. Prefer bulk_update_labels to apply label changes across multiple messages. Labels live under the Labels/ namespace (e.g. 'Labels/Work'). Use for one message at a time. Create missing labels first with create_folder using a 'Labels/' prefix.
Inputs: emailId (required), labelsToAdd, labelsToRemove.
wait_for_mailbox_changesARead-only
Open an IMAP IDLE session and block until a mailbox change event arrives or the timeout expires. Use to detect real-time inbox activity without polling. Returns whether a change was observed. Always returns within timeoutSeconds plus a few seconds' grace, even if the underlying IDLE session gets stuck — do not use in fire-and-forget pipelines. A change that arrives may not always wake the call early; it is still detected and reported correctly, just not necessarily before the timeout.
Inputs: folder, timeoutSeconds.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 96 tools
With 96 tools, many share similar purposes (e.g., multiple search, thread, delete, and send variants). The detailed descriptions cross-reference alternatives and help, but the sheer number of overlapping options creates a high risk of misselection.
All names use consistent snake_case and mostly follow a verb_noun pattern (e.g., get_emails, create_draft, send_email). A few noun-first outliers like folder_stats and top_senders slightly break the pattern.
96 tools is far beyond the typical 3-15 range for a well-scoped server. While the domain is complex, the count is excessive and many tools could be consolidated (e.g., single/bulk/thread variants).
The surface covers an exhaustive range of email lifecycle operations: sending, drafts, templates, labels, folders, search, sync, attachments, analytics, and diagnostics. Few gaps exist beyond niche features like contact management.
Maintenance
Related MCP Connectors
Email open and click tracker for Gmail, Outlook, Zoho Mail, Roundcube, Hostinger Mail and more.
Never-stored live email: read, send and triage Gmail, Outlook / Microsoft 365, or any IMAP mailbox.
Your mailboxes in ChatGPT and Claude: Gmail, iCloud, Fastmail, any IMAP. Passwords stay yours.
Email infrastructure as a service: mailboxes, domains, dedicated IPs, sending, deliverability.
Related MCP Servers
- AlicenseNot gradedqualityDmaintenanceEnables comprehensive ProtonMail management through SMTP and IMAP, supporting email sending/reading, folder operations, analytics, and contact tracking with advanced search and automation capabilities.42MIT
- AlicenseNot gradedqualityDmaintenanceEnables AI clients to interact with ProtonMail accounts through the Proton Bridge using SMTP and IMAP protocols. Provides email management capabilities via secure local bridge connections.22 npmMIT
- AlicenseAqualityBmaintenanceEnables AI agents to send, read, search, and organize emails via ProtonMail using Proton Bridge. Supports MCP-compatible clients like Claude and Cursor.1817 npm4MIT
- FlicenseNot gradedqualityCmaintenanceEnables AI assistants to interact with a Proton Mail mailbox through Proton Bridge, supporting listing, searching, reading, sending, and organizing emails.-