Skip to main content
Glama
protonmail-mcp

protonmail-mcp

by dadamonis

protonmail-mcp

An MCP (Model Context Protocol) server for ProtonMail, connected through ProtonMail Bridge.

Unlike generic IMAP MCP servers, this connector is Bridge-aware:

  • Auto-detects a local Bridge install and discovers its IMAP/SMTP ports and TLS certificate.

  • Verifies TLS against Bridge's own certificate — never verify=False (enforced by a test that scans the source tree).

  • Understands ProtonMail's model: labels are folders under Labels/, custom folders live under Folders/, and destructive operations on the virtual All Mail view are refused with an explanation.

  • Turns every Bridge failure mode into an actionable message: not installed, not running, wrong bridge password, certificate mismatch.

Prerequisites

  • ProtonMail Bridge installed, running, and logged in (Bridge requires a paid Proton plan).

  • Python ≥ 3.12, or just uv — it provisions Python for you.

Related MCP server: Proton Mail MCP Server

Install

# Guided setup: discovers Bridge, writes config, checks the login
uvx protonmail-mcp setup

# Run the MCP server (stdio)
uvx protonmail-mcp

MCP client configuration

Claude Code:

claude mcp add protonmail -- uvx protonmail-mcp

Claude Desktop (claude_desktop_config.json):

{
  "mcpServers": {
    "protonmail": {
      "command": "uvx",
      "args": ["protonmail-mcp"]
    }
  }
}

Configuration

~/.config/protonmail-mcp/config.toml (created by setup, permissions 600):

[[accounts]]
name = "default"
email = "you@proton.me"
display_name = "Your Name"
password = "<bridge password from Bridge → Mailbox details>"
# Optional — only needed when Bridge uses non-default ports:
# imap = { port = 1143 }
# smtp = { port = 1025 }

Multiple [[accounts]] blocks are supported; tools take an account parameter (default "default").

Environment variables configure a single account without a file: PROTONMAIL_MCP_ADDRESS, PROTONMAIL_MCP_PASSWORD, and optionally PROTONMAIL_MCP_USERNAME, PROTONMAIL_MCP_ACCOUNT_NAME, PROTONMAIL_MCP_IMAP_HOST, PROTONMAIL_MCP_IMAP_PORT, PROTONMAIL_MCP_SMTP_HOST, PROTONMAIL_MCP_SMTP_PORT.

Tools

Reading

Tool

Description

list_accounts

List configured accounts (no credentials)

list_mailboxes

Folders with message/unread counts

list_emails

Paginated listing with unread/sender/date filters; mailbox="Labels/<name>" lists labeled mail

get_email

Full body, headers, threading ids, attachment metadata

search_emails

Keyword search across subject, sender, and body

get_thread

Conversation reconstruction via Message-ID/References

download_attachment

One attachment, base64, capped at 5 MB

Sending

Tool

Description

send_email

New email (text or HTML, cc/bcc); Bridge files it into Sent

reply_email

Reply with In-Reply-To/References threading, quoting, reply-all

forward_email

Forward with the original quoted

save_draft

Save to Drafts without sending

Organisation

Tool

Description

move_email

Move between folders

delete_email

To Trash by default; permanent only with permanent=true; refused on All Mail

mark_email

Read/unread, flagged/unflagged

create_mailbox

New folder (bare names go under Folders/)

ProtonMail labels

Tool

Description

list_labels

Labels (folders under Labels/)

add_label

Copy the email into Labels/<name>

remove_label

Delete the email's copy from the label folder (located by Message-ID)

create_label / delete_label

Manage label folders

Diagnostics

Tool

Description

bridge_status

Bridge install, ports (and how they were discovered), certificate, accounts

check_health

IMAP + SMTP login and latency per account; structured guidance when Bridge is down

ping

Server liveness

Security

  • All Bridge connections use STARTTLS, verified against Bridge's own self-signed certificate loaded as the only trust root (certificate pinning). TLS verification is never disabled.

  • Passwords live in a chmod 600 config file (or env vars) and are never logged; validation errors name keys, not values.

  • Message bodies are never logged at info level or above.

  • Attachment downloads are capped at 5 MB.

  • Everything stays on 127.0.0.1 — this server talks only to your local Bridge, never to Proton's servers directly.

Development

uv sync
uv run ruff format --check . && uv run ruff check .
uv run mypy
uv run pytest

Conventional Commits are required — see CONTRIBUTING.md. The product requirements, including live-verification results against a real Bridge v3 install, live in docs/prd.md. The behavioral reference for Proton label semantics is the sibling email-mcp TypeScript server.

Bridge v3 notes (verified against a real install):

  • Port settings live in Bridge's encrypted vault, so discovery falls back to the defaults (1143/1025) with a logged notice; override ports in the config if you changed them in Bridge.

  • The TLS certificate also lives in the vault and must be exported once: Bridge → Settings → Advanced settings → "Export TLS certificates", saving cert.pem to ~/.config/protonmail-mcp/ (or set PROTONMAIL_MCP_CERT to its location). The setup wizard walks you through this.

License

LGPL-3.0-or-later — see LICENSE.

Available Tools

23 tools
add_labelA

Add a ProtonMail label to an email (copies it into the Labels/ folder — that is how Bridge represents labels).

Inputs: uid (required), label (required), account, mailbox. Returns: object

bridge_statusA

Report on the local ProtonMail Bridge: installed, running, ports, certificate, and configured accounts.

Inputs: no named parameters. Returns: object

check_healthA

Check IMAP and SMTP connectivity (with latency) for one account or all of them. Returns guidance instead of failing when Bridge is down.

Inputs: account. Returns: object

create_labelC

Create a new ProtonMail label (a folder under Labels/).

Inputs: name (required), account. Returns: object

create_mailboxB

Create a folder. Bare names are created under ProtonMail's Folders/ namespace; pass an explicit Folders/... or Labels/... path to control placement.

Inputs: name (required), account. Returns: object

delete_emailA

Delete an email: moves it to Trash unless permanent=true. Refused on the virtual All Mail folder.

Inputs: uid (required), account, mailbox, permanent. Returns: object

delete_labelB

Delete a ProtonMail label (removes the Labels/ folder).

Inputs: name (required), account. Returns: object

download_attachmentA

Download one attachment (base64), capped at 5 MB.

Inputs: uid (required), filename (required), account, mailbox. Returns: object

forward_emailC

Forward an email with the original content quoted.

Inputs: to (required), uid (required), body, account, +1 more. Returns: object

get_emailA

Read one email in full: body (text preferred), headers, threading ids, and attachment metadata.

Inputs: uid (required), account, mailbox, mark_seen, +1 more. Returns: object

get_threadA

Reconstruct the conversation thread around an email via its Message-ID / References headers (within the given folder).

Inputs: uid (required), account, mailbox. Returns: object

list_accountsA

List configured ProtonMail accounts (never includes credentials).

Inputs: no named parameters. Returns: result

list_emailsA

List emails in a folder, newest first, with pagination and date/sender/unread filters (dates are ISO YYYY-MM-DD). To list emails carrying a ProtonMail label, pass mailbox="Labels/".

Inputs: limit, since, before, offset, +4 more. Returns: object

list_labelsA

List ProtonMail labels. Labels are IMAP folders under Labels/ — use list_emails with mailbox="Labels/" to see tagged mail.

Inputs: account. Returns: result

list_mailboxesA

List folders with message and unread counts. ProtonMail labels appear as folders under Labels/, custom folders under Folders/.

Inputs: account. Returns: result

mark_emailB

Mark an email read/unread and/or flagged/unflagged.

Inputs: uid (required), read, account, flagged, +1 more. Returns: object

move_emailC

Move an email to another folder.

Inputs: uid (required), destination (required), account, mailbox. Returns: object

pingA

Liveness check — returns "pong" if the server is running.

Inputs: no named parameters. Returns: result

remove_labelA

Remove a ProtonMail label from an email (deletes its copy from the Labels/ folder, located by Message-ID).

Inputs: uid (required), label (required), account, mailbox. Returns: object

reply_emailA

Reply to an email with correct threading (In-Reply-To/References) so the conversation stays intact in ProtonMail.

Inputs: uid (required), body (required), quote, account, +2 more. Returns: object

save_draftA

Save an email as a draft in the Drafts folder without sending.

Inputs: to (required), body (required), subject (required), cc, +2 more. Returns: object

search_emailsB

Search a folder by keyword across subject, sender, and body.

Inputs: query (required), limit, account, mailbox. Returns: object

send_emailB

Send a new email through Bridge. Bridge files it into Sent.

Inputs: to (required), body (required), subject (required), cc, +3 more. Returns: object

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections.

Loading tool schema changelog…

    TDQS

    B3.3/5.0

    Scored across 23 tools

    Disambiguation3/5

    Most tools target distinct actions, but several boundaries blur: list_labels overlaps with list_mailboxes since labels appear as folders, create_mailbox can create labels when passed a Labels/ path, and remove_label vs delete_label could easily be confused. The descriptions help, but an agent still faces real misselection risk.

    Naming Consistency4/5

    The vast majority of tools follow a clear verb_noun snake_case pattern: list_emails, send_email, create_label, download_attachment. Exceptions like bridge_status and ping break the pattern slightly, but there is no chaotic mixing of styles.

    Tool Count3/5

    23 tools is on the heavy side for a single server and falls in the borderline range where each tool must clearly earn its place. Most tools are individually justified for a full email client, but the set feels larger than ideal and could be trimmed by merging health-check or label-related operations.

    Completeness4/5

    The tool surface covers the core email lifecycle well: list, get, search, send, reply, forward, draft, move, delete, mark, thread, attachments, folders, and labels. Notable gaps include no way to attach files when sending or replying, and no label rename/update operation, but agents can work around most of these gaps.

    Maintenance

    ActivityStale
    ResponsivenessNo recent community issues

    Related MCP Connectors

    Related MCP Servers

    • A
      license
      A
      quality
      B
      maintenance
      Enables AI agents to send, read, search, and organize emails via ProtonMail using Proton Bridge. Supports MCP-compatible clients like Claude and Cursor.
      18
      20 npm
      4
      MIT
    • A
      license
      Not graded
      quality
      C
      maintenance
      Enables AI assistants to send, read, search, and organize email from Proton Mail accounts via SMTP and IMAP.
      105 npm
      MIT
    • A
      license
      Not graded
      quality
      C
      maintenance
      Enables AI assistants to send, read, search, and organize Proton Mail email via SMTP and IMAP through the Model Context Protocol.
      MIT
    • A
      license
      A
      quality
      C
      maintenance
      Enables AI assistants to read and search Proton Mail inbox through Proton Mail Bridge, providing tools to list mailboxes, list messages, search messages, and fetch full message bodies. Read-only, with secure certificate pinning.
      4
      44 npm
      2
      MIT