protonmail-mcp
Read-only access to a Proton Mail account via Proton Mail Bridge's local IMAP interface, allowing AI agents to check Bridge connectivity, list mailboxes/labels, search mail by query, sender, subject, or date range (returning metadata and optional snippets), and fetch individual decoded text messages with attachment metadata.
Click on "Deploy Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@protonmail-mcpSearch my Proton inbox for mail from Proton about security keys."
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
protonmail-mcp
A small, local-first, read-only MCP server that lets ChatGPT search and read a Proton Mail account through Proton Mail Bridge.
The project intentionally does less than a normal email client. It cannot send, reply, delete, move, archive, label, mark read/unread, or download attachment bytes.
What ChatGPT gets
Four read-only tools:
proton_health- verify Bridge connectivity without reading messageslist_mailboxes- list folders/labelssearch_mail- search mail and return metadata plus optional short snippetsget_message- fetch one decoded text message plus attachment metadata
Example prompts after connecting the app:
Search my Proton inbox for mail from Proton about security keys.
Find emails with "Daybreak Blue" from the last 30 days and summarize the important ones.
Read the message with the subject "Interview details" and tell me the date and action items.Related MCP server: ProtonScope
Why Proton Mail Bridge
Proton Mail Bridge decrypts Proton Mail locally and exposes IMAP to local email clients. This server connects only to that local IMAP interface. Use the Bridge-generated IMAP password, never your Proton Account password.
Requirements
A Proton plan that includes Proton Mail Bridge
Proton Mail Bridge installed and signed in
Python 3.10+
uvrecommended, or ordinarypipChatGPT Developer Mode plus a way to expose the local MCP through OpenAI Secure MCP Tunnel
Install
Unzip the project, then:
cd protonmail-mcp
cp .env.example .env
chmod 600 .env
$EDITOR .env
uv sync --extra dev
uv run protonmail-mcp doctorFill .env from Proton Mail Bridge -> Mailbox details. Port and security mode can vary, so use
what Bridge actually shows.
Start the server:
uv run protonmail-mcp serveDefault endpoint:
http://127.0.0.1:8765/mcpSee docs/CHATGPT_SETUP.md for the ChatGPT connection steps.
pip alternative
python -m venv .venv
source .venv/bin/activate
pip install -e '.[dev]'
protonmail-mcp doctor
protonmail-mcp serveSearch API
search_mail accepts:
query: IMAP text search across headers/bodysender: sender filtersubject: subject filterafter: inclusive ISO date, for example2026-09-01before: exclusive ISO datemailbox: exact mailbox name, or omit to search All Mail when availablelimit: capped locally, default 20include_snippet: return a short text preview, default true
Search results include an opaque ref. Pass that ref to get_message.
Read-only guarantees in this codebase
This is not only a prompt-level promise.
There is no SMTP implementation or dependency.
Every
SELECTcall usesreadonly=True.Every body fetch uses
BODY.PEEK.There is no code path calling IMAP
STORE,COPY,MOVE,APPEND, orEXPUNGE.MCP tools declare the standard read-only annotation.
The MCP HTTP listener refuses non-loopback hosts.
The Bridge IMAP target refuses non-loopback hosts unless you explicitly opt in.
You can audit these claims with:
rg -n 'STORE|COPY|MOVE|APPEND|EXPUNGE|SMTP|BODY\\[' src testsBODY[ should appear only in tests that verify the parser's fake IMAP response. Production fetch
queries use BODY.PEEK.
TLS note
Proton Mail Bridge normally uses a locally generated self-signed TLS certificate. This project therefore defaults to certificate verification off only for the loopback Bridge connection. Non-loopback IMAP is blocked by default, and if explicitly enabled it requires TLS verification.
Prompt-injection note
Email is attacker-controlled input. A malicious message can contain text such as "ignore your instructions". The server converts HTML to inert text, never loads remote content, and marks mail as untrusted external data in tool responses. The model still needs to treat message content as data rather than instructions.
Tests
uv run pytest
uv run ruff check .The tests include a contract check that searches use read-only mailbox selection and
BODY.PEEK.
Current limitations
No attachment body retrieval, only metadata.
No conversation/thread reconstruction yet.
Search uses IMAP semantics, so advanced Proton web-search syntax is not implemented.
Very large messages are withheld above
PROTON_MCP_MAX_MESSAGE_BYTESinstead of pulling large attachments into model context.ChatGPT custom MCP apps currently require ChatGPT web according to OpenAI's help documentation.
License
MIT
This server cannot be deployed
Maintenance
Related MCP Connectors
Search your AI chat history (ChatGPT, Claude, Codex) from any MCP client. Remote, private, read-only
An MCP server that provides read access to your cloud storage providers, bank accounts and more.
MCP server for MailTempo's public free temporary email inboxes.
Read-only MCP server exposing a user ORANO library to their own AI agent.
Related MCP Servers
- AlicenseAqualityDmaintenanceA 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.416 npm1MIT
- FlicenseNot gradedqualityBmaintenanceA 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.-
- AlicenseAqualityBmaintenanceAn MCP server that enables AI assistants to read and search Proton Mail messages through a locally running Proton Mail Bridge. It provides tools like list_folders, list_messages, search_messages, get_message, and get_attachment.611 npmMIT
- AlicenseNot gradedqualityCmaintenanceProvides read-only access to Proton Mail via MCP, enabling AI agents to list accounts/folders, search messages, and read emails using Proton Mail Bridge's local IMAP server.MIT