Skip to main content

protonmail-mcp

Let your AI agent work your Proton Mail inbox — without handing it the keys.

An MCP server for Proton Mail, running entirely on your machine through Proton Bridge. Read-only by default, every write previewed before it happens, every limit enforced by the server — not by the prompt.

PyPI Python License: MIT CI CodeQL OpenSSF Scorecard

Quick start · Features · Security · Documentation


Just ask

"What came in overnight that actually needs me?"

"Find the invoice Acme sent last month and save the PDF."

"Draft a polite reply to Alice declining Thursday's meeting."

"Archive every newsletter from this week."

Your agent searches, reads, drafts and tidies your mailbox. You stay in control of anything that changes, sends or deletes mail.

Why protonmail-mcp

🔒 Safe by default ✋ You approve every change 🏠 Nothing leaves your machine
Starts read-only. Mailboxes are opened READONLY; not even the unread flag moves. Every edit, move, send and deletion is a prepare → commit pair, bound to the exact preview. Talks only to Bridge on 127.0.0.1. No telemetry, no third party, no cloud.
🧱 Limits the model can't talk its way past 🧾 Audited 🧪 Heavily tested
Recipient allowlists, quotas, bulk caps and loop guards live in the server. Every tool call lands in an append-only local JSONL log. Adversarial, fuzz and capability-matrix tests, plus CodeQL, semgrep and gitleaks on every push.

How it works

flowchart LR
    A["🤖 AI agent<br/>(Claude, opencode, …)"] -- MCP --> S
    subgraph S["protonmail-mcp · your machine"]
        direction TB
        P["Capability policy"] --> C["Confirmation tokens"] --> L["Audit log"]
    end
    S -- "IMAP / SMTP<br/>127.0.0.1" --> B["Proton Bridge"]
    B -- "end-to-end encrypted" --> PM[("Proton Mail")]

Proton has no public mailbox API: Bridge is the supported way in. protonmail-mcp wraps Bridge's local IMAP and SMTP endpoints in a small, auditable set of MCP tools.

Features

Unlock exactly what you need. Each level adds to the previous one, and tools you have not enabled simply do not exist for the agent.

Mode Your agent can… Guard rails
📖 read (default) List, search and read mail, follow threads, get a daily digest, save attachments and .eml exports READONLY mailboxes; files only in a local sandbox
📝 draft Write new drafts, reply, reply-all, forward (with original attachments), edit, delete drafts Writes confined to Drafts; duplicate drafts suppressed
🗂️ organize Mark read/unread, flag, move, archive, trash, label — and undo the last move Bulk cap (50 by default); Drafts protected
📤 send Send a draft you have reviewed Recipient allowlist (self-only by default), hourly/daily quotas, size and loop guards
🗑️ delete Permanently erase one message from Trash Typed confirmation phrase; one message per call; no "empty trash"

Also included

  • 🔎 Smart reading. Quotes and signatures stripped, HTML rendered to Markdown, link inventory, untrusted-content markers.
  • ⚡ Offline search. Opt-in local SQLite full-text index for instant queries.
  • 🔔 Live updates. Opt-in IMAP IDLE notifications as MCP resource updates.
  • 👥 Multiple accounts. One profile per Proton account, each with its own capability ceiling.
  • 🌐 Runs anywhere. stdio by default; streamable HTTP with mandatory bearer auth; Docker Compose setup for headless hosts.

→ Full list of tools and resources: docs/tools.md

Quick start

You need: a paid Proton Mail plan (required by Bridge), and Proton Bridge installed, running and signed in. Copy the mailbox password shown in the Bridge UI — it is not your Proton password.

1. Install

uvx protonmail-mcp          # run without installing (recommended)
pipx install protonmail-mcp # or install it

2. Connect your MCP client

Claude Desktop (claude_desktop_config.json):

{
  "mcpServers": {
    "protonmail": {
      "command": "uvx",
      "args": ["protonmail-mcp"],
      "env": {
        "PROTONMAIL_BRIDGE_USERNAME": "you@proton.me",
        "PROTONMAIL_BRIDGE_PASSWORD": "your-bridge-mailbox-password"
      }
    }
  }
}

Using opencode or another client, or keeping the password out of the config file? See docs/configuration.md.

3. Check the connection

PROTONMAIL_BRIDGE_USERNAME="you@proton.me" PROTONMAIL_BRIDGE_PASSWORD="..." \
  uvx protonmail-mcp --check

You should see your folders and latest messages. That's it — ask your agent about your inbox.

Unlock more

Set PROTONMAIL_MCP_MODE to draft, organize, send or delete, or fine-tune capabilities, allowlists and quotas in policy.toml. See the configuration guide and the annotated policy.example.toml.

Security

Email is attacker-controlled input: a message can try to talk your agent into forwarding your mail, mass-deleting it, or sending spam. protonmail-mcp is built on the assumption that the agent can be manipulated, and puts the hard limits where the model cannot reach them.

Changes are previewed, then committed

New drafts go straight to the Drafts folder. Anything that edits, moves, sends or deletes existing mail takes two calls:

sequenceDiagram
    autonumber
    participant Agent
    participant Server as protonmail-mcp
    participant Bridge as Proton Bridge
    Agent->>Server: prepare_send_draft(draft)
    Server-->>Agent: exact preview + single-use token<br/>(bound to the payload hash, expires in 5 min)
    Note over Agent: You review the preview
    Agent->>Server: commit_send_draft(token)
    Server->>Server: re-check token, payload, allowlist,<br/>quotas, loop guards
    Server->>Bridge: SMTP submission

The token guarantees that what is committed is exactly what was previewed: a replayed, expired or tampered request is rejected. The server-side policy is the hard limit: even an agent that skips the review cannot send outside your allowlist or over your quota.

Guarantees

  • Fail closed. No configuration means read-only. An invalid policy stops the server from starting.
  • Least privilege. Disabled capabilities are not registered as tools at all.
  • Server-side policy. Allowlists, quotas, bulk caps and loop guards are enforced by the server; the agent cannot grant itself privileges.
  • Sandboxed files. Attachments and exports only touch one directory, with path-traversal protection and filename sanitization. No tool accepts an arbitrary path.
  • Local only. Bridge on loopback, no telemetry. The test suite blocks non-loopback network access, so none can be added silently.
  • Untrusted content is labeled. Message bodies are marked as untrusted data for the agent.
  • Deliberately missing. No raw IMAP/SMTP passthrough, no filter or auto-forward management, no folder creation/deletion, no fetching of links from mail.

Every push runs ruff (bandit rules), strict mypy, adversarial and fuzz tests, gitleaks, zizmor, pip-audit, semgrep and CodeQL. Read the full threat model and security architecture in SECURITY.md, and report vulnerabilities privately through GitHub's Security → Report a vulnerability.

Keep the Bridge password secret. Any local process that knows it can read your mail through Bridge: that is Bridge's trust model. Prefer your client's environment or file-based secret support over inline values.

Documentation

⚙️ Configuration Environment variables, CLI flags, clients, policy.toml
🧰 Tools and resources Every tool per capability, resources, index, notifications
👥 Profiles Several Proton accounts
🌐 HTTP transport · 🐳 Docker Remote and headless deployments
🛠️ Development Tests and releases
🧭 Alternatives · 🗺️ Roadmap Other servers, what's next

MIT licensed · Unofficial: not affiliated with, endorsed by, or supported by Proton AG. "Proton Mail" and "Proton Bridge" are trademarks of Proton AG.

Metadata

Release files for protonmail-mcp 0.4.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for protonmail-mcp 0.4.1
File Size Uploaded Provenance Actions
protonmail_mcp-0.4.1.tar.gz 167.7 kB With provenance Details for protonmail_mcp-0.4.1.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for protonmail-mcp 0.4.1
File Interpreter ABI Platform Actions
protonmail_mcp-0.4.1-py3-none-any.whl Python 3 none any Details for protonmail_mcp-0.4.1-py3-none-any.whl

Total release size: 221.3 kB

Release files / protonmail_mcp-0.4.1.tar.gz

Download URL protonmail_mcp-0.4.1.tar.gz
Size 167.7 kB
Tags Source
SHA-256 checksum
How to use checksums
d691a900c62c45a3ad60bbaba276696330719cbc511afdafb9b5f16d6c305511
BLAKE2b-256 checksum
How to use checksums
7fdf7cd918e2461cb8bf1d9a97d22da9370b387839a16198dff2a13527b2ca6e
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 13, 2026.

Transparency log

Release files / protonmail_mcp-0.4.1-py3-none-any.whl

Download URL protonmail_mcp-0.4.1-py3-none-any.whl
Size 53.6 kB
Tags Python 3
SHA-256 checksum
How to use checksums
d04c7a1528c92b8b931b930f9ed0b91e933270cca2a94e4e1ae25ce0ae428e26
BLAKE2b-256 checksum
How to use checksums
d116c226a7097fb8dff9dfb437dd9dbf1b7a6e732a5a83f46fa9b6560bfad10e
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 13, 2026.

Transparency log

Security for protonmail-mcp 0.4.1

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

Full provenance

Both files in this release have been uploaded with provenance metadata.

Select from 2 files

Attestation for protonmail_mcp-0.4.1.tar.gz

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 13, 2026.

Transparency log

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page