Proton Mail (unofficial) — Claude Code MCP server: install and use
Connects Proton Mail accounts to AI assistants for reading and dispatching messages. Helps automate inbox triage directly inside coding environments.
claude mcp add --env PROTONMAIL_USERNAME=<PROTONMAIL_USERNAME> --env PROTONMAIL_PASSWORD=<PROTONMAIL_PASSWORD> --env PROTONMAIL_HOST=<PROTONMAIL_HOST> --env PROTONMAIL_PORT=<PROTONMAIL_PORT> --env PROTONMAIL_SECURE=<PROTONMAIL_SECURE> --transport stdio proton-mail-unofficial -- npx -y proton-mail-mcpWhat Proton Mail (unofficial) does
This server exposes email operations to MCP assistants via Proton Mail SMTP and IMAP connections. The model can compose formatted messages with Markdown, fetch incoming email threads, and download attachments to local storage. It can also query messages by flags or dates.
All message mutations include safety guards. Deleting items routes them to Trash rather than purging them immediately. Batch updates provide a dryRun preview mode. Outgoing messages go through an HTML sanitization step that strips script tags and tracking elements before delivery.
Without an active Bridge instance, the assistant can only dispatch outgoing messages over SMTP and will fail when reading incoming threads. Running the package also demands Node.js version 24 or newer.
What it helps with
- search messages by sender or attachment type
- compose and send replies formatted in Markdown
- batch update message labels with
dryRunpreviews - inspect folder statistics and aggregate frequent senders
Example prompts for the agent
- Check my inbox for unread messages received this week and display brief summaries.
- Draft a reply to the newest thread from billing with
markdownBodyand attach the invoice. - Show message totals and sender rankings for the archive folder.
How to install Proton Mail (unofficial)
Platform CLI
claude mcp add --env PROTONMAIL_USERNAME=<PROTONMAIL_USERNAME> --env PROTONMAIL_PASSWORD=<PROTONMAIL_PASSWORD> --env PROTONMAIL_HOST=<PROTONMAIL_HOST> --env PROTONMAIL_PORT=<PROTONMAIL_PORT> --env PROTONMAIL_SECURE=<PROTONMAIL_SECURE> --transport stdio proton-mail-unofficial -- npx -y proton-mail-mcpReplace <…> with your own values. 10 more environment variables are in the server README
Platform CLI
codex mcp add proton-mail-unofficial --env PROTONMAIL_USERNAME=<PROTONMAIL_USERNAME> --env PROTONMAIL_PASSWORD=<PROTONMAIL_PASSWORD> --env PROTONMAIL_HOST=<PROTONMAIL_HOST> --env PROTONMAIL_PORT=<PROTONMAIL_PORT> --env PROTONMAIL_SECURE=<PROTONMAIL_SECURE> -- npx -y proton-mail-mcpReplace <…> with your own values. 10 more environment variables are in the server README
Config file
{
"mcpServers": {
"proton-mail-unofficial": {
"command": "npx",
"args": [
"-y",
"proton-mail-mcp"
],
"env": {
"PROTONMAIL_USERNAME": "<PROTONMAIL_USERNAME>",
"PROTONMAIL_PASSWORD": "<PROTONMAIL_PASSWORD>",
"PROTONMAIL_HOST": "<PROTONMAIL_HOST>",
"PROTONMAIL_PORT": "<PROTONMAIL_PORT>",
"PROTONMAIL_SECURE": "<PROTONMAIL_SECURE>"
}
}
}
}Replace <…> with your own values. 10 more environment variables are in the server README
Config file
{
"servers": {
"proton-mail-unofficial": {
"type": "stdio",
"command": "npx",
"args": [
"-y",
"proton-mail-mcp"
],
"env": {
"PROTONMAIL_USERNAME": "<PROTONMAIL_USERNAME>",
"PROTONMAIL_PASSWORD": "<PROTONMAIL_PASSWORD>",
"PROTONMAIL_HOST": "<PROTONMAIL_HOST>",
"PROTONMAIL_PORT": "<PROTONMAIL_PORT>",
"PROTONMAIL_SECURE": "<PROTONMAIL_SECURE>"
}
}
}
}Replace <…> with your own values. 10 more environment variables are in the server README
Platform CLI
gemini mcp add -e PROTONMAIL_USERNAME=<PROTONMAIL_USERNAME> -e PROTONMAIL_PASSWORD=<PROTONMAIL_PASSWORD> -e PROTONMAIL_HOST=<PROTONMAIL_HOST> -e PROTONMAIL_PORT=<PROTONMAIL_PORT> -e PROTONMAIL_SECURE=<PROTONMAIL_SECURE> proton-mail-unofficial npx -y proton-mail-mcpReplace <…> with your own values. 10 more environment variables are in the server README
Step by step, with commands for each platform: How to add an MCP server to Claude Code, Codex, Cursor, VS Code, Gemini CLI and more
Questions about Proton Mail (unofficial)
How to install Proton Mail (unofficial) in Claude Code?
Run `claude mcp add proton-mail-mcp -e PROTONMAIL_USERNAME=<PROTONMAIL_USERNAME> -e PROTONMAIL_PASSWORD=<PROTONMAIL_PASSWORD> -e IMAP_PASSWORD=<IMAP_PASSWORD> -- npx -y proton-mail-mcp`. Replace the placeholder variables with your credentials.
What does Proton Mail (unofficial) do?
It equips MCP clients with tools to inspect, organize, and dispatch emails through Proton Mail. Assistants can manage folder hierarchies, inspect threads, and handle attachments directly.
Why is Proton Mail Bridge required for reading mail?
Proton stores mailbox contents encrypted, so incoming IMAP queries must route through the local Bridge app to decrypt message bodies. Without Bridge running on your machine, IMAP read tools cannot access your inbox.