ProtonMail MCP Server
This server enables AI agents to comprehensively manage ProtonMail emails via SMTP/IMAP, covering sending, reading, searching, organizing, and drafting.
Sending
Send emails: Compose and send emails with CC, BCC, HTML body, priority levels (high/normal/low), reply-to, and base64-encoded file attachments
Send test email: Quickly verify SMTP connectivity with a simple test message
Reading
Get emails: Fetch emails from any folder with pagination (limit/offset)
Get email by ID: Retrieve a specific email's full body and headers (text, HTML, or raw format)
Search emails: Advanced filtering by sender, recipient, subject, date range, read/starred status, attachment presence, and full-text query
Get attachments: Download a specific attachment from an email by filename
Drafts
Create, update, delete, and send drafts stored in the Drafts folder via SMTP
Organizing Emails
Mark as read/unread, star/unstar, move between folders, and delete (soft-delete to Trash; permanent delete only if already in Trash)
Folders
List folders: View all folders with message counts
Sync folders: Force-refresh the folder list from the IMAP server
System
Check connection status: Monitor the health of both SMTP and IMAP connections
Email management through ProtonMail and Proton Bridge, including sending, reading, searching, and organizing emails.
Click on "Install 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 MCP Servershow me my unread emails"
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 Server
Email management for AI agents through ProtonMail and Proton Bridge
Send, read, search, and organize emails from Claude Code, Claude Desktop, Cursor, or any MCP-compatible client.
Quick start
Install from npm (recommended)
npx @ronamosa/protonmail-pro-mcpOr install globally:
npm install -g @ronamosa/protonmail-pro-mcp
protonmail-pro-mcpInstall from source
git clone https://github.com/ronamosa/protonmail-pro-mcp.git
cd protonmail-pro-mcp
npm install
npm linkVerify the install:
which protonmail-pro-mcpPrerequisites -- Node.js >= 18 and Proton Bridge running locally.
Related MCP server: Outlook Assistant
Configuration
cp .env.example .env # then fill in your credentialsVariable | Required | Default | Description |
| Yes | -- | Your ProtonMail email address |
| Yes | -- | Proton Bridge password (not your login password) |
|
| SMTP server host | |
|
| SMTP server port | |
|
| IMAP host (Proton Bridge) | |
|
| IMAP port (Proton Bridge) | |
|
| Enable TLS for IMAP | |
|
| HTTP transport port | |
|
| Enable debug logging |
Security --
PROTONMAIL_PASSWORDis the bridge-generated password, not your ProtonMail login. Never commit.envfiles.
Usage
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": "you@protonmail.com",
"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": "you@protonmail.com",
"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": "you@protonmail.com",
"PROTONMAIL_PASSWORD": "your-bridge-password"
}
}
}
}protonmail-pro-mcp --transport http --port 3000Endpoints: POST /mcp, GET /mcp, DELETE /mcp (Streamable HTTP). Health check at GET /health.
Tools
Tool | Description | |
Send |
| Send with to/cc/bcc, HTML, priority, reply-to, attachments |
| Quick test email to verify SMTP | |
Read |
| Fetch from a folder with pagination |
| Full email with body and headers | |
| Filter by from, to, subject, date, flags, attachments | |
Drafts |
| Create a new draft in the Drafts folder |
| Replace an existing draft with new content | |
| Delete a draft | |
| Send a draft via SMTP and remove it from Drafts | |
Act |
| Mark read or unread |
| Star or unstar | |
| Move between folders | |
| Soft-delete to Trash; permanent only if already in Trash | |
Folders |
| List all folders with message counts |
| Force-refresh folder list | |
System |
| SMTP and IMAP connection health |
Architecture
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, 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_statusMcpServer API (SDK v1.29+) with Zod input validation on every tool
Tool annotations (
readOnlyHint,destructiveHint,openWorldHint) per MCP specDual transport -- stdio for local use, Streamable HTTP for remote deployment
Lazy connections -- SMTP and IMAP connect on first use, not at startup
Credential redaction -- passwords scrubbed from all log output
Soft delete --
delete_emailmoves to Trash first; permanent delete only from Trash
Development
npm 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)Credits
Originally scaffolded from anyrxo/protonmail-pro-mcp. Completely rewritten with modern MCP SDK, Zod validation, dual transport, and full tool implementations.
License
MIT
Maintenance
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
Latest Blog Posts
MCP directory API
We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/ronamosa/protonmail-pro-mcp'
If you have feedback or need assistance with the MCP directory API, please join our Discord server