[2026.04.02] #OSS #AI-AUTOMATION

Building a Bridge-Free ProtonMail MCP Server

BY Ichiburn EST. 2 min read

The Problem

Every existing ProtonMail MCP server requires Proton Bridge — a paid desktop app. Free ProtonMail users have no way to integrate their email with AI assistants.

I found 11 existing ProtonMail MCP projects on GitHub. All of them require Bridge.

The Solution

I built protonmail-mcp — a Go MCP server that talks directly to Proton’s API using only their official open-source libraries:

No third-party API wrappers. No supply chain risk from unknown packages handling your passwords and private keys.

Features

  • Login — SRP authentication with 2FA (TOTP) support
  • Read — Decrypt and read PGP-encrypted emails
  • Search — Filter by sender, subject, keyword
  • Send — Two-step confirmation with server-side token (prevents prompt injection)

Security: 8 Rounds of Adversarial Review

The code went through 8 rounds of adversarial security review using a Writer/Reviewer separation (Claude writes, Codex reviews):

RoundCRITICALHIGHMEDIUMFixed
13453
20247
30505
40202
50044
60022
70011
80000

24 issues found and fixed. Key findings included:

  • Prompt injection bypass — A malicious email could instruct the AI to send emails. Fixed with server-side confirmation tokens.
  • PGP key material in memory — Salted key passphrase wasn’t zeroed after use. Fixed with immediate zero-fill.
  • 2FA session leak — Partially authenticated sessions weren’t cleaned up on failure.
  • SMTP header injection — Malformed email addresses could inject headers. Fixed with strict validation.

Final state: gosec, govulncheck, and staticcheck all clean.

How It Works

1. SRP Authentication (go-srp)
2. Key Unlock (salted passphrase → PGP keyring)
3. Fetch Messages (encrypted from API)
4. Decrypt Locally (gopenpgp)
5. Send via Draft → Confirm flow (token-based)

All encryption and decryption happens locally. Credentials are never stored on disk.

Try It

go install github.com/ichiburn/protonmail-mcp@latest

Add to your Claude Code .mcp.json:

{
  "mcpServers": {
    "protonmail": {
      "command": "protonmail-mcp",
      "env": {
        "PROTON_USER": "[email protected]",
        "PROTON_PASS": "your-password"
      }
    }
  }
}

Source: github.com/ichiburn/protonmail-mcp