Skip to main content
Glama
protonmail-mcp

protonmail-mcp

by apexxapps

protonmail-mcp

让您的 AI 编码代理访问您的 ProtonMail —— 搜索、读取、草拟和发送 —— 从 Claude Code、Claude Desktop、Cursor 或任何 MCP 客户端。

“查一下我的 Proton,告诉我今天有什么需要处理的。” “找到 Sarah 的最后一封邮件,草拟一封回复说周四下午 2 点可以 —— 先不要发送。”

由于 Proton 是端到端加密的,没有公开的邮件 API —— 因此它通过 Proton Bridge(Proton 专为此提供的官方本地网关)进行通信。所有数据都保留在 127.0.0.1 上;您解密的邮件绝不会离开您的机器,这里没有任何托管服务。


开始之前 —— 唯一的要求

您需要让 Proton Bridge 在同一台机器上运行。

  • Bridge 需要 付费 Proton 套餐(Mail Plus / Proton Unlimited)。免费 Proton 账户无法使用 Bridge,因此也无法使用本工具。这是 Proton 的限制,不是我们的。

  • Bridge 支持 macOS、Windows 和 Linux(在服务器上可通过 protonmail-bridge --cli 以无头模式运行)。

  • Bridge 为每个账户生成 独立的 IMAP/SMTP 用户名和密码 —— 您在这里使用这些凭据,不是您通常的 Proton 登录信息。

Related MCP server: ProtonMail MCP Server

安装

# Claude Code — one line, no global install:
claude mcp add protonmail --scope user -- npx -y protonmail-mcp

然后告诉它如何连接 Bridge —— 既可以使用环境变量,也可以使用配置文件。

配置文件(~/.config/protonmail-mcp/config.json):

{
  "user": "you@proton.me",
  "pass": "your-bridge-generated-password",
  "imapPort": 1143,
  "smtpPort": 1025
}

或者使用环境变量: PROTONMAIL_USER、PROTONMAIL_PASS、PROTONMAIL_IMAP_PORT、PROTONMAIL_SMTP_PORT。(复制 config.example.json 可查看完整选项。)

在接入代理之前,先确认它能正常工作:

npx protonmail-mcp doctor

这会连接到 Bridge、进行身份验证并列出您的邮箱 —— 因此任何设置问题都会在这里以明确的消息显示出来,而不是在对话中途以神秘的方式失败。

其他 MCP 客户端

任何 MCP 客户端都可以使用 —— 通过 stdio 将其指向 protonmail-mcp 命令即可。对于使用 JSON 配置的客户端(Claude Desktop、Cursor、……):

{
  "mcpServers": {
    "protonmail": {
      "command": "npx",
      "args": ["-y", "protonmail-mcp"],
      "env": { "PROTONMAIL_USER": "you@proton.me", "PROTONMAIL_PASS": "…" }
    }
  }
}

工具

读取(安全 —— 让代理自由运行这些工具):

工具

作用

list_mailboxes

列出文件夹/标签

list_recent_mail

邮箱中的最新邮件(摘要)

get_unread_mail

未读邮件(摘要)

search_mail

按文本 / 发件人 / 收件人 / 主题 / 日期范围搜索

get_message

按 uid 获取完整邮件(默认裁剪引用的历史内容)

写入(您的 MCP 客户端应在运行这些工具前询问):

工具

作用

create_draft

保存草稿(绝不发送)

reply_to_message

线程回复 —— 默认保存草稿,send=true 时发送

send_message

立即发送新邮件

mark_read / mark_unread

切换已读/未读标志

archive_message / move_message

在文件夹之间移动

trash_message

移动到回收站(在清空之前可恢复)

设置 "readOnly": true(或 PROTONMAIL_READONLY=1)将仅注册读取工具 —— 这是一个硬性保证,无论客户端的批准设置如何,代理都不能发送、移动或删除。

安全模型

真正重要的写入工具 —— send_message、trash_message 以及带 send=true 的 reply_to_message —— 其命名和描述使您的 MCP 客户端的逐工具批准成为自然的闸门;读取操作从不提示。优先选择草拟而不是发送:代理撰写,您在 Proton 中审阅,然后点击发送。对于无人值守/无头设置,请使用 readOnly 运行,这样就根本没有任何危险操作需要批准。

在手机上

这是一个本地服务器,因此只要您的代理所在的位置即可访问。将机器与 BrainBoxx 配对,您就可以在口袋里完成所有操作 —— 在火车上*“查一下我的 Proton,告诉我有什么需要处理的”*,等您到家时回复草稿已经写好了。

工作原理

MCP client (Claude Code / Cursor / …)
        │  MCP over stdio
        ▼
   protonmail-mcp   ──IMAP──►  127.0.0.1:1143  ┐
        │          ──SMTP──►  127.0.0.1:1025  ├─ Proton Bridge ──► Proton Mail
        └── clean JSON in, tool calls out       ┘   (local, TLS, your machine only)

Bridge 在 localhost 上提供自签名证书(这是预期的);本工具默认信任 127.0.0.1。如果您为 Bridge 提供了受信任的证书,可设置 "allowSelfSigned": false 以强制完整验证。

许可证

MIT © 2026 Simon Stark。与 Proton AG 无关联,亦未获得其认可。

Available Tools

8 tools
create_draftA

Compose a new email and save it to Drafts. Does NOT send — you review and send it yourself in Proton. Can include local file attachments.

Inputs: to (required), subject (required), cc, bcc, +3 more.

download_attachmentA

Save an attachment from a message to disk (into the configured download directory). Identify it by filename or 0-based index (from get_message); if the message has just one attachment, neither is needed. Returns the saved file path.

Inputs: uid (required), index, mailbox, filename.

forwardA

Forward a message to new recipients, carrying its original attachments. Optional intro note via body. Sends immediately unless draft=true. Can add further local file attachments.

Inputs: to (required), uid (required), body, html, +3 more.

get_messageA

Read one full message by uid (from a search result). Quoted reply history and signatures are trimmed by default for readability; pass full=true to keep everything. The result lists any attachments (name/type/size) — use download_attachment to save one.

Inputs: uid (required), full, mailbox.

replyA

Reply to a message (to its sender), correctly threaded, quoting the original. Sends immediately unless draft=true (saves to Drafts for you to review). Can include local file attachments.

Inputs: uid (required), body, html, draft, +2 more.

reply_allA

Reply to a message and everyone on it (sender + all other recipients, excluding you), threaded and quoting the original. Sends immediately unless draft=true. Can include local file attachments.

Inputs: uid (required), body, html, draft, +2 more.

search_mailA

Search email by any combination of free-text, sender, recipient, subject, and date range. With NO filters it returns your most recent inbox messages. Returns summaries (no body) newest first — use get_message with a result's uid to read the full text.

Inputs: to, from, limit, query, +5 more.

send_messageA

Send a new email immediately. This goes out the moment it runs — the client should confirm first. To let a human review before sending, use create_draft instead. Can include local file attachments.

Inputs: to (required), subject (required), cc, bcc, +3 more.

Tool Schema Changelog

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

Loading tool schema changelog…

    TDQS

    A4.2/5.0

    Scored across 8 tools

    Disambiguation4/5

    Most tools are clearly distinct: search/get/download form a retrieval pipeline, and create_draft/send_message are explicitly contrasted. reply, reply_all, and forward could be confused, but their descriptions precisely define recipient behavior and threading.

    Naming Consistency4/5

    Most tools follow a clear verb_noun pattern like search_mail, get_message, download_attachment, create_draft, send_message. However, reply and forward are bare verbs, and reply_all mixes a verb with an adverb, creating minor inconsistency.

    Tool Count5/5

    Eight tools is a well-scoped set for an email-focused server. Each tool covers a distinct core email action without unnecessary redundancy or bloat.

    Completeness4/5

    The set covers search, read, download attachments, reply, reply-all, forward, draft, and send — the essential email workflows. Minor gaps like delete, move, or archive exist, but agents can handle common tasks end-to-end.

    Maintenance

    ActivityInactive
    ResponsivenessNo recent community issues

    Related MCP Connectors

    Related MCP Servers

    • A
      license
      A
      quality
      D
      maintenance
      A read-only MCP server that connects to Proton Mail via Proton Bridge, enabling AI assistants to search, list, and read emails securely without leaving your machine.
      4
      1
      MIT
    • A
      license
      Not graded
      quality
      D
      maintenance
      An MCP server that connects to ProtonMail via Bridge, enabling AI assistants like Claude to manage your email.
      3
      MIT
    • F
      license
      Not graded
      quality
      B
      maintenance
      A lightweight MCP server providing AI agents a scoped, read-and-draft-only view into Proton Mail via Proton Bridge, with code-enforced restrictions preventing external access or sending.
      -
    • F
      license
      Not graded
      quality
      D
      maintenance
      A security-first MCP server that provides AI agents with a scoped, read-and-draft-only view into Proton Mail via Proton Bridge, ensuring no emails can be sent and access is restricted to configured workspaces.
      5
      -