proton-mcp

proton-mcp

Enables MCP clients to interact with Proton Mail through a self-hosted server that works alongside Proton Mail Bridge. It provides read-only mailbox tools such as listing folders, searching mail, and retrieving messages while keeping Bridge isolated from the network.

Category
访问服务器

README

proton-mcp

A self-hosted Model Context Protocol (MCP) server for Proton Mail, designed to run next to Proton Mail Bridge and expose a small, auditable set of mailbox tools to MCP clients.

Status: early development. v0.1 is intentionally read-only. Streamable HTTP and stdio transports are available; mailbox tools are still being implemented.

Goals

  • Run continuously on a NAS or home server with Docker Compose.
  • Keep Proton Mail Bridge isolated from the LAN and internet.
  • Talk to Bridge over local IMAP/SMTP rather than handling Proton encryption directly.
  • Expose narrow MCP tools instead of generic shell or filesystem access.
  • Make mailbox cleanup efficient by returning metadata first and full message bodies only on demand.
  • Add controlled write actions only after the read-only interface is well tested.

Planned v0.1 tools

  • list_folders
  • mailbox_stats
  • top_senders
  • search_mail
  • get_message

See docs/SPEC.md for the tool contract and ARCHITECTURE.md for the deployment model.

Transports

The container defaults to authenticated Streamable HTTP:

POST /mcp
GET  /healthz

Runtime configuration:

MCP_HOST=0.0.0.0
MCP_PORT=3000
MCP_AUTH_TOKEN_FILE=/run/secrets/mcp_auth_token
MCP_ALLOWED_HOSTS=localhost,127.0.0.1,[::1]
MCP_ALLOWED_ORIGINS=

MCP_AUTH_TOKEN_FILE must contain a bearer token of at least 32 characters. Keep it in a mounted secret file rather than committing it or putting it in Compose environment values.

MCP_ALLOWED_HOSTS is a comma-separated hostname allowlist. If a reverse proxy preserves a public hostname, add that hostname explicitly. Browser requests carrying an Origin header are rejected unless that exact origin is present in MCP_ALLOWED_ORIGINS; normal non-browser MCP clients usually send no Origin header.

For local child-process clients, stdio remains available:

node dist/index.js stdio

For development:

npm run dev       # stdio
npm run dev:http  # Streamable HTTP

Deployment model

MCP client
    |
    | authenticated Streamable HTTP
    v
proton-mcp container
    |
    | localhost IMAP
    v
proton-bridge container
    |
    v
Proton Mail

The intended Docker Compose deployment gives proton-mcp and proton-bridge a shared network namespace so Bridge can remain bound to loopback. IMAP/SMTP ports must not be published to the LAN. The MCP HTTP port should be published only to the intended trusted path, such as host loopback for a local reverse proxy.

Development principles

  • No Proton account password in the repository, image, logs, or normal environment variables.
  • No arbitrary shell MCP tool.
  • No destructive MCP tools in v0.1.
  • Prefer deterministic mailbox processing to sending large volumes of email content to an LLM.
  • Keep validation simple: future agents should be able to run one command (make check) before finishing work.

Documentation

License

MIT. See LICENSE.

推荐服务器

Baidu Map

Baidu Map

百度地图核心API现已全面兼容MCP协议,是国内首家兼容MCP协议的地图服务商。

官方
精选
JavaScript
Playwright MCP Server

Playwright MCP Server

一个模型上下文协议服务器,它使大型语言模型能够通过结构化的可访问性快照与网页进行交互,而无需视觉模型或屏幕截图。

官方
精选
TypeScript
Magic Component Platform (MCP)

Magic Component Platform (MCP)

一个由人工智能驱动的工具,可以从自然语言描述生成现代化的用户界面组件,并与流行的集成开发环境(IDE)集成,从而简化用户界面开发流程。

官方
精选
本地
TypeScript
Audiense Insights MCP Server

Audiense Insights MCP Server

通过模型上下文协议启用与 Audiense Insights 账户的交互,从而促进营销洞察和受众数据的提取和分析,包括人口统计信息、行为和影响者互动。

官方
精选
本地
TypeScript
VeyraX

VeyraX

一个单一的 MCP 工具,连接你所有喜爱的工具:Gmail、日历以及其他 40 多个工具。

官方
精选
本地
graphlit-mcp-server

graphlit-mcp-server

模型上下文协议 (MCP) 服务器实现了 MCP 客户端与 Graphlit 服务之间的集成。 除了网络爬取之外,还可以将任何内容(从 Slack 到 Gmail 再到播客订阅源)导入到 Graphlit 项目中,然后从 MCP 客户端检索相关内容。

官方
精选
TypeScript
Kagi MCP Server

Kagi MCP Server

一个 MCP 服务器,集成了 Kagi 搜索功能和 Claude AI,使 Claude 能够在回答需要最新信息的问题时执行实时网络搜索。

官方
精选
Python
e2b-mcp-server

e2b-mcp-server

使用 MCP 通过 e2b 运行代码。

官方
精选
Neon MCP Server

Neon MCP Server

用于与 Neon 管理 API 和数据库交互的 MCP 服务器

官方
精选
Exa MCP Server

Exa MCP Server

模型上下文协议(MCP)服务器允许像 Claude 这样的 AI 助手使用 Exa AI 搜索 API 进行网络搜索。这种设置允许 AI 模型以安全和受控的方式获取实时的网络信息。

官方
精选