
Proton Workflow Connector
io.github.NtrpyDev由 GitHub 账号 NtrpyDev 发布v1.3.0更新于 Oct 24, 2026
Unofficial self-hosted MCP connector for Proton Mail Bridge and SimpleLogin.
概览
自托管 MCP 连接器,让助手通过 Proton Mail Bridge 读取、发送、整理和自动化 Proton Mail,并可选提供 SimpleLogin 别名工具。
- 可以做什么
- 提供 68 个 Proton Mail 工具:搜索和阅读邮件与会话、查看邮件头、下载附件,以及发送、回复、转发、起草、加标签、归档、移动、复制、恢复和管理垃圾邮件或回收站。批量操作限定在明确的 UID 列表上,破坏性操作需要确认并支持 dry_run 预览。设置 API 密钥后可选用 SimpleLogin 工具管理别名、联系人和邮箱。后台监视器或轮询工具可将新邮件和新别名事件发送到 webhook、JSONL 文件或命令。
- 适用场景
- 适合希望助手在本地处理 Proton Mail 邮箱的场景,例如筛选未读发票、起草回复、下载附件或对新邮件做出反应。适合已经运行 Proton Mail Bridge,并希望用一个本地服务器同时处理邮件和可选 SimpleLogin 别名工作的用户。
- 运行要求
- 作为本地 Python 3.11+ 进程运行,从 PyPI 安装,可用 uvx 或虚拟环境启动。Proton Mail Bridge 必须已安装、已登录并在同一台机器上运行。必需的环境变量:PROTON_BRIDGE_EMAIL、PROTON_BRIDGE_USERNAME 和 PROTON_BRIDGE_PASSWORD(Bridge 生成的密码,不是 Proton 账户密码)。可选的 SIMPLELOGIN_API_KEY 用于启用别名工具。一个进程只服务一个 Bridge 账户。
安装
在 SourceWeft 中
- 打开 控制台中的 Proton Workflow Connector,将其添加到工作区。
- 为需要使用其工具的对话启用该服务。
Desktop only,通过 STDIO。 STDIO 服务会启动本地进程,因此需要 SourceWeft 桌面宿主。
其他 MCP 客户端
参照 仓库 中的启动说明。
README
Proton Workflow Connector
[CI] [Secret scan] [Python 3.11+] [License: MIT]
Proton Workflow Connector (PWC) is a self-hosted MCP connector for reading, sending, organizing, and automating Proton Mail through Proton Mail Bridge. It works with any MCP client or local agent runtime that can launch a stdio server or call a Streamable HTTP MCP endpoint. SimpleLogin support is optional.
This is an unofficial project. It is not affiliated with, endorsed by, or sponsored by Proton AG. The connector uses Bridge-generated IMAP/SMTP credentials. It does not accept Proton account passwords or store Proton login sessions.
Quick start · Example workflows · Capabilities · Automations · Security · Documentation · Buy Me a Coffee
Why use it?
Use one local server for the mail work agents usually have to piece together:
- Search, read, send, reply, forward, draft, label, archive, and download attachments through 53 Proton Mail tools.
- Require confirmation for destructive tools, preview sends and destructive operations with
dry_run, sanitize outbound HTML by default, bound bulk operations, and allow only configured sender addresses. - React to new mail or SimpleLogin aliases through MCP polling or a background watcher that can call a webhook, append JSONL, or run a command.
- Add 13 SimpleLogin tools when you want alias, contact, and mailbox management.
- Connect over stdio, localhost Streamable HTTP, or OAuth-protected hosted HTTP.
The server exposes 68 tools in total. See the complete tool reference.
How it works
PWC is an MCP server. Your client starts it over stdio or connects to it over Streamable HTTP.
The connector talks to Proton Mail Bridge over local IMAP/SMTP. Bridge must be installed, signed in, and running on the same machine as the connector. One connector process serves one Bridge account.
SimpleLogin is optional. If SIMPLELOGIN_API_KEY is set, PWC adds alias, contact, mailbox, and new-alias polling tools. If it is unset, the Proton Mail tools still work.
For automation, run proton-workflow-watch or call the polling tools from your MCP client. Watcher output can go to a webhook, a JSONL file, or a command.
Quick start
Prerequisites
- Python 3.11 or newer
- Proton Mail Bridge, signed in and running
- The IMAP/SMTP host, ports, username, and generated password shown by Bridge
- A SimpleLogin API key only if you want the optional SimpleLogin tools
1. Install
On Windows PowerShell, activate the environment with .venv\Scripts\Activate.ps1.
2. Configure Bridge credentials
Keep the environment file outside the repository:
Edit the copied file with the connection details shown in Proton Mail Bridge. Set PROTON_BRIDGE_EMAIL to the default sender and list every permitted sender address in PROTON_BRIDGE_SENDER_ADDRESSES.
3. Run the connector
4. Connect an MCP client
Any MCP client or local agent runtime can use PWC as long as it supports stdio or Streamable HTTP:
- stdio: run
proton-workflow-connector --transport stdio --env-file ... - HTTP: run the connector with
--transport streamable-httpand point the client at/mcp
Claude Code stdio example:
Codex stdio example:
Run server_status after connecting. It checks IMAP, SMTP, SimpleLogin, OAuth configuration, and the server version without returning secrets.
Then run list_folders; Bridge folder names vary by account and version.
See MCP client setup for generic client configuration, localhost HTTP, hosted Streamable HTTP, Codex, Claude Code, and the plugin wrapper.
Example workflows
Once connected, ask your MCP client to:
- "List my mail folders and show the unread count for each."
- "Find unread invoices from the last 30 days without marking them read."
- "Draft a reply to the latest message in this thread, but do not send it."
- "Download the PDF attachments from this message."
- "Archive these message UIDs after showing me the exact list."
- "Create a SimpleLogin alias for shopping and add a contact for this merchant."
- "Poll for new mail from
[email protected]using theinvoicescursor."
The connector returns structured data to the MCP client. The client decides how to present it and when to request approval for actions.
Capabilities
Proton Contacts are not included because Proton Mail Bridge does not expose them.
Automations
The background watcher polls for new mail or newly created SimpleLogin aliases and emits one event per new item:
Key behavior:
- The first run establishes a baseline and does not replay the existing mailbox.
- Persistent cursors survive restarts and account for IMAP
UIDVALIDITYchanges. - Webhook delivery is at-least-once, with retries, exponential backoff, and dead-letter handling.
- An optional HMAC-SHA256 signature lets webhook receivers verify each event.
- Events contain message metadata only; bodies and attachments remain available on demand through MCP tools.
- JSON rules can run several independently filtered triggers from one watcher.
--dry-runshows which events and rule actions would fire without delivering, acting, or advancing cursors.
Read Triggers and webhooks for event schemas, filters, delivery guarantees, signature verification, rules, and systemd examples.
Security model
This connector processes private mail. Its defaults and boundaries are intentionally explicit:
- Prefer local stdio. Bridge and the connector should stay on the same trusted machine whenever possible.
- Keep credentials private. Store Bridge-generated credentials and optional API keys outside Git with user-only permissions.
- Confirm destructive actions. Permanent deletion, empty-folder operations, folder deletion, and alias deletion require
confirm=trueafter explicit user intent. - Preview before mutating. Sends, forwards, replies, bulk actions, permanent delete, and empty-folder operations support
dry_run=truepreviews. - Treat mail as untrusted. Read/search results mark email content as
content_trust: "untrusted", and outbound HTML is sanitized unlesstrusted_html=true. - Bound bulk operations. Bulk tools require explicit numeric UIDs and default to a maximum of 50 messages per call.
- Restrict senders. Mail can only be sent from
PROTON_BRIDGE_EMAILor an address inPROTON_BRIDGE_SENDER_ADDRESSES. - Protect remote access. Non-local HTTP deployments require deliberate Host/Origin policy; internet deployments require HTTPS and an external OAuth/OIDC provider.
- Limit exposed data. Optional audit records exclude addresses, message bodies, attachments, credentials, and tokens.
- Treat events as untrusted input. Email subjects and alias names can be attacker-controlled; webhook receivers and commands must validate event fields.
Read SECURITY.md before using real mail and Hosted HTTP setup before exposing the connector beyond localhost.
Known boundaries
- Proton Mail Bridge must remain running while the connector or watcher is active.
- One server process connects to one Bridge account.
- Proton Contacts, native scheduled sending, filters, account settings, and key management are not exposed by Bridge and are not emulated.
- New-mail and new-alias triggers use polling because Proton and SimpleLogin do not provide a compatible push API.
- Trigger events include metadata, not message bodies or attachments.
All Mailis a virtual read-only Bridge mailbox; start move and permanent-delete operations from a writable folder.
Documentation
Official upstream references:
Development
Install the development dependencies and run the local checks:
Tests use synthetic data and do not require access to a real mailbox. Live checks are documented separately in Integration tests.
See CONTRIBUTING.md for contribution and privacy requirements. Report security issues privately as described in SECURITY.md.
License
MIT. See LICENSE.
来源:README.md,提交 6cf73f4
工具
0版本历史
1- v1.3.0最新Sep 16, 2026
评分
已满足适用检查项的 50%
该评分衡量此收录条目的完整程度,依据注册中心条目、端点与公开来源计算得出。它不是对服务器本身的评价,也不表示服务器安全或当前可用:可连通性是带日期的检查结果,评分也不包含安装量或用户评价。
- 近 30 天内可连通25 分
请保持端点能够响应 MCP 握手;SourceWeft 每 30 天探测一次。
- 已声明认证方式10 分
请在注册中心条目中声明凭据请求头,或保持端点能够响应探测,以便判定其认证方式。
- 已列出工具15 分
请让服务器在无凭据时响应 tools/list,或发布可在沙箱中无凭据启动的软件包。
- 描述必需15 分
- 图标10 分
- 文档15 分
- 许可证10 分