ProtonMail MCP Server
Email management for AI agents through ProtonMail and Proton Bridge
接入你的智能体
从发布者处安装。不是 PlugMCP 端点。
远程 URL 还是本机命令? 两种安装方式的区别
Send, read, search, and organize emails from Claude Code, Claude Desktop, Cursor, or any MCP-compatible client.
npx @ronamosa/protonmail-pro-mcp
Or install globally:
npm install -g @ronamosa/protonmail-pro-mcp
protonmail-pro-mcp
git clone https://github.com/ronamosa/protonmail-pro-mcp.git
cd protonmail-pro-mcp
npm install
npm link
Verify the install:
which protonmail-pro-mcp
Prerequisites -- Node.js >= 18 and Proton Bridge running locally.
cp .env.example .env # then fill in your credentials
Security --
PROTONMAIL_PASSWORDis the bridge-generated password, not your ProtonMail login. Never commit.envfiles.
To test this repo's built output instead of the published npm package:
npm run build
cp .cursor/mcp.json.example .cursor/mcp.json # add your Bridge credentials
Restart Cursor MCP (Settings → MCP → reload). The local server runs node dist/index.js from this workspace.
Sends a self-addressed email with two attachments named dupe.txt, then verifies ambiguous lookup and index-based retrieval:
cp .env.example .env # if you have not already
npm run build
npm run test:attachments:manual
The script leaves the test email in INBOX so you can also exercise get_email_by_id and get_attachment from Cursor.
Add to ~/.claude.json under mcpServers, or run claude mcp add:
{
"mcpServers": {
"protonmail": {
"type": "stdio",
"command": "npx",
"args": ["@ronamosa/protonmail-pro-mcp"],
"env": {
"PROTONMAIL_USERNAME": "[email protected]",
"PROTONMAIL_PASSWORD": "your-bridge-password"
}
}
}
}
Add to ~/.config/claude/claude_desktop_config.json:
{
"mcpServers": {
"protonmail": {
"command": "npx",
"args": ["@ronamosa/protonmail-pro-mcp"],
"env": {
"PROTONMAIL_USERNAME": "[email protected]",
"PROTONMAIL_PASSWORD": "your-bridge-password"
}
}
}
}
Add to .cursor/mcp.json in your project:
{
"mcpServers": {
"protonmail": {
"command": "npx",
"args": ["@ronamosa/protonmail-pro-mcp"],
"env": {
"PROTONMAIL_USERNAME": "[email protected]",
"PROTONMAIL_PASSWORD": "your-bridge-password"
}
}
}
}
protonmail-pro-mcp --transport http --port 3000
Endpoints: POST /mcp, GET /mcp, DELETE /mcp (Streamable HTTP). Health check at GET /health.
Replies thread when the message carries In-Reply-To and References (RFC 5322 §3.6.4).
Subject-line matching alone is not threading — Gmail happens to group on it, most clients do not.
create_reply_draft is the tool to reach for: give it the parent's emailId and a body, and it
derives the recipients, the Re: subject and both headers itself. Assembling the chain by hand is
easy to get wrong, and a wrong chain threads one level deep and then breaks.
create_reply_draft({ emailId: "INBOX:4821", body: "Sounds good." })
create_draft, update_draft and send_email also accept inReplyTo and references directly
for cases the helper does not cover.
Every outgoing message now carries a generated Message-ID, so replies to your own sent mail
thread as well. send_draft forwards the draft's threading headers to SMTP — without that a
correctly threaded draft would send un-threaded.
A parent with no Message-ID cannot be threaded to. create_reply_draft returns
threaded: false in that case rather than pretending otherwise.
src/
index.ts Entry point, transport selection, graceful shutdown
server.ts McpServer setup, tool registration
config.ts Zod-validated environment configuration
logger.ts Structured stderr logger with credential redaction
types.ts Shared TypeScript interfaces
services/
smtp.ts nodemailer wrapper (lazy connection)
imap.ts imapflow + mailparser wrapper (lazy connection, auto-reconnect)
tools/
sending.ts send_email, send_test_email
reading.ts get_emails, get_email_by_id, search_emails
drafts.ts create_draft, create_reply_draft, update_draft, delete_draft, send_draft
actions.ts mark_email_read, star_email, move_email, delete_email
folders.ts get_folders, sync_folders
system.ts get_connection_status
readOnlyHint, destructiveHint, openWorldHint) per MCP specdelete_email moves to Trash first; permanent delete only from Trashnpm run dev # Watch mode with tsx
npm run typecheck # Type checking without emit
npm run lint # ESLint
npm run format # Prettier
npm test # Run tests
npm run build # Rebuild (symlink picks up changes automatically)
Originally scaffolded from anyrxo/protonmail-pro-mcp. Completely rewritten with modern MCP SDK, Zod validation, dual transport, and full tool implementations.
MIT
ProtonMail MCP server — email management via Proton Bridge using the Model Context Protocol
工具
暂无工具列表。远程服务器在首次健康检查后会获得工具列表。
常见问题
在本页复制适用于 Cursor、Claude Desktop、Claude Code 或 VS Code 的 stdio 配置。它使用发布者的安装方式,而不是 PlugMCP 代理。
此记录未列出必需的环境变量。
Protonmail Pro 通过 stdio 在本地运行。
上次检查时间:2026-10-28。 ProtonMail MCP server — email management via Proton Bridge using the Model Context Protocol