Proton Mail encrypts your messages on Proton's servers, so other apps can't read them over IMAP directly. Proton Mail Bridge, a desktop app from Proton, signs in to your account, decrypts mail on your computer, and offers it to mail apps on local IMAP and SMTP ports. Bridge needs a paid Proton plan that includes Mail.
Self-hosted Fluxmail can connect to those ports and give Claude email tools over MCP. Fluxmail and Bridge run on the same computer, and Claude Code or Claude Desktop starts Fluxmail there. Claude can then search and read your Proton mail, open attachments, move messages between folders, and write drafts that show up in Proton Mail.
When Claude opens a message, its contents become part of your Claude conversation and leave Proton's encryption. Ask Claude only about mail you're willing to share, and start with read-only access so Claude can't change or send anything until you allow it.
1. Set up Proton Mail Bridge
- Download Proton Mail Bridge, install it, and sign in with your Proton account.
- Wait for the first sync to finish.
- Select your account in Bridge and keep its mailbox details open. You need the IMAP and SMTP ports, the username, and the password Bridge generated.
The Bridge password is separate from your Proton password, and only Bridge accepts it. By default, Bridge uses port 1143 for IMAP and port 1025 for SMTP, both with STARTTLS. Use the values your Bridge shows if they differ.
Bridge has to be running whenever Claude works with your mail.
2. Export Bridge's certificate
Bridge secures its local ports with a certificate it creates when you install it. Fluxmail checks certificates, so it rejects this one until you tell it to trust it.
- In Bridge, open Settings, then Advanced settings, and select Export TLS certificates.
- Pick your home folder. Bridge saves
cert.pemandkey.pemthere. - Rename the certificate so you know what it is, and delete the exported key. Fluxmail only needs the certificate. These commands are for macOS and Linux.
mv ~/cert.pem ~/proton-bridge.pem
rm ~/key.pem
Fluxmail reads extra trusted certificates from the NODE_EXTRA_CA_CERTS environment variable. Run this in the terminal where you'll run the commands in step 3. It lasts until you close that terminal.
export NODE_EXTRA_CA_CERTS="$HOME/proton-bridge.pem"
Fluxmail then trusts Bridge's certificate and keeps checking every other certificate as usual. If you reinstall or reset Bridge, it creates a new certificate, so export it again.
3. Connect Fluxmail to Bridge
Install the Fluxmail CLI and create the local administrator:
npm install -g fluxmail
fluxmail setup --name "Your name" --email you@example.com
Then connect your Proton address through Bridge's ports:
fluxmail accounts add imap \
--email you@proton.me \
--imap-host 127.0.0.1 \
--imap-port 1143 \
--imap-security starttls \
--smtp-host 127.0.0.1 \
--smtp-port 1025
Use your own address, and change the ports if Bridge shows different ones. Fluxmail uses the address as the username for both connections. If Bridge shows a different username, add --imap-user and --smtp-user with that value. SMTP with STARTTLS is Fluxmail's default, so the SMTP security option isn't needed.
Fluxmail asks for the password without showing it. Paste the Bridge password, not your Proton password. Fluxmail tests both connections before saving, then encrypts the password in its local database.
If the command fails with self-signed certificate, NODE_EXTRA_CA_CERTS isn't set in that terminal, or it points to an old certificate.
4. Connect Claude
Claude starts Fluxmail on its own, so it needs the certificate setting too.
For Claude Code, pass it with -e and start with read-only access:
claude mcp add fluxmail -e NODE_EXTRA_CA_CERTS="$HOME/proton-bridge.pem" -- fluxmail stdio --profile read-only
For Claude Desktop, open Settings > Developer > Edit Config and add this to claude_desktop_config.json. Use the full path to the certificate, since the config file doesn't expand ~ or $HOME:
{
"mcpServers": {
"fluxmail": {
"command": "fluxmail",
"args": ["stdio", "--profile", "read-only"],
"env": {
"NODE_EXTRA_CA_CERTS": "/Users/you/proton-bridge.pem"
}
}
}
}
Restart Claude Desktop after saving. If it can't find the fluxmail command, run which fluxmail in a terminal and use the full path it prints.
5. Try it
With Bridge running, ask Claude something only your inbox can answer:
Which emails in my Proton inbox from the last week need a reply from me?
Claude searches with Fluxmail's search_emails tool and opens messages with get_email. Fluxmail fetches each message from Bridge when Claude asks for it.
6. Allow more when you need it
Switch the profile to read-write to let Claude organize mail and write drafts, or to full to let it send. For Claude Code, remove and re-add the server with the same certificate setting:
claude mcp remove fluxmail
claude mcp add fluxmail -e NODE_EXTRA_CA_CERTS="$HOME/proton-bridge.pem" -- fluxmail stdio --profile read-write
For Claude Desktop, change read-only in args and restart Claude Desktop.
Bridge shows your Proton labels as folders inside a Labels folder, and a labeled message also stays in its real folder. Moving a message out of a label folder removes that label, so ask Claude to file mail from the Inbox or another real folder.
If something looks off
- The connection fails with
self-signed certificate. Check thatNODE_EXTRA_CA_CERTSis set for the command that failed, and that the certificate came from the Bridge you're running now. - The connection is refused. Start Bridge, then check its mailbox details for the current ports.
- Bridge rejects the login. Use the password from Bridge's mailbox details, not your Proton password.
- You switched Bridge to SSL. Use
--imap-security tlsand--smtp-security tlswith the ports Bridge shows. - Sent messages appear twice. Proton may keep its own copy of mail sent through Bridge. If you see duplicates in Sent, run the
fluxmail accounts add imapcommand again with--no-save-sentadded.
Next steps
- Connect your other mailboxes too: IMAP MCP server for Claude, ChatGPT and Cursor lists settings for iCloud, Yahoo, Fastmail and Zoho.
- Set limits before you allow sending: How to give an AI agent access to your email safely.
- Connect another client: Connect an MCP client covers Codex, Cursor, and others.


