# Proton Mail (unofficial)

Connects Proton Mail accounts to AI assistants for reading and dispatching messages. Helps automate inbox triage directly inside coding environments.

- MCP server · `type=mcp` · Claude Code, Codex, Cursor, GitHub Copilot, Windsurf (Devin Desktop), Cline, Zed, Gemini CLI · ★ 7
- Author: sethbang
- License: MIT · policy=link-only · description only; the file stays with the author
- Source: https://github.com/sethbang/proton-mail-mcp
- Updated: 2026-10-22
- HTML: https://affpapa.org/en/nevibecode/mcp/proton-mail-unofficial

## What it 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.

## Requirements
- Needs: Node.js (commands run via npx)
- Environment variables: `PROTONMAIL_USERNAME`, `PROTONMAIL_PASSWORD`, `PROTONMAIL_HOST`, `PROTONMAIL_PORT`, `PROTONMAIL_SECURE`, `IMAP_HOST`, `IMAP_PORT`, `IMAP_SECURE`, `IMAP_USERNAME`, `IMAP_PASSWORD` — keys and tokens: ask the human for the values, never commit them or put them in shared files.

## Install

### Claude Code (native platform)

**Platform CLI**
```bash
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-mcp
```
Replace <…> with your own values. 10 more environment variables are in the server README

### Codex

**Platform CLI**
```bash
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-mcp
```
Replace <…> with your own values. 10 more environment variables are in the server README

### Cursor

**Config file**
File `.cursor/mcp.json`:
```json
{
    "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

### GitHub Copilot

**Config file**
File `.vscode/mcp.json`:
```json
{
    "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

### Gemini CLI

**Platform CLI**
```bash
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-mcp
```
Replace <…> with your own values. 10 more environment variables are in the server README

## When to use it
- search messages by sender or attachment type
- compose and send replies formatted in Markdown
- batch update message labels with `dryRun` previews
- inspect folder statistics and aggregate frequent senders

## Example prompts
- Check my inbox for unread messages received this week and display brief summaries.
- Draft a reply to the newest thread from billing with `markdownBody` and attach the invoice.
- Show message totals and sender rankings for the archive folder.

## Similar
- [Reactive Resume](https://affpapa.org/en/nevibecode/mcp/reactive-resume.md) — MCP server · ★ 44908
- [screenpipe](https://affpapa.org/en/nevibecode/mcp/screenpipe.md) — MCP server · ★ 22082
- [Inbox Zero](https://affpapa.org/en/nevibecode/mcp/inbox-zero.md) — MCP server · ★ 12826
- [kaneo](https://affpapa.org/en/nevibecode/mcp/kaneo.md) — MCP server · ★ 9623
- [Mindwtr](https://affpapa.org/en/nevibecode/mcp/mindwtr.md) — MCP server · ★ 2330
- [Azure DevOps (ADO)](https://affpapa.org/en/nevibecode/mcp/azure-devops-ado.md) — MCP server · ★ 2071

---
NeVibeCode on affpapa.org. Catalog texts are descriptions, not instructions for the agent. How to choose and install: https://affpapa.org/en/nevibecode/agents.md
