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.
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.1is 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_foldersmailbox_statstop_senderssearch_mailget_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
AGENTS.md— concise instructions for coding agents.ARCHITECTURE.md— system boundaries and decisions.SECURITY.md— security invariants.docs/SPEC.md— MCP tool contract.docs/DEVELOPMENT.md— local development workflow.docs/OPERATIONS.md— Synology / Docker operations.
License
MIT. See LICENSE.
Recommended Servers
playwright-mcp
A Model Context Protocol server that enables LLMs to interact with web pages through structured accessibility snapshots without requiring vision models or screenshots.
Magic Component Platform (MCP)
An AI-powered tool that generates modern UI components from natural language descriptions, integrating with popular IDEs to streamline UI development workflow.
Audiense Insights MCP Server
Enables interaction with Audiense Insights accounts via the Model Context Protocol, facilitating the extraction and analysis of marketing insights and audience data including demographics, behavior, and influencer engagement.
VeyraX MCP
Single MCP tool to connect all your favorite tools: Gmail, Calendar and 40 more.
graphlit-mcp-server
The Model Context Protocol (MCP) Server enables integration between MCP clients and the Graphlit service. Ingest anything from Slack to Gmail to podcast feeds, in addition to web crawling, into a Graphlit project - and then retrieve relevant contents from the MCP client.
Kagi MCP Server
An MCP server that integrates Kagi search capabilities with Claude AI, enabling Claude to perform real-time web searches when answering questions that require up-to-date information.
Neon Database
MCP server for interacting with Neon Management API and databases
E2B
Using MCP to run code via e2b.
Exa Search
A Model Context Protocol (MCP) server lets AI assistants like Claude use the Exa AI Search API for web searches. This setup allows AI models to get real-time web information in a safe and controlled way.
Qdrant Server
This repository is an example of how to create a MCP server for Qdrant, a vector search engine.