Skip to main content
Glama
Proton Mail Bridge MCP

Proton Mail Bridge MCP

  ____  ____   ___ _____ ___  _   _   __  __    _    ___ _
 |  _ \|  _ \ / _ \_   _/ _ \| \ | | |  \/  |  / \  |_ _| |
 | |_) | |_) | | | || || | | |  \| | | |\/| | / _ \  | || |
 |  __/|  _ <| |_| || || |_| | |\  | | |  | |/ ___ \ | || |___
 |_|   |_| \_\\___/ |_| \___/|_| \_| |_|  |_/_/   \_\___|_____|
  Bridge Client  ·  CLI + Claude Desktop MCP for Proton Mail

Proton Mail Bridge 客户端

proton-mail-bridge-client MCP 服务器

一个功能齐全的 Proton Mail CLI 和 Claude Desktop MCP,构建于 Proton Bridge 之上。

关于

Proton Mail Bridge 客户端为您提供了两种以编程方式使用 Proton Mail 的方法:

CLI — 一个与 MCP 界面完全对等的终端客户端。从命令行即可读取、搜索、发送、草拟、归档、管理文件夹、分类邮件线程并运行诊断。邮件正文可通过 stdin 管道传输。输出格式支持人类可读或 --json。

MCP 服务器 — 将相同的功能作为模型上下文协议 (MCP) 服务器公开,以便 Claude Desktop 可以在任何聊天中读取和管理您的 Proton Mail,前提是 Proton Bridge 正在同一台机器上运行。

这两个界面共享相同的后端:Proton Bridge IMAP 和 SMTP、本地 SQLite 索引以及审计日志。除了您自己的 Proton 账户外,没有托管中继、没有远程 URL,也不依赖云服务。

Related MCP server: ProtonMail MCP Server

先决条件

  • Node.js 18+

  • 已安装并登录 Proton Bridge

  • 从 Bridge 获取:IMAP 主机/端口、SMTP 主机/端口、用户名、Bridge 密码

默认本地 Bridge 地址:IMAP 127.0.0.1:1143,SMTP 127.0.0.1:1025

安装

git clone https://github.com/googlarz/proton-mail-bridge-client.git
cd proton-mail-bridge-client
npm install
npm run build

安装后,proton-mail-bridge-client(以及 proton-mail-bridge)二进制文件将可从仓库中获取。

进行系统级安装:npm install -g .

CLI

proton-mail-bridge-client <command> [options]

所有命令均支持 --json 以获取机器可读的输出。

读取

proton-mail-bridge-client emails --folder INBOX --limit 25
proton-mail-bridge-client read INBOX::25642
proton-mail-bridge-client search "invoice" --limit 10
proton-mail-bridge-client search --live --from openai.com
proton-mail-bridge-client attachments INBOX::25642

分类

proton-mail-bridge-client digest
proton-mail-bridge-client threads "quarterly review"
proton-mail-bridge-client actionable
proton-mail-bridge-client followups
proton-mail-bridge-client thread-brief <threadId>
proton-mail-bridge-client document-threads --category invoice
proton-mail-bridge-client meeting-context alice@example.com

撰写与发送

proton-mail-bridge-client send --to bob@example.com --subject "Hey" --body "Hello"
echo "Hello" | proton-mail-bridge-client send --to bob@example.com --subject "Hey"
proton-mail-bridge-client reply INBOX::25642 --body "On it."
proton-mail-bridge-client reply INBOX::25642 --reply-all --body "On it."
proton-mail-bridge-client forward INBOX::25642 --to carol@example.com

邮箱操作

proton-mail-bridge-client move INBOX::25642 Folders/Archive
proton-mail-bridge-client archive INBOX::25642
proton-mail-bridge-client trash INBOX::25642
proton-mail-bridge-client restore Trash::25642
proton-mail-bridge-client mark-read INBOX::25642
proton-mail-bridge-client mark-read INBOX::25642 --unread
proton-mail-bridge-client star INBOX::25642
proton-mail-bridge-client delete INBOX::25642
proton-mail-bridge-client batch archive INBOX::100,INBOX::101,INBOX::102
proton-mail-bridge-client thread-action <threadId> archive

文件夹

proton-mail-bridge-client folders
proton-mail-bridge-client create-folder Folders/Receipts
proton-mail-bridge-client rename-folder Folders/Receipts Folders/Bills
proton-mail-bridge-client delete-folder Folders/Bills

草稿

proton-mail-bridge-client drafts
proton-mail-bridge-client draft-create --to bob@example.com --subject "Draft" --body "..."
proton-mail-bridge-client draft-read <id>
proton-mail-bridge-client draft-update <id> --subject "Updated subject"
proton-mail-bridge-client draft-reply INBOX::25642 --body "Will do."
proton-mail-bridge-client draft-forward INBOX::25642 --to carol@example.com
proton-mail-bridge-client draft-sync <id>
proton-mail-bridge-client draft-send <id>
proton-mail-bridge-client draft-delete <id>
proton-mail-bridge-client remote-drafts

分析与诊断

proton-mail-bridge-client stats
proton-mail-bridge-client analytics
proton-mail-bridge-client contacts
proton-mail-bridge-client volume-trends --days 14
proton-mail-bridge-client watch --timeout 30
proton-mail-bridge-client test-email you@example.com
proton-mail-bridge-client doctor
proton-mail-bridge-client status
proton-mail-bridge-client sync --folder INBOX --limit 150

MCP 工具透传

任何 MCP 工具也可以直接从 CLI 调用:

proton-mail-bridge-client tools
proton-mail-bridge-client tool get_connection_status --json
proton-mail-bridge-client tool search_indexed_emails --args '{"query":"invoice","limit":3}'

环境

CLI 和 MCP 服务器读取相同的环境变量:

export PROTONMAIL_USERNAME='you@proton.me'
export PROTONMAIL_PASSWORD='your-bridge-password'
export PROTONMAIL_IMAP_HOST='127.0.0.1'
export PROTONMAIL_IMAP_PORT='1143'
export PROTONMAIL_IMAP_SECURE='false'
export PROTONMAIL_SMTP_HOST='127.0.0.1'
export PROTONMAIL_SMTP_PORT='1025'
export PROTONMAIL_DATA_DIR="$HOME/.proton-mail-bridge-client"

通过文件或命令获取可选密钥(避免在 shell 中出现原始凭据):

export PROTONMAIL_USERNAME_FILE='/path/to/user.txt'
export PROTONMAIL_PASSWORD_FILE='/path/to/pass.txt'
# or
export PROTONMAIL_USERNAME_COMMAND='pass proton/username'
export PROTONMAIL_PASSWORD_COMMAND='pass proton/password'

完整的运行时标志:

export PROTONMAIL_READ_ONLY='false'
export PROTONMAIL_ALLOW_SEND='true'
export PROTONMAIL_ALLOW_REMOTE_DRAFT_SYNC='true'
export PROTONMAIL_ALLOWED_ACTIONS='mark_read,mark_unread,star,unstar,archive,trash,restore'
export PROTONMAIL_AUTO_SYNC='true'
export PROTONMAIL_STARTUP_SYNC='true'
export PROTONMAIL_SYNC_INTERVAL_MINUTES='5'
export PROTONMAIL_IDLE_WATCH='true'
export PROTONMAIL_IDLE_MAX_SECONDS='30'

Claude Desktop 设置

要将 Proton Mail Bridge 客户端与 Claude Desktop 一起使用,请运行引导向导:

npm run setup:claude-desktop

这将:

  • 检查您的本地 Bridge 端口

  • 询问您的 Bridge 用户名和密码

  • 构建项目

  • 安装稳定的机器级运行时

  • 写入 Claude Desktop MCP 配置条目

设置完成后:重启 Claude Desktop,保持 Proton Bridge 开启,然后检查 + → Connectors → proton-mail-bridge。

运行时安装在:

  • macOS: ~/Library/Application Support/Proton Mail Bridge Client

  • Linux: ~/.local/share/proton-mail-bridge-client

  • Windows: %APPDATA%\Proton Mail Bridge Client

更新

git pull
npm run update:claude-desktop

手动配置 Claude Desktop

{
  "mcpServers": {
    "proton-mail-bridge": {
      "command": "node",
      "args": ["/path/to/runtime/dist/index.js"],
      "cwd": "/path/to/runtime",
      "env": {
        "PROTONMAIL_USERNAME": "you@proton.me",
        "PROTONMAIL_PASSWORD": "your-bridge-password",
        "PROTONMAIL_IMAP_HOST": "127.0.0.1",
        "PROTONMAIL_IMAP_PORT": "1143",
        "PROTONMAIL_IMAP_SECURE": "false",
        "PROTONMAIL_SMTP_HOST": "127.0.0.1",
        "PROTONMAIL_SMTP_PORT": "1025"
      }
    }
  }
}

macOS 注意事项

在 macOS 上,better-sqlite3 必须是为当前机器构建的原生二进制文件。安装程序会自动处理此问题。如果您从其他环境恢复或看到原生模块崩溃,请运行 npm run update:claude-desktop。

信任与安全

  • 完全在本地运行 — 无托管中继,无远程 URL。

  • 仅通过您自己机器上的 Proton Bridge 与 Proton Mail 通信。

  • PROTONMAIL_READ_ONLY=true 禁用所有写入操作。

  • PROTONMAIL_ALLOW_SEND=false 禁用 SMTP 发送,而不影响其他写入操作。

  • PROTONMAIL_ALLOWED_ACTIONS 控制允许哪些邮箱变更操作。

  • batch_email_action 和 apply_thread_action 均支持 dryRun: true。

  • 支持 *_FILE 和 *_COMMAND 密钥,因此原始凭据永远不会出现在配置或 shell 历史记录中。

  • 系统文件夹(收件箱、已发送、垃圾箱、垃圾邮件、归档、所有邮件)受到保护,防止意外删除。

与 Claude 原生 Gmail 连接器的对比

功能

Gmail 连接器

Proton Mail Bridge 客户端

设置

第一方 OAuth

需要 Proton Bridge + 此客户端

搜索和读取

原生 Claude UX

IMAP + 本地索引

发送邮件

否

是

草稿工作流

更好的第一方 UX

完全控制,包括远程草稿同步

附件内容

有限

获取并保存

邮箱操作

有限

完全(星标、移动、归档、垃圾箱、恢复、删除、批量)

文件夹管理

否

是(创建、重命名、删除)

CLI 访问

否

与 MCP 完全对等

原始消息链接

更好

仅限 MCP 资源链接

原生线程/标签

Gmail 原生

从 IMAP 重构

工具界面

发送

send_email · send_test_email · reply_to_email · forward_email

草稿

create_draft · create_reply_draft · create_forward_draft · create_thread_reply_draft · list_drafts · list_remote_drafts · get_draft · update_draft · sync_draft_to_remote · send_draft · delete_draft

读取

get_emails · get_email_by_id · search_emails · list_attachments · get_attachment_content · save_attachments · save_attachment

分类

get_folders · sync_folders · get_labels · get_threads · get_thread_by_id · get_thread_brief · get_actionable_threads · get_inbox_digest · get_follow_up_candidates · find_document_threads · prepare_meeting_context

操作

mark_email_read · star_email · move_email · archive_email · trash_email · restore_email · delete_email · batch_email_action · apply_thread_action

文件夹管理

create_folder · rename_folder · delete_folder

分析

get_email_stats · get_email_analytics · get_contacts · get_volume_trends

诊断

get_connection_status · get_runtime_status · run_doctor · get_audit_logs · run_background_sync · wait_for_mailbox_changes · sync_emails · get_index_status · search_indexed_emails · clear_cache · clear_index · get_logs

操作说明

  • get_emails 和 search_emails 返回一个复合的 emailId — 请将其用于读取和操作。

  • 本地索引位于 PROTONMAIL_DATA_DIR/mail-index.sqlite。

  • 审计日志位于 PROTONMAIL_DATA_DIR/audit.log。

  • 后台同步和 IMAP IDLE 保持索引更新,但取决于 Bridge 是否保持运行。

  • search_indexed_emails 支持 from:、to:、subject:、label:、domain: 快捷方式。

  • 草稿同步是尽力而为的 — 即使远程同步失败,本地草稿也会始终保留。

许可证

MIT

Available Tools

96 tools
apply_thread_actionA
Destructive

Apply a reversible mailbox action to every message in a normalized thread at once. Use when you want to act on a full thread identified by threadId (e.g. archive or mark-read an entire conversation). Supports dryRun, unreadOnly to scope impact, and syncBefore to refresh the index first. Prefer batch_email_action when you have explicit emailIds rather than a threadId.

Inputs: action (required), threadId (required), dryRun, syncBefore, +4 more.

archive_emailA

Move a single email to the standard Archive folder. Use for messages that are resolved but worth keeping long-term. Prefer trash_email when the message is no longer needed. Prefer move_email to route to a custom folder. Prefer batch_email_action for archiving multiple emails at once.

Inputs: emailId (required).

batch_email_actionA
Destructive

Apply one action to a known list of email IDs in a single IMAP pass. Prefer bulk_delete when selecting messages by search criteria (from/subject/date) rather than by ID. Prefer apply_thread_action when acting on a thread by threadId. Prefer empty_folder to clear an entire folder. Use when you already have the IDs and want to archive, trash, move, mark-read/unread, star/unstar, restore, or permanently delete them. Actions: mark_read, mark_unread, star, unstar, archive, trash, restore, move (requires targetFolder), delete (permanent expunge). Supports dryRun.

Inputs: action (required), emailIds (required), dryRun, maxBatchSize, +2 more.

bulk_deleteA
Destructive

Delete multiple emails by explicit ID list or by search criteria (from/subject/date/flags). Prefer empty_folder to clear an entire folder. Prefer delete_email for a single message. Prefer batch_email_action when the same set of IDs needs a mix of actions, not just deletion. Use when you have specific IDs to delete or want to filter by sender, subject, or date range. Accepts emailIds[] OR match criteria (XOR). permanent:true permanently expunges; false moves to Trash. Use dryRun to preview.

Inputs: match, dryRun, folder, emailIds, +3 more.

bulk_moveA

Move multiple emails to a target folder in one IMAP pass. Accepts either explicit emailIds[] or a match criteria object (XOR). Supports dryRun to preview. For single-message moves use move_email.

Inputs: targetFolder (required), match, dryRun, folder, +2 more.

bulk_update_flagsA

Add or remove IMAP flags on multiple messages simultaneously. Prefer update_message_flags for a single message when you need per-flag server verification. Use when the same flag change (e.g. \Seen, \Flagged) should apply to several messages. Accepts emailIds[] OR match+folder (XOR). Returns notApplied[] per message for flags the server silently dropped. \Seen/\Flagged/\Deleted are gated the same as mark_email_read/star_email/bulk_delete: each requires the matching action in PROTONMAIL_ALLOWED_ACTIONS, and setting \Deleted also requires confirmed:true when PROTONMAIL_CONFIRM_DESTRUCTIVE is enabled.

Inputs: match, dryRun, folder, emailIds, +4 more.

bulk_update_labelsA

Add or remove Proton labels on multiple messages simultaneously. Use when the same label change should apply to several messages. Labels are IMAP folders under Labels/ namespace. Accepts emailIds[] OR match+folder (XOR).

Inputs: match, dryRun, folder, emailIds, +3 more.

cancel_sendA

Cancel a send_email call that was queued because PROTONMAIL_SEND_DELAY_SECONDS is set. Only works while the item is still pending — once it has actually sent, this returns canceled: false. No effect (throws) if PROTONMAIL_SEND_DELAY_SECONDS is 0, since nothing is ever queued in that case.

Inputs: id (required).

cancel_snoozeA

Wake a snoozed email immediately, moving it back to its original folder before wakeAt. No effect (throws) if the snooze has already woken or was already canceled.

Inputs: id (required).

clear_cacheA

Evict all in-memory caches: folder list, message metadata, and analytics data. Use when cached data appears stale after external mailbox changes (e.g. folders modified via Proton webmail). Does NOT affect the persistent SQLite index — use clear_index for that.

Inputs: no named parameters.

clear_indexA
Destructive

Delete the entire persistent SQLite mailbox index from disk. Use only to reset a corrupted or schema-incompatible index. After clearing, call sync_emails to rebuild. Irreversible — all indexed metadata and search history is lost. Does NOT clear in-memory caches — use clear_cache for that.

Inputs: no named parameters.

count_messagesA
Read-only

Count messages matching live IMAP search criteria without fetching message data. Use to preview how many results a search would return before running it. Prefer folder_stats for a simple unread/total count on one folder without filters.

Inputs: to, from, label, query, +11 more.

create_draftA

Save a new outbound message as a local draft in SQLite, optionally syncing it to the Proton Drafts IMAP folder. Use to compose and review before sending. Prefer create_reply_draft when replying to a specific emailId, or create_forward_draft when forwarding. Returns a draftId for later update, sync, or send via send_draft.

Inputs: body (required), subject (required), cc, to, +8 more.

create_folderA

Create a new mailbox folder via IMAP. Use 'Folders/' prefix for user folders and 'Labels/' for labels in Proton Bridge (e.g. 'Folders/Receipts'). Do NOT attempt to create system folders such as INBOX, Sent, Trash, Archive, or Spam. Returns the created path on success.

Inputs: path (required).

create_forward_draftA

Create a forward draft for an existing email, pre-filling the original message as quoted body and preserving its attachments. Use when you have an emailId and want to stage a forward for review before sending. Prefer forward_email to send immediately without saving. Returns a draftId for later update or send via send_draft.

Inputs: to (required), emailId (required), cc, bcc, +7 more.

create_labelA

Create a Proton label (IMAP folder under Labels/ namespace). Idempotent — safe to call if the label may already exist. For folder creation use create_folder with a Folders/ prefix.

Inputs: name (required).

create_reply_draftA

Create a reply draft for a specific email, pre-filling To, Subject, and quoted body from the original message. Use when you have an emailId and want to stage the reply for review before sending. Prefer create_thread_reply_draft when you only have a threadId. Prefer reply_to_email to send immediately. Returns a draftId.

Inputs: body (required), emailId (required), cc, bcc, +6 more.

create_templateA

Save a reusable email template. Subject and body may contain {{variable}} placeholders (e.g. {{firstName}}), auto-detected and stored on the template. Fails if a template with the same name already exists — delete it first to replace it.

Inputs: body (required), name (required), subject (required), isHtml.

create_thread_reply_draftA

Create a reply draft from a threadId, automatically selecting the latest inbound message to reply to. Use when you have a threadId from get_threads or get_actionable_threads and want to stage a reply for review. Prefer create_reply_draft when you already have a specific emailId. Returns a draftId for later update or send.

Inputs: body (required), threadId (required), cc, bcc, +8 more.

delete_draftA
Destructive

Permanently delete a locally saved draft from SQLite. Use to discard a draft you no longer need. Does NOT remove a matching draft from the Proton Drafts IMAP folder — that requires a separate mailbox action. Irreversible; requires confirmed:true when PROTONMAIL_CONFIRM_DESTRUCTIVE is enabled.

Inputs: draftId (required), confirmed.

delete_emailA
Destructive

Permanently delete a single email via IMAP expunge. Use only when certain the message is no longer needed. Prefer trash_email if recovery may be required. Prefer bulk_delete to delete multiple emails at once. Prefer delete_thread to delete all messages in a conversation. Irreversible.

Inputs: emailId (required), confirmed.

delete_folderA
Destructive

Delete an empty mailbox folder via IMAP. The folder must contain no messages — move or trash all messages first. Do NOT delete system folders (INBOX, Sent, Trash, Archive, Spam). Irreversible; messages already removed cannot be recovered this way.

Inputs: path (required), confirmed.

delete_labelA
Destructive

Delete a Proton label (IMAP folder under Labels/ namespace). Deletes the label itself, not the messages — they remain in their other folders/labels. Irreversible. For deleting a folder use delete_folder with a Folders/ prefix.

Inputs: name (required), confirmed.

delete_templateA
Destructive

Delete a saved email template. Irreversible; requires confirmed:true when PROTONMAIL_CONFIRM_DESTRUCTIVE is enabled.

Inputs: id (required), confirmed.

delete_threadA
Destructive

Delete all messages in a thread, identified by RFC 5322 Message-ID header. permanent:true permanently expunges; false moves to Trash. Use when you have the raw Message-ID. Prefer apply_thread_action with action 'trash' or 'delete' when you have a local threadId from get_threads or get_actionable_threads.

Inputs: messageId (required), dryRun, confirmed, permanent, +1 more.

empty_folderA
Destructive

Permanently delete ALL messages in a folder at once. Prefer bulk_delete when removing a subset of messages rather than everything in the folder. Use only when the goal is to clear an entire folder (e.g. emptying Trash or Spam). Only available when PROTONMAIL_ALLOW_EMPTY_FOLDER=true. Irreversible.

Inputs: folder (required), confirmed.

export_emailA

Save a message's full raw source (RFC822/.eml) to disk. Use for backup or migrating a message elsewhere. Requires PROTONMAIL_ALLOW_FILE_DOWNLOAD_DIR to be configured, same as save_attachment.

Inputs: emailId (required), outputPath.

find_document_threadsA
Read-only

Find email threads likely containing important document attachments such as invoices, contracts, travel confirmations, or calendar invites. Use to locate attachment-heavy threads by category without knowing the exact sender or subject. Prefer search_indexed_emails with hasAttachment:true for custom attachment queries beyond the built-in categories.

Inputs: limit, query, category, syncBefore.

flag_threadA

Add or remove IMAP flags across all messages in a thread, identified by RFC 5322 Message-ID header. Use when you have the raw Message-ID and want to flag an entire conversation at once. Prefer apply_thread_action with action 'mark_read', 'mark_unread', 'star', or 'unstar' when you have a local threadId from get_threads. \Seen/\Flagged/\Deleted are gated the same as mark_email_read/star_email/delete_email: each requires the matching action in PROTONMAIL_ALLOWED_ACTIONS, and setting \Deleted also requires confirmed:true when PROTONMAIL_CONFIRM_DESTRUCTIVE is enabled.

Inputs: messageId (required), dryRun, confirmed, flagsToAdd, +2 more.

folder_statsA

Return live message count, unseen count, uidNext, and uidValidity for a single mailbox folder. Use to check unread counts or folder health without fetching messages. Prefer count_messages when you need to apply filters (sender, subject, date). Prefer get_email_stats for an aggregate summary across all folders.

Inputs: folder.

forward_emailA
Destructive

Immediately forward an existing email to new recipients, preserving original attachments and prepending an optional note. Use when you have an emailId and want to re-route the message without review. Prefer create_forward_draft to stage a forward for review first. Requires PROTONMAIL_ALLOW_SEND.

Inputs: to (required), emailId (required), cc, bcc, +13 more.

get_actionable_threadsA
Read-only

Return mailbox threads ranked by reply urgency, filtered to those requiring action. Use for daily triage to surface what needs a response from you. Supports pendingOn filter to distinguish threads waiting on you vs. them. Prefer get_inbox_digest for a broader summary including stale items. Prefer get_threads for an unranked thread list.

Inputs: label, limit, query, offset, +3 more.

get_attachment_contentA
Read-only

Fetch metadata for a specific email attachment and optionally return its base64-encoded content inline. Use when you need to read or process attachment data in-memory. Set includeBase64:false (default) to retrieve metadata only without loading the full payload. Prefer save_attachment to write the file to disk instead.

Inputs: emailId (required), attachmentId (required), saveTo, includeBase64.

get_attachment_textA
Read-only

Extract plain text from a text-like attachment (text/plain, text/csv, text/markdown, application/json, application/xml, text/html stripped of markup, text/calendar summarized) without dealing with base64 encoding. Not gated by the smaller inline-base64 size limit that get_attachment_content uses — bounded separately at 512KB of raw content. Fails clearly for non-text formats (e.g. PDF, images) — use get_attachment_content or save_attachment for those.

Inputs: emailId (required), attachmentId (required).

get_audit_logsA
Read-only

Return recent entries from the persistent on-disk audit log of all write operations performed by this server. Use to review what mutations (sends, moves, deletes, draft operations) were executed across sessions. Prefer get_logs for debugging in-session behavior and transient connection errors.

Inputs: limit, offset.

get_connection_statusA
Read-only

Check whether Proton Bridge SMTP and IMAP are reachable and return authentication status for each. Use to diagnose connectivity before sending or syncing, or when tools return connection errors. Returns individual pass/fail for each protocol, plus this server's own version and entrypoint path — check these first if behavior doesn't match the latest release notes; an old/orphaned install elsewhere on disk can silently shadow an upgrade. Prefer run_doctor for a full end-to-end health check including index integrity.

Inputs: no named parameters.

get_contactsA
Read-only

Return the most frequently contacted email addresses ranked by interaction volume within the analytics sample window. Use to identify key correspondents or to pre-populate recipient lists. Reads from the local index (auto-refreshed if stale or empty) — reflects the last sync. Note: results are frequency-derived from recent email history, not a Proton contacts address book.

Inputs: limit.

get_draftA
Read-only

Fetch the full content of a single locally saved draft by its draftId. Use to read or verify a draft before sending or updating. Prefer list_drafts to discover draftIds first. Does NOT fetch drafts from the Proton server — use list_remote_drafts for those. Attachments are metadata only (filename/contentType/size, no base64 content) by default — set includeAttachmentContent:true if you actually need the raw bytes back (e.g. to re-attach them elsewhere); a large attachment's base64 content can be hundreds of thousands of tokens.

Inputs: draftId (required), includeAttachmentContent.

get_email_analyticsA
Read-only

Generate sampled mailbox analytics including top senders, busiest hours of day, and volume breakdown by folder. Use for productivity insights and communication pattern analysis. Prefer get_email_stats for a fast aggregate count summary. Prefer get_volume_trends for per-day message volume history. Reads from the local index (auto-refreshed if stale or empty), not live IMAP — reflects the last sync.

Inputs: days, limit.

get_email_by_idA
Read-only

Fetch the full content of a single email using a composite emailId. Use after get_emails or search_emails to read a specific message in full. The emailId format is FOLDER::UID — always use the id returned by a prior tool call; do not construct it manually. Response includes a security block (dkim/spf/dmarc pass-fail, Proton's spam score/action, and encryption metadata) for phishing/legitimacy triage.

Inputs: emailId (required), preferHtml, showHeaders, maxBodyLength.

get_emailsA
Read-only

Fetch emails from a mailbox folder via live IMAP, defaults to newest first; set sortByUid to asc for oldest first. Use to browse or paginate recent messages in a specific folder. Prefer search_emails to filter by sender, subject, or date. Prefer search_indexed_emails for fast repeated queries when the local SQLite index is populated and Bridge availability is uncertain. Each email's attachments are metadata only (id/filename/contentType/size/disposition) — use list_attachments or get_email_by_id for full attachment detail.

Inputs: limit, fields, folder, offset, +3 more.

get_emails_by_idsA
Read-only

Fetch full content for multiple emails by composite id in one call (max 25). Use to read a batch of specific messages from a prior get_emails/search_emails/search_indexed_emails result without one get_email_by_id round trip per message. One failed id does not fail the whole batch — check each result's ok field. Prefer get_email_by_id for a single message.

Inputs: emailIds (required), preferHtml, maxBodyLength.

get_email_statsA
Read-only

Return aggregate mailbox statistics: folder message counts, total unread counts, and a brief analytics sample. Use for a quick mailbox health overview. Prefer get_email_analytics for richer breakdowns such as top senders and hourly patterns. Prefer get_volume_trends for time-series daily volume data. Reads from the local index (auto-refreshed if stale or empty), not live IMAP — reflects the last sync, so read/unread counts can lag a change made from another client. Unread counts specifically can also lag a flag change (e.g. \Seen set shortly after send) until that message's folder is next fully synced.

Inputs: days, limit.

get_foldersA
Read-only

Return all mailbox folders with message counts and unseen counts from the live IMAP session. Use to discover available folder names before targeting get_emails, move_email, or create_folder. Prefer sync_folders to force a fresh fetch when the folder list appears stale. Folders with noselect:true cannot be used for IMAP operations.

Inputs: no named parameters.

get_follow_up_candidatesA
Read-only

Return threads that appear overdue for follow-up based on age and pending-on state. Use when looking for outbound messages you sent that haven't received a reply, or to surface stale inbound threads. Prefer get_actionable_threads for threads where someone is currently waiting on you.

Inputs: limit, offset, pendingOn, syncBefore, +1 more.

get_inbox_digestA
Read-only

Return a structured inbox summary: unread counts, top actionable threads, and overdue threads where a reply is pending from you. Use as the starting point for an inbox review session to get an at-a-glance picture. Prefer get_actionable_threads for a deeper, filterable list of threads needing action.

Inputs: limit, offset, syncBefore, minAgeHours.

get_index_statusA
Read-only

Return metadata about the local SQLite email index: row count, last sync timestamp, index schema version, and per-folder coverage. Use to verify the index is fresh and complete before querying it with search_indexed_emails or get_threads. If the index is empty or stale, call sync_emails first.

Inputs: no named parameters.

get_labelsA
Read-only

Return normalized Proton folders and labels from the local mailbox index, including message counts per label. Use to enumerate available labels before filtering with search_indexed_emails or get_threads. Prefer get_folders for live IMAP folder counts when the index may be stale.

Inputs: limit.

get_logsA
Read-only

Return recent in-memory server log entries, filterable by level (debug, info, warn, error). Use to diagnose unexpected tool behavior or connection errors during the current session. Logs are ephemeral and not persisted across server restarts — use get_audit_logs for a persistent audit trail of write operations.

Inputs: level, limit, offset.

get_runtime_statusA
Read-only

Return the server's current runtime state: policy flags (read-only, allow-send, allowed actions), background sync schedule and last-run time, IMAP IDLE watch state, draft store statistics, and local index freshness. Use to understand how the server is configured and whether sync is actively running. Prefer get_connection_status for protocol reachability only.

Inputs: no named parameters.

get_templateA
Read-only

Get a single saved email template by id.

Inputs: id (required).

get_thread_briefA
Read-only

Return a summarized view of a single thread: latest inbound message preview, latest outbound preview, attachment list, and a recommended next action. Use for a quick status check on a specific thread without reading every message. Prefer get_thread_by_id when you need the full raw thread data and all messages.

Inputs: threadId (required).

get_thread_by_idA
Read-only

Fetch the complete normalized thread record from the local index, including all messages, participants, labels, and full metadata. Use when you need all messages in a thread. Prefer get_thread_brief for a summarized quick view that avoids returning the full message list.

Inputs: threadId (required), folders.

get_threadsA
Read-only

Return normalized email threads from the local mailbox index, grouping individual messages into conversations by subject and participants. Use to view mail as threads rather than individual messages. Note: searches subject and participants only — use search_indexed_emails to search body content. Prefer get_actionable_threads when you want threads prioritized by reply urgency. Prefer get_inbox_digest for an executive-summary view.

Inputs: label, limit, query, offset.

get_unsubscribe_infoA
Read-only

Read the List-Unsubscribe header of a message and report how to unsubscribe from it — a mailto address, an https link, or both. Does not take any action. Use before unsubscribe_sender to see what's available, or to hand an https link to the user/agent to open manually (this server never auto-fetches unsubscribe URLs).

Inputs: emailId (required).

import_emailA

Import a raw RFC822 message (.eml content) into a folder via IMAP APPEND. Use to restore a backed-up message or migrate mail from another provider's export. Does not send anything — this only inserts a message directly into the mailbox. Many real .eml exports use a legacy 8-bit charset (ISO-8859-1, Windows-1252, etc.) rather than UTF-8 for their header/body text outside of MIME-encoded parts — passing that content through raw corrupts or rejects it. Use rawBase64 instead for any message not already known to be valid UTF-8.

Inputs: raw, rawBase64, markAsRead, targetFolder.

list_accountsA
Read-only

List every configured Proton address (the primary Bridge login plus any additional addresses from PROTONMAIL_ACCOUNTS_JSON), each with its own IMAP/SMTP connection status and local index freshness. Use to see which accounts this server is managing, and each account's slug — prefix an emailId/draftId with <slug>:: to target that account explicitly in any other tool (a plain, unprefixed id always means the primary account). Set checkConnections:true to verify each account's IMAP/SMTP reachability live (slower).

Inputs: checkConnections.

list_attachmentsA
Read-only

List all attachments on a specific email with stable attachmentIds, filenames, content types, and sizes. Use before calling get_attachment_content or save_attachment to discover what attachments are available and get their IDs. Prefer save_attachments when you want to download all attachments at once.

Inputs: emailId (required), contentType, includeInline, filenameContains.

list_draftsA
Read-only

List all locally saved drafts with their status, subject, and timestamps. Does NOT list drafts stored only on the Proton server — use list_remote_drafts for those. Prefer get_draft when you already have a draftId and need the full content. Attachment content is omitted here (filename/type/size only) — use get_draft for the full attachment content of one draft. Each draft's body is also truncated to a short preview (bodyTruncated:true, bodyLength gives the real size) — use get_draft for the full body of one draft. Use to review in-progress or unsent messages.

Inputs: limit, offset, includeSent.

list_remote_draftsA
Read-only

List draft messages currently stored in the Proton Drafts IMAP folder on the server. Use to see drafts created via Proton webmail or mobile app that have not been synced locally. Prefer list_drafts to see drafts managed by this server. Requires an active IMAP connection.

Inputs: limit, offset.

list_scheduled_sendsA
Read-only

List items in the local undo-send / scheduled-send queue (from send_email with PROTONMAIL_SEND_DELAY_SECONDS set, or schedule_draft), newest first, 50 per page (returns total/hasMore; page with offset, raise limit for more), including id, status, and sendAt — use this to rediscover the id needed for cancel_send if it was lost with the conversation. Message bodies are shortened and HTML/attachments omitted.

Inputs: limit, offset, status.

list_snoozedA
Read-only

List every snoozed email, including its id, status, and wakeAt — use this to rediscover the id needed for cancel_snooze if it was lost with the conversation.

Inputs: status.

list_templatesA
Read-only

List all saved email templates.

Inputs: no named parameters.

mark_email_readA

Mark a single email as read or unread by setting the IMAP Seen flag. Use for individual triage or to reset read state. Prefer batch_email_action with action 'mark_read' or 'mark_unread' when updating multiple emails at once.

Inputs: emailId (required), isRead.

move_emailA

Move a single email to any specified mailbox folder. Use when routing a message to a custom folder. Prefer archive_email to move to the standard Archive folder, or trash_email to move to Trash. Use get_folders first to confirm the target folder path.

Inputs: emailId (required), targetFolder (required).

move_threadA

Move all messages in a thread to a destination folder, identified by its RFC 5322 Message-ID header. Use when you have the raw Message-ID (e.g. from email headers) and want to move the full conversation. Prefer apply_thread_action with action 'move' when you have a local threadId from get_threads or get_actionable_threads.

Inputs: messageId (required), destination (required), dryRun, acrossFolders.

prepare_meeting_contextA
Read-only

Fetch recent threads and communication history for a person or company domain to prepare for a meeting or call. Use before a scheduled meeting to surface relevant recent correspondence. Provide at least one of person (name or email fragment) or domain. Returns matched threads sorted by recency.

Inputs: limit, domain, person, syncBefore.

rename_folderA

Rename or move a mailbox folder to a new IMAP path. Existing messages are preserved in place. Do NOT rename system folders (INBOX, Sent, Trash, Archive, Spam). Refreshes the local folder cache after the operation.

Inputs: path (required), newPath (required).

rename_labelA

Rename a Proton label (IMAP folder under Labels/ namespace). Messages keep the label, just under the new name. For renaming a folder use rename_folder with a Folders/ prefix.

Inputs: name (required), newName (required).

render_templateA
Read-only

Render a saved template's subject and body, substituting {{variable}} placeholders with the given values. Placeholders left unfilled stay literal (e.g. {{firstName}}) and are listed in missingVariables — check that field is empty before passing the rendered subject/body to send_email, or the recipient will see literal {{placeholder}} text in the message.

Inputs: id (required), variables.

reply_all_emailA
Destructive

Immediately reply to all original recipients (sender + all To/CC addresses) of an existing email. Identical to reply_to_email with replyAll enabled. Use when the conversation involves multiple parties and all should receive the reply. Threading headers (In-Reply-To, References) are preserved. Requires PROTONMAIL_ALLOW_SEND.

Inputs: emailId (required), cc, bcc, body, +11 more.

reply_to_emailA
Destructive

Immediately send a reply to an existing email, threading it correctly via In-Reply-To and References headers. Use when you have an emailId and want to send the reply right away. Prefer create_reply_draft to save the reply for review first, or create_thread_reply_draft when replying from a threadId. Use reply_all_email to reply to all original recipients. Requires PROTONMAIL_ALLOW_SEND.

Inputs: body (required), emailId (required), cc, bcc, +12 more.

restore_emailA

Move an email from Trash back to INBOX or to a specified folder. Use to undo a trash_email operation. Does not work on permanently deleted messages — only messages currently in Trash can be restored.

Inputs: emailId (required), targetFolder.

run_background_syncA

Immediately trigger the configured background mailbox sync cycle outside its normal schedule and return its updated status. Use to force a sync when the index may be stale. Does nothing useful if PROTONMAIL_AUTO_SYNC is disabled. Prefer sync_emails for an on-demand, configurable sync with folder and depth options.

Inputs: no named parameters.

run_doctorA
Read-only

Run a comprehensive production health check covering SMTP auth, IMAP auth, optional IMAP IDLE probe, SQLite index integrity, sync-failed drafts, runtime policy validation, and what this server can/cannot do (capabilities). Also reports this server's own version and entrypoint path — worth checking first when behavior doesn't match the changelog, since an old/orphaned install elsewhere on disk can silently shadow an upgrade and every other field here would still report healthy. Connection failures include a classified diagnosis (authentication_failed vs bridge_unreachable) with a specific fix. Use to fully diagnose or validate the setup. Prefer get_connection_status for a quick protocol-only reachability check.

Inputs: includeImap, includeSmtp, includeIdleProbe, idleTimeoutSeconds.

save_attachmentA

Save a single email attachment to disk by its attachmentId and return the written file path. Use when you have a specific attachmentId from list_attachments and want to write that file. Prefer save_attachments to save all or filtered attachments from an email without needing individual attachment IDs.

Inputs: emailId (required), attachmentId (required), saveTo, outputPath.

save_attachmentsA

Save all qualifying attachments from an email to a directory on disk, with optional filename substring or content-type filters. Use to batch-download attachments from a single email. Returns the list of written file paths. Prefer save_attachment when you need to save one specific attachment by its attachmentId.

Inputs: emailId (required), outputPath, contentType, includeInline, +1 more.

schedule_draftA
Destructive

Queue a saved draft to send at a future time instead of immediately. IMPORTANT: this only fires while this MCP server process stays running (it's a stdio server that exits when its client disconnects) — if the app is closed before sendAt, the send fires on next server startup instead of the originally requested time, not at sendAt itself. This is best-effort tied to the app being open, not a reliable scheduler. The draft's content is snapshotted at schedule time; the draft record itself is NOT automatically marked sent or deleted once it fires — check list_drafts or get_email_stats afterward, or clean it up yourself. Cancelable via cancel_send until it fires.

Inputs: sendAt (required), draftId (required), confirmed.

search_emailsA
Read-only

Search emails via live IMAP filters, across ALL configured accounts by default (accounts are queried one at a time; pass account = address or slug to search only one; non-primary ids are prefixed '::'), with optional local post-processing for attachments and labels. Use when you need real-time results or must find messages received after the last sync. Prefer search_indexed_emails when the local index is current — it is significantly faster and works even when Bridge IMAP is unavailable. Each email's attachments are metadata only (id/filename/contentType/size/disposition) — use list_attachments or get_email_by_id for full attachment detail. Without folder it searches every real folder but not the All Mail / Labels/* / Starred views (they only duplicate mail already in a real folder and made an all-folders search ~3x slower); pass folder (e.g. 'Labels/x' or 'All Mail') or label/mailboxRole to search those. Values with non-ASCII letters (accents, ł, ä, ß...) are matched ignoring accents and case: Proton Bridge's own IMAP search cannot match them, so they are narrowed server-side and verified locally over the newest 500 candidates (hasMore:true if the candidates were cut). count_messages does not do this and still counts only ASCII matches.

Inputs: cc, to, bcc, from, +21 more.

search_indexed_emailsA
Read-only

Search the local SQLite mailbox index (of ALL configured accounts by default; pass account = address or slug to search only one; non-primary ids are prefixed '::') without making any IMAP connection. Supports free-text and field shortcuts inline: from:alice@example.com, to:bob, subject:invoice, label:Archive, domain:acme.com. Use for fast, offline-capable searches when the index is populated. Prefer search_emails when you need live IMAP results or when the index is stale or empty. Prefer this over search_emails when the index is current. Use search_emails if messages were received after the last sync. Each email's attachments are metadata only (id/filename/contentType/size/disposition) — use list_attachments or get_email_by_id for full attachment detail.

Inputs: to, from, label, limit, +14 more.

send_draftA
Destructive

Send a previously saved local draft through Proton Bridge SMTP. Use as the final step in a draft-review-send workflow after create_draft and optional update_draft. Marks the draft as sent in the local store but does not delete it. Refuses if this draft has a still-pending scheduled send (from schedule_draft) — cancel that with cancel_send first, otherwise sending now would deliver the draft twice. Requires PROTONMAIL_ALLOW_SEND.

Inputs: draftId (required), dryRun, confirmed.

send_emailA
Destructive

Compose and send a new outbound email through Proton Bridge SMTP. Use for one-shot messages that need no review. Prefer create_draft when you want to save and review before sending, or reply_to_email when responding to an existing message. Fails if PROTONMAIL_ALLOW_SEND is false or if Bridge SMTP is unreachable. If PROTONMAIL_SEND_DELAY_SECONDS is set, this queues the send instead of sending immediately and returns a cancelable id — call cancel_send within the window to abort. Otherwise returns delivery confirmation immediately.

Inputs: to (required), subject (required), cc, bcc, +14 more.

send_test_emailA
Destructive

Send a minimal diagnostic email to confirm Proton Bridge SMTP credentials and connectivity. Use before relying on send_email in a new environment. Prefer get_connection_status for a connectivity check that does not actually send mail. Returns transport debug info and delivery status. Requires PROTONMAIL_ALLOW_SEND, and confirmed:true when PROTONMAIL_CONFIRM_DESTRUCTIVE is enabled; subject to PROTONMAIL_RESTRICT_OUTBOUND_TO_SELF like every other send path.

Inputs: to (required), from, confirmed, customMessage.

snooze_emailA

Move an email out of sight into Folders/MCP-Snoozed and bring it back to its original folder at wakeAt. IMPORTANT: like scheduled sends, wake only fires while this MCP server process stays running — if the app is closed before wakeAt, the email wakes on next server startup instead of at the requested time, not reliably at wakeAt itself. Cancelable via cancel_snooze, which wakes it immediately.

Inputs: wakeAt (required), emailId (required).

star_emailA

Star or unstar a single email using the IMAP Flagged flag. Use to bookmark an important message for later follow-up. Prefer batch_email_action with action 'star' or 'unstar' when flagging multiple emails at once.

Inputs: emailId (required), isStarred.

sync_draft_to_remoteA

Force-push a locally saved draft to the Proton Drafts IMAP folder and return the remote UID. Use when a draft was created with syncToRemote:false or when the automatic sync failed. Do NOT use this if PROTONMAIL_ALLOW_REMOTE_DRAFT_SYNC is false — the call will be rejected.

Inputs: draftId (required).

sync_emailsA

Incrementally sync email metadata from IMAP into the local SQLite index, using stored checkpoints to avoid re-fetching already-indexed messages. Use before calling search_indexed_emails or get_threads when the index may be stale. The default incremental sync only ever adds/updates recent messages — it never notices a message that was archived, trashed, or moved out of the synced folder by any client, so search/thread/digest tools can keep showing a message as still present indefinitely. Set full:true (per folder — sync each folder you want cleaned up) to also detect and prune those, in addition to fetching a larger sample. Prefer run_background_sync to trigger the scheduled sync cycle (also incremental-only by default; see PROTONMAIL_AUTO_SYNC_FULL).

Inputs: full, folder, limitPerFolder, timeBudgetSeconds, +1 more.

sync_foldersA
Read-only

Refresh the in-memory folder list from the IMAP server and return the updated list. Use when folders have been created, renamed, or deleted externally (e.g. via Proton webmail) and get_folders is returning stale data. Prefer get_folders for a read-only view that does not force a refresh.

Inputs: no named parameters.

top_sendersA
Read-only

Return a frequency table of the top senders in a folder over a date range. Keyed on the sender address, not the display name, so display-name spoofing does not conflate different senders. Use for inbox analytics, unsubscribe triage, and contact discovery.

Inputs: limit, since, before, folder, +2 more.

trash_emailA

Move a single email to the Trash folder. Messages in Trash can be recovered with restore_email. Use instead of delete_email when you may want to recover the message later. Prefer batch_email_action with action 'trash' for multiple emails at once.

Inputs: emailId (required).

unsubscribe_senderA
Destructive

Execute the mailto: variant of a message's List-Unsubscribe header by sending a minimal unsubscribe email through Proton Bridge SMTP. Only works when the header includes a mailto address — if it only has an https link, this throws and returns that link for you to open manually instead (this server never auto-fetches unsubscribe URLs, to avoid firing an unreviewed request from mail content). Call get_unsubscribe_info first to see what's available.

Inputs: emailId (required), confirmed.

update_draftA

Update an existing locally saved draft's recipients, subject, body, or other fields. Use to edit a draft before sending. Only provided fields are updated — omitted fields retain their current values. After updating, call send_draft to send or sync_draft_to_remote to push to Proton Drafts. The response's attachments are metadata only (filename/contentType/size, no base64 content) even if the draft has attachments from a previous call — use get_draft if you need the actual attachment bytes back.

Inputs: draftId (required), cc, to, bcc, +10 more.

update_message_flagsA

Add or remove arbitrary IMAP flags on a single message, then verify the server applied them. Prefer bulk_update_flags to update flags across multiple messages at once. Returns notApplied[] listing flags the server silently dropped. Use for custom IMAP flags (e.g. \Answered) or when mark_email_read / star_email don't cover the flag you need. \Seen/\Flagged/\Deleted are gated the same as mark_email_read/star_email/delete_email: each requires the matching action in PROTONMAIL_ALLOWED_ACTIONS, and setting \Deleted also requires confirmed:true when PROTONMAIL_CONFIRM_DESTRUCTIVE is enabled.

Inputs: emailId (required), confirmed, flagsToAdd, flagsToRemove.

update_message_labelsA

Add or remove Proton labels on a single message without moving it. Prefer bulk_update_labels to apply label changes across multiple messages. Labels live under the Labels/ namespace (e.g. 'Labels/Work'). Use for one message at a time. Create missing labels first with create_folder using a 'Labels/' prefix.

Inputs: emailId (required), labelsToAdd, labelsToRemove.

wait_for_mailbox_changesA
Read-only

Open an IMAP IDLE session and block until a mailbox change event arrives or the timeout expires. Use to detect real-time inbox activity without polling. Returns whether a change was observed. Always returns within timeoutSeconds plus a few seconds' grace, even if the underlying IDLE session gets stuck — do not use in fire-and-forget pipelines. A change that arrives may not always wake the call early; it is still detected and reported correctly, just not necessarily before the timeout.

Inputs: folder, timeoutSeconds.

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections.

Loading tool schema changelog…

    TDQS

    A3.9/5.0

    Scored across 96 tools

    Disambiguation3/5

    With 96 tools, many share similar purposes (e.g., multiple search, thread, delete, and send variants). The detailed descriptions cross-reference alternatives and help, but the sheer number of overlapping options creates a high risk of misselection.

    Naming Consistency4/5

    All names use consistent snake_case and mostly follow a verb_noun pattern (e.g., get_emails, create_draft, send_email). A few noun-first outliers like folder_stats and top_senders slightly break the pattern.

    Tool Count1/5

    96 tools is far beyond the typical 3-15 range for a well-scoped server. While the domain is complex, the count is excessive and many tools could be consolidated (e.g., single/bulk/thread variants).

    Completeness5/5

    The surface covers an exhaustive range of email lifecycle operations: sending, drafts, templates, labels, folders, search, sync, attachments, analytics, and diagnostics. Few gaps exist beyond niche features like contact management.

    Maintenance

    ActivityActive
    ResponsivenessUsually handled

    Related MCP Connectors

    Related MCP Servers

    • A
      license
      Not graded
      quality
      D
      maintenance
      Enables comprehensive ProtonMail management through SMTP and IMAP, supporting email sending/reading, folder operations, analytics, and contact tracking with advanced search and automation capabilities.
      43
      MIT
    • A
      license
      A
      quality
      B
      maintenance
      Enables AI agents to send, read, search, and organize emails via ProtonMail using Proton Bridge. Supports MCP-compatible clients like Claude and Cursor.
      18
      17 npm
      4
      MIT
    • F
      license
      Not graded
      quality
      C
      maintenance
      Enables AI assistants to interact with a Proton Mail mailbox through Proton Bridge, supporting listing, searching, reading, sending, and organizing emails.
      -
    • A
      license
      B
      quality
      C
      maintenance
      Enables AI assistants to manage a Proton Mail inbox through Proton Mail Bridge, including reading and searching emails, organizing folders, sending messages, managing drafts and attachments, bulk actions, templates, rules, calendar extraction, and offline sync.
      36
      3
      MIT