This project exposes a Proton Mail account to Claude Cowork through MCP. It
connects to Proton Mail Bridge over IMAP and SMTP, then serves a local MCP
server over stdio so Claude Desktop and Cowork can launch it on demand.
Within each MCP process, it reuses Bridge connections and idles them out
automatically so repeated tool calls do not reconnect on every request.
The checked-in server.mjs is the bundled working server that is currently
being used locally. That keeps the repo self-contained and avoids requiring a
separate build step before connecting it to Claude.
- List mailbox folders
- List recent emails in a folder
- Read full email content
- Search emails by sender, subject, body, date, and unread status
- Send new emails
- Reply to emails with proper threading headers
- Move messages between folders
- Mark messages read, unread, flagged, or unflagged
- Delete emails
server.mjs: the bundled MCP server used by Claude
- Node.js 18+
- Proton Mail Bridge installed and logged in
- Claude Desktop / Claude Cowork with local MCP enabled
The server reads credentials from environment variables or from:
~/.proton-bridge-credentials
Example:
PROTON_BRIDGE_USERNAME="your-email@proton.me"
PROTON_BRIDGE_PASSWORD="your-bridge-password"
PROTON_BRIDGE_HOST="127.0.0.1"
PROTON_BRIDGE_IMAP_PORT="1143"
PROTON_BRIDGE_SMTP_PORT="1025"Only the username and password are required if you use Bridge's default local ports.
Add this entry to:
~/Library/Application Support/Claude/claude_desktop_config.json
{
"mcpServers": {
"proton-mail": {
"command": "/opt/homebrew/bin/node",
"args": [
"/ABSOLUTE/PATH/TO/server.mjs"
]
}
}
}If your Node binary is somewhere else, use the output of:
which nodeThen fully restart Claude Desktop. Claude Cowork should discover the Proton Mail tools on launch.
list_folders()list_emails(folder="INBOX", limit=20)read_email(uid, folder="INBOX")search_emails(folder="INBOX", from, subject, body, since, before, unseen, limit=20)send_email(to, subject, body, html, cc, bcc)reply_to_email(uid, folder="INBOX", body, html, replyAll=false)move_email(uid, sourceFolder="INBOX", destinationFolder)mark_email(uid, folder="INBOX", action)delete_email(uid, folder="INBOX")
You can sanity check that the server starts:
node server.mjsIt will wait for MCP messages on standard input. Claude is the normal client, so this is mainly useful to catch obvious config or credential errors.
- Reads Bridge credentials from environment variables or
~/.proton-bridge-credentials - Uses IMAP via
imapflowfor listing, searching, reading, moving, flagging, and deleting mail - Uses SMTP via
nodemailerfor sending and replying - Reuses IMAP and SMTP connections inside each MCP process, with automatic idle cleanup and reconnect-once behavior for stale Bridge connections
- Uses
mailparserwhen reading or replying so Claude gets structured message content
If Claude does not show the tools:
- Verify the
commandandargspaths inclaude_desktop_config.json - Restart Claude Desktop completely
- Make sure Proton Mail Bridge is running
- Make sure your Bridge credentials file exists and contains the Bridge password, not your main Proton account password
If email actions fail:
- Confirm Bridge is listening on IMAP
1143and SMTP1025, or update the port variables in~/.proton-bridge-credentials - Re-open Proton Mail Bridge if it was recently restarted
- Optionally tune
PROTON_BRIDGE_IDLE_TIMEOUT_MSandPROTON_BRIDGE_SMTP_IDLE_TIMEOUT_MSif you want shorter or longer connection reuse windows
Do not commit:
~/.proton-bridge-credentials- exported logs with email contents
- any screenshots or dumps containing message bodies