Borrowing it
Nothing to install: this file belongs to apexxapps/proton-mail-bridge-mcp. Take a copy, put it at the same path in your own repository, and replace the rules that are about this project with yours.
curl -O https://raw.githubusercontent.com/apexxapps/proton-mail-bridge-mcp/main/CLAUDE.mdgit clone --depth 1 https://github.com/apexxapps/proton-mail-bridge-mcpWrote this? Show the measurements
A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.
[](https://agentmods.dev/instructions/apexxapps/proton-mail-bridge-mcp/claude-md)<a href="https://agentmods.dev/instructions/apexxapps/proton-mail-bridge-mcp/claude-md"><img src="https://agentmods.dev/badge/instructions/apexxapps/proton-mail-bridge-mcp/claude-md/github.svg" alt="Measured on agentmods" height="20"></a>Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.
<a href="https://agentmods.dev/instructions/apexxapps/proton-mail-bridge-mcp/claude-md"><img src="https://agentmods.dev/badge/instructions/apexxapps/proton-mail-bridge-mcp/claude-md.svg" alt="Reviewed on agentmods" width="80" height="20"></a>What it costs to keep this loaded
Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.
| Model | Per session | Once invoked |
|---|---|---|
| Fable 5.1 | $0.02555 | $0.02555 |
| Opus 5 | $0.01277 | $0.01277 |
| Sonnet 5 | $0.00511 | $0.00511 |
| Haiku 4.5 | $0.00255 | $0.00255 |
Grade C, and why
proton-mail-bridge-mcp CLAUDE.md scanned grade C with 2 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 9d ago.
A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.
Downloads and executes remote codehighSupply chain
curl | sh runs whatever the server returns today, which is not necessarily what it returned when this was reviewed.
a `curl | bash` installer on-ramp (optional — `npx` already makes install one line, so lower value Makes network callslowCapability
Not a fault in itself. Listed so you know the mod talks to something, and to what.
a `curl | bash` installer on-ramp (optional — `npx` already makes install one line, so lower value How it starts
The opening of the file, as written. The whole thing — 135 lines — stays where its author put it; the contents beside it link to each section on GitHub.
proton-mail-bridge-mcp
What this is
A small, free, open-source MCP server that gives any MCP client (Claude Code, Claude Desktop, Cursor, Cline, …) access to a user's ProtonMail — search, read, draft, send, organise. It's a standalone project, not part of BrainBoxx, but it's a deliberate gateway to it (see Positioning).
Scaffolded 2026-08-17 as a sibling folder to brainboxx/. Born out of a BrainBoxx conversation:
"CLI having Gmail is great, can we do Proton?" → the clean answer is a local MCP server, and it
doesn't belong inside BrainBoxx (BrainBoxx is a transport/control layer; an MCP server is an agent
capability — orthogonal). It composes for free: pair the machine with BrainBoxx and you drive your
Proton from your phone with zero code shared between the two.
The hard dependency — read this first
There is no public ProtonMail API (Proton is end-to-end encrypted by design). The only sanctioned
way in is Proton Bridge, which Proton ships to expose a local IMAP + SMTP server on
127.0.0.1. So:
- This server talks IMAP/SMTP to Bridge on localhost. Decrypted mail never leaves the machine.
- Bridge needs a PAID Proton plan (Mail Plus / Unlimited). Free accounts can't run Bridge → can't use this. This scopes the audience; state it honestly everywhere (README does).
- Bridge hands out per-account generated IMAP/SMTP credentials — NOT the Proton login password.
- Bridge defaults: IMAP
1143, SMTP1025, both STARTTLS with a self-signed cert. We trust the self-signed cert for localhost by default (allowSelfSigned, on) — expected for Bridge, not a smell. - Bridge runs GUI on Mac/Win, headless via
protonmail-bridge --clion servers.
Architecture
Node, ESM, MCP over stdio (the client spawns us; stdout is JSON-RPC ONLY — all logging →
stderr). Files in src/:
index.js— bin entry (#!/usr/bin/env node). Builds theMcpServer, registers tools, connectsStdioServerTransport. Does NOT hard-fail on missing config (so the client can still list tools); individual tool calls throw a helpful error if unconfigured.config.js— loads config. Precedence:PROTONMAIL_*env → JSON file ($PROTONMAIL_MCP_CONFIGor~/.config/proton-mail-bridge-mcp/config.json) → Bridge defaults.assertConfiguredgives the friendly "you're missing X" error.mail.js— the only place that touches Bridge. Connect-per-operation (imapflow client built, connected, used, logged out each call) — deliberate: sporadic MCP calls + a parked IMAP socket goes stale, so reconnecting against localhost is the robust trade.withImap/withMailboxwrappers. IMAP via imapflow, SMTP via nodemailer, draft MIME via nodemailer'sMailComposer(imported fromnodemailer/lib/mail-composer/index.js— it's NOT a named export), parsing via mailparsersimpleParser. "Delete" = move to Trash (never hard-expunge).format.js—cleanMessageturns parsed MIME into tidy JSON for an LLM;stripQuotedtrims quoted reply history +--signatures so summaries don't drown in forwarded chains (passfull:trueto keep everything).tools.js— the MCP tool surface. Deliberately small: exactly 8 tools (Simon's scope call, 2026-08-17 — the "plain and simple" niche vs the 30-tool incumbentproton-mail-mcp):search_mail(no filter = recent inbox),get_message,download_attachment,create_draft,send_message,reply,reply_all,forward. READ (first 3) always registered; WRITE (other 5) skipped entirely whenreadOnly(→ 3 tools).guard()wraps every handler so a throw becomes a clean MCP error, not a dead server. The sharp tools (send/reply/reply_all/forward) are named + described so the client's per-tool approval is the gate — we don't reinvent approval, we make it obvious.reply/reply_all/forwardsend immediately unlessdraft:true(→ Drafts). Outgoing attachments: any write tool takesattachments: [localPath]— absolute or relative to cwd, ~-expanded, read off disk via nodemailer (attachLocal); forward carries the original's attachments as bytes too. The BrainBoxx angle: email a file straight out of the brain you're in. HTML email: compose/reply/forward acceptbody(plain) ORhtml(formatted);bodyParts()always adds a plain-text alternative (viahtmlToText) so it's proper multipart/alternative, and replies/forwards quote the original as an HTML blockquote (quoteHtml). Reading HTML-only mail:format.js htmlToTextfallback soget_messageisn't blank on HTML-only messages. Deliberately CUT (do NOT re-add without Simon — "plain and simple" is the positioning): mark read/unread, move/archive/trash, folders/labels, bulk ops, analytics, threads.setup.js—npx proton-mail-bridge-mcp setup: interactive first-run wizard (the onboarding differentiator vs the incumbent). Mirrors Bridge's Mailbox details panel field-for-field so users paste via Bridge's copy buttons; masked password prompt (TTY only); tests IMAP and SMTP (verifySmtp, timeout-guarded) before saving viasaveConfig(0600). Wired as an argv branch inindex.jsalongsidedoctor. ⚠️ Testing note: piped stdin drops buffered readline lines between questions — test with paced input or a pty, not a bareprintf | node.doctor.js—npx proton-mail-bridge-mcp doctor: human-facing preflight. Connects, authenticates, lists mailboxes → setup problems surface here with a clear message, not mid-conversation. (Wire thedoctorsubcommand as an argv branch inindex.jsif we wantproton-mail-bridge-mcp doctorrather thannpm run doctor/ a separate bin — currently it'sscripts.doctor+ standalone.)
What this file has done since we first saw it
Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.
- 9d ago First seen · 135 lines · 2,555 tokens per session scan C df9661e17923
proton-mail-bridge-mcp CLAUDE.md is an instructions file published in the GitHub repository apexxapps/proton-mail-bridge-mcp (0 stars, last pushed 23d ago), licensed MIT. It adds 2,555 tokens to every session, about $0.0128 per session on Opus 5. A static security scan graded it C with 2 findings (downloads and executes remote code, makes network calls). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.
Other instructions, from other repositories
next.js AGENTS.md
AGENTS.md instructions for vercel/next.js, covering next.js development guide, codebase structure, monorepo overview, core package: packages/next and other important packages.
codex AGENTS.md
AGENTS.md instructions for openai/codex, covering rust/codex-rs, the codex-core crate, code review rules, crate api surface and model visible context.
vscode buildNext.instructions.md
Working notes and architecture documentation for the new esbuild-based build system in build/next. Use when making changes to the new build pipeline (transpile/bundle commands, NLS plugin, source-map handling, resource copying, or self-hosting watch tasks).
spec-kit AGENTS.md
AGENTS.md instructions for github/spec-kit, covering agents.md, about spec kit and specify, quickstart — add a new integration in 5 steps, integration architecture and integrationmanifest — file tracking.
vscode oss-third-party-notices.instructions.md
Instructions for microsoft/vscode, covering vs code oss third-party-notices pipeline, architecture, pipeline flow in ci, applying the notice (cutover) and fallback chain (never fail the build).
langchain AGENTS.md
AGENTS.md instructions for langchain-ai/langchain, covering global development guidelines for the langchain monorepo, corridor security analysis, project architecture and context, monorepo structure and development tools & commands.