protonmail-mcp
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 登录信息。
安装
# 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": "…" }
}
}
}工具
读取(安全 —— 让代理自由运行这些工具):
工具 | 作用 |
| 列出文件夹/标签 |
| 邮箱中的最新邮件(摘要) |
| 未读邮件(摘要) |
| 按文本 / 发件人 / 收件人 / 主题 / 日期范围搜索 |
| 按 uid 获取完整邮件(默认裁剪引用的历史内容) |
写入(您的 MCP 客户端应在运行这些工具前询问):
工具 | 作用 |
| 保存草稿(绝不发送) |
| 线程回复 —— 默认保存草稿, |
| 立即发送新邮件 |
| 切换已读/未读标志 |
| 在文件夹之间移动 |
| 移动到回收站(在清空之前可恢复) |
设置 "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 无关联,亦未获得其认可。
This server cannot be installed
Maintenance
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
Related MCP Connectors
Hosted email MCP for AI agents with inboxes, send/receive, memory, recovery, and credits.
Shipmail MCP server for AI agent custom-domain email inboxes with REST API and webhooks.
MCP server for AI agents to plan, verify, and deploy Cloudflare-native apps.
Latest Blog Posts
- Who's Calling? MCP Hosts Are an Identity Blind Spot (And the Spec Knows It)By Om-Shree-0709 on .mcpAgent IdentityOAuth 2.1
- Your AI Chatbot Just Exposed Your CEO's Salary to an InternBy Om-Shree-0709 on .Agent IdentityMCP SecurityOAuth Delegation
- Why MCP Servers Need Execution Sandboxing (And Why Your Current Stack Isn't Enough)By Om-Shree-0709 on .Agentic AiPrompt InjectionWebAssembly
MCP directory API
We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/apexxapps/proton-mail-bridge-mcp'
If you have feedback or need assistance with the MCP directory API, please join our Discord server