Skip to main content
Glama
de-Blanck

protonmail-mcp-server

by de-Blanck

protonmail-mcp-server

A Model Context Protocol (MCP) server for Proton Mail — read-only email access through Proton Bridge.

License: MIT Node.js

Connect Claude (or any MCP client) to your Proton Mail so it can search, list, and read your email — without your email ever leaving your machine.

Features

  • List folders with message and unread counts

  • List emails with pagination, sorted newest first

  • Search emails by sender, recipient, subject, body text, date range, read/flagged status

  • Read full email content by IMAP UID, including attachment metadata

  • Markdown and JSON response formats

  • Input validation via Zod schemas

  • Connection timeouts to prevent resource exhaustion

Related MCP server: ProtonBound

Prerequisites

  • Node.js 18+

  • Proton Bridge running on your machine with IMAP enabled

  • Your Bridge-specific IMAP credentials (not your Proton account password)

Finding your Bridge credentials

  1. Open Proton Bridge

  2. Click your account name

  3. Go to IMAP/SMTP settings (or Mailbox details)

  4. Note the Username (your email) and Password (Bridge-generated)

  5. Note the IMAP port (default: 1143)

Installation

npm install
npm run build

Or install globally from npm:

npm install -g protonmail-mcp-server

Configuration

Set these environment variables:

Variable

Required

Default

Description

PROTON_BRIDGE_USER

Yes

Bridge IMAP username (your email)

PROTON_BRIDGE_PASSWORD

Yes

Bridge-generated IMAP password

PROTON_BRIDGE_HOST

No

127.0.0.1

Bridge host

PROTON_BRIDGE_PORT

No

1143

Bridge IMAP port

Security: Configuration files containing your Bridge password are plaintext. Never commit them to version control or share them.

Adding to Claude Code

Add to your Claude Code MCP config (~/.claude/config.json or project-level):

{
  "mcpServers": {
    "protonmail": {
      "command": "node",
      "args": ["/path/to/protonmail-mcp-server/dist/index.js"],
      "env": {
        "PROTON_BRIDGE_USER": "your-email@proton.me",
        "PROTON_BRIDGE_PASSWORD": "your-bridge-password"
      }
    }
  }
}

Adding to Claude Desktop

Add to claude_desktop_config.json:

{
  "mcpServers": {
    "protonmail": {
      "command": "node",
      "args": ["/path/to/protonmail-mcp-server/dist/index.js"],
      "env": {
        "PROTON_BRIDGE_USER": "your-email@proton.me",
        "PROTON_BRIDGE_PASSWORD": "your-bridge-password"
      }
    }
  }
}

Available tools

proton_list_folders

List all mailbox folders with message and unread counts.

proton_list_emails

List emails in a folder (newest first) with pagination.

proton_get_email

Read a single email's full content by IMAP UID.

proton_search_emails

Search emails by sender, recipient, subject, body text, date range, read/flagged status.

Privacy & Security

  • Read-only — all four tools are read-only; no email modification, deletion, or sending

  • Localhost-only by default — connects to Proton Bridge on 127.0.0.1; TLS certificate validation is enforced for non-localhost connections

  • No disk caching — opens a fresh IMAP connection per request, no email data is stored on disk

  • No credential logging — your Bridge password is never logged, printed, or exposed in error messages

  • Input validation — all inputs are validated with Zod schemas; folder names are sanitized against control characters

  • Connection timeouts — all IMAP connections have configurable timeouts to prevent resource exhaustion

LLM Integration

This server implements the Model Context Protocol (MCP), making it compatible with any MCP client. When connected to an AI assistant like Claude, the assistant can:

  • Check for new or unread emails

  • Search for specific emails by sender, subject, or date

  • Read and summarize email content

  • Answer questions about your email (e.g., "What did Alice say about the quarterly report?")

  • List your mailbox folders and their message counts

All operations are read-only — the assistant cannot send, delete, or modify your emails.

Development

npm run dev    # Watch mode with auto-reload
npm run build  # Production build
npm start      # Run built server

License

MIT

Available Tools

4 tools
proton_get_emailGet Proton Mail EmailA
Read-onlyIdempotent

Retrieve a single email's full content by its IMAP UID, including body text and attachment metadata.

Use proton_list_emails or proton_search_emails first to find the UID of the email you want to read.

Args:

  • folder (string): The folder containing the email (default: 'INBOX')

  • uid (number): The IMAP UID of the email

  • response_format ('markdown' | 'json'): Output format (default: 'markdown')

Returns: Full email with headers, body text, and attachment list. Does NOT return attachment binary data.

Examples:

  • "Read email 1234" -> proton_get_email({ folder: "INBOX", uid: 1234 })

  • "Show me that email from Alice" -> first search, then get by UID

ParametersJSON Schema
NameRequiredDescriptionDefault
folderNoMailbox folder containing the emailINBOX
uidYesThe IMAP UID of the email to retrieve
response_formatNoOutput format: 'markdown' or 'json'markdown

TDQS

A4.7/5.0
Behavior4/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

While annotations already provide readOnlyHint and idempotentHint, the description adds that it returns full email content but NOT attachment binary data, which is valuable behavioral context beyond annotations.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Description is well-structured with sections for purpose, prerequisites, args, returns, and examples. Every sentence adds value, no redundancy.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness5/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Despite no output schema, the description fully explains what the tool returns, what it does not (attachment binaries), and how to use it with examples. Completely addresses the tool's context.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema coverage is 100%, so baseline is 3. However, the description adds meaningful context with parameter descriptions and examples, clarifying that uid comes from search/list and showing usage patterns.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states 'Retrieve a single email's full content by its IMAP UID', specifying a specific verb and resource. It also distinguishes from sibling tools by naming them as prior steps.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines5/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

Explicitly instructs to use proton_list_emails or proton_search_emails first to get the UID, providing clear context for when and how to use this tool.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

proton_list_emailsList Proton Mail EmailsA
Read-onlyIdempotent

List emails in a folder, sorted newest first, with pagination support.

Returns email summaries (subject, from, date, snippet) — not full bodies. Use proton_get_email to read an individual email's full content.

Args:

  • folder (string): Mailbox folder path (default: 'INBOX')

  • limit (number): Maximum emails to return, 1–100 (default: 20)

  • offset (number): Skip this many emails for pagination (default: 0)

  • response_format ('markdown' | 'json'): Output format (default: 'markdown')

Returns: Paginated list of email summaries with total count and pagination metadata.

Examples:

  • "Show my latest emails" -> proton_list_emails({ folder: "INBOX" })

  • "What's in my Sent folder?" -> proton_list_emails({ folder: "Sent" })

  • "Show me the next page" -> proton_list_emails({ folder: "INBOX", offset: 20 })

ParametersJSON Schema
NameRequiredDescriptionDefault
folderNoMailbox folder path (e.g., 'INBOX', 'Sent', 'Folders/Partnerships')INBOX
limitNoMaximum emails to return (1–100, default 20)
offsetNoNumber of results to skip for pagination
response_formatNoOutput format: 'markdown' for human-readable or 'json' for structured datamarkdown

TDQS

A4.7/5.0
Behavior4/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

Annotations already indicate readonly and idempotent. Description adds sorting order and pagination behavior, but does not elaborate further on rate limits or other constraints.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Concise, front-loaded with purpose. Structured with Args/Returns/Examples. Every sentence is informative, no padding.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness5/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Without output schema, the description explains return structure (email summaries, pagination metadata). Covers all aspects needed for a list tool with 4 optional parameters.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema coverage is 100%, baseline 3. Description adds context via examples and clarifies default values, but does not significantly extend parameter understanding beyond the schema.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the tool lists emails in a folder, sorted newest first with pagination support. It differentiates from siblings by noting that full bodies require proton_get_email.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines5/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

Explicitly states when to use this tool (for summaries) and when to use a sibling (proton_get_email for full bodies). Provides examples to illustrate usage.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

proton_list_foldersList Proton Mail FoldersA
Read-onlyIdempotent

List all mailbox folders in the Proton Mail account with message counts and unread counts.

Use this tool to discover available folders before listing or searching emails.

Args:

  • response_format ('markdown' | 'json'): Output format (default: 'markdown')

Returns: A list of folders with path, message count, and unread count.

Examples:

  • "What folders do I have?" -> proton_list_folders()

  • "How many unread emails do I have?" -> proton_list_folders()

ParametersJSON Schema
NameRequiredDescriptionDefault
response_formatNoOutput format: 'markdown' or 'json'markdown

TDQS

A4.1/5.0
Behavior4/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

Annotations already declare readOnlyHint=true, destructiveHint=false, idempotentHint=true. The description adds behavioral details about returned data (message/unread counts) and the response format parameter, enhancing transparency.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is concise and well-structured with a clear purpose sentence, Args, Returns, and Examples. It is front-loaded with the key action. Minor room for trimming.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a simple read-only list tool, the description covers purpose, usage guidance, parameter, and return format. No output schema exists, but the description sufficiently explains what to expect.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema coverage is 100%. The description mentions the parameter in Args but adds minimal meaning beyond the schema's description. Baseline 3 is appropriate.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description uses specific verbs ('List') and resources ('mailbox folders'), and includes what it returns (message counts, unread counts). It clearly distinguishes from sibling tools which deal with emails, not folders.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines4/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

Explicitly states to use this tool to discover folders before listing/searching emails, providing clear context for usage. Does not explicitly mention when not to use it, but the sibling tools imply separation.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

proton_search_emailsSearch Proton Mail EmailsA
Read-onlyIdempotent

Search emails in a folder using IMAP search criteria. Supports filtering by sender, recipient, subject, body text, date range, and read/flagged status.

Returns email summaries — use proton_get_email to read the full content of a specific result.

Args:

  • folder (string): Folder to search in (default: 'INBOX')

  • from (string, optional): Filter by sender email or name

  • to (string, optional): Filter by recipient email or name

  • subject (string, optional): Filter by subject text

  • body (string, optional): Search within email body

  • since (string, optional): Emails after this date (ISO 8601, e.g., '2025-01-01')

  • before (string, optional): Emails before this date (ISO 8601)

  • unseen (boolean, optional): Only unread emails

  • flagged (boolean, optional): Only starred/flagged emails

  • limit (number): Max results, 1–100 (default: 20)

  • offset (number): Pagination offset (default: 0)

  • response_format ('markdown' | 'json'): Output format (default: 'markdown')

Returns: Paginated list of matching email summaries.

Examples:

  • "Find emails from Alice" -> proton_search_emails({ from: "Alice" })

  • "Unread emails about quarterly report" -> proton_search_emails({ subject: "quarterly report", unseen: true })

  • "Emails from acme.com in March" -> proton_search_emails({ from: "acme.com", since: "2025-03-01", before: "2025-04-01" })

ParametersJSON Schema
NameRequiredDescriptionDefault
folderNoMailbox folder to search in (e.g., 'INBOX', 'Sent')INBOX
fromNoFilter by sender email or name (partial match)
toNoFilter by recipient email or name (partial match)
subjectNoFilter by subject line (partial match)
bodyNoSearch within email body text
sinceNoOnly emails after this date (ISO 8601, e.g., '2025-01-01')
beforeNoOnly emails before this date (ISO 8601, e.g., '2025-04-01')
unseenNoIf true, only return unread emails
flaggedNoIf true, only return flagged/starred emails
limitNoMaximum emails to return (1–100, default 20)
offsetNoNumber of results to skip for pagination
response_formatNoOutput format: 'markdown' for human-readable or 'json' for structured datamarkdown

TDQS

A4.6/5.0
Behavior4/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

Annotations already declare readOnlyHint=true and idempotentHint=true. The description adds behavioral context: returns summaries, supports pagination (limit, offset), and default folder is INBOX. No contradictions.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Well-structured with intro, parameter list, and examples. Slightly long due to full parameter listing, but clear and front-loaded with purpose.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness5/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given 12 parameters and no output schema, description explains all inputs, return type (paginated summaries), and usage examples. Sufficient for an AI agent.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema coverage is 100%, so baseline is 3. The description adds value by explaining defaults, date format (ISO 8601), and response_format enum meanings, going beyond schema.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states it searches emails in a folder using IMAP search criteria, listing specific filters. It distinguishes itself from siblings like proton_get_email by noting that full content retrieval requires a separate tool.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines5/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

Explicitly mentions when to use this tool (for searching/filtering) and when to use a sibling (proton_get_email for full content). Provides examples for common queries.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Tool Schema Changelog

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

  1. 4 tool updatesv1.0.0
    • First observedproton_get_email
    • First observedproton_list_emails
    • First observedproton_list_folders
    • First observedproton_search_emails

TDQS

A4.3/5.0

Scored across 4 tools

Disambiguation5/5

Each tool has a clear, distinct purpose: listing folders, listing emails, searching emails, and retrieving full email content. No overlap, even between list and search due to search's advanced filtering.

Naming Consistency5/5

All tools follow a consistent 'proton_verb_noun' snake_case pattern (list_folders, list_emails, search_emails, get_email). No deviation in style or convention.

Tool Count4/5

With 4 tools, the set is small but appropriate for a read-only email interface. It covers essential reading operations without unnecessary bloat, though some users might expect a few more common actions.

Completeness3/5

The tools cover the core read workflow (list folders, list/search emails, read full email) well, but completely lack write operations like send, delete, move, or mark as read. This is a notable gap for full email management.

Maintenance

ActivityInactive
ResponsivenessNo issues

Resources

Unclaimed servers have limited discoverability.

Looking for Admin?

If you are the server author, to access and configure the admin panel.

Related MCP Connectors

Related MCP Servers

  • F
    license
    Not graded
    quality
    B
    maintenance
    A 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.
    -
  • F
    license
    Not graded
    quality
    B
    maintenance
    A security-first MCP server that provides AI agents with a scoped, read-and-draft-only view into Proton Mail via Proton Bridge, ensuring no emails can be sent and access is restricted to configured workspaces.
    -
  • A
    license
    A
    quality
    B
    maintenance
    An 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.
    6
    193
    MIT
  • A
    license
    Not graded
    quality
    B
    maintenance
    An MCP server that reads, searches, organizes, and deletes Proton Mail through the local Proton Mail Bridge, with read-only mode and sender authentication checks. It cannot send mail.
    71
    MIT