Protonmail MCP server

Enables sending emails through Protonmail's SMTP service with support for multiple recipients, CC/BCC functionality, and both plain text and HTML content.
Back to servers
Setup instructions
Provider
Amotivv
Release date
Mar 13, 2025
Language
TypeScript
Stats
16 stars

This MCP server provides email sending functionality through Protonmail's SMTP service, allowing Claude Desktop and Cline VSCode extension to send emails on your behalf using your Protonmail credentials.

Features

  • Send emails to one or multiple recipients
  • Support for CC and BCC recipients
  • Support for both plain text and HTML email content
  • Comprehensive error handling and logging

Installation

To install the Protonmail MCP server:

  1. Clone the repository to your local machine:

    git clone https://github.com/your-username/protonmail-mcp.git
    cd protonmail-mcp
    
  2. Install dependencies and build the project:

    npm install
    npm run build
    

Using Cline to Install from GitHub

Alternatively, Cline can automatically handle installation:

  1. Provide Cline with the GitHub repository URL
  2. Let Cline clone and build the server
  3. Provide your SMTP credentials when prompted

Configuration

The server requires environment variables to be set in the MCP settings files:

Claude Desktop Configuration

Located at: /Users/your-username/Library/Application Support/Claude/claude_desktop_config.json

Cline VSCode Extension Configuration

Located at: /Users/your-username/Library/Application Support/Code/User/globalStorage/saoudrizwan.claude-dev/settings/cline_mcp_settings.json

Both configuration files need these variables:

  • PROTONMAIL_USERNAME: Your Protonmail email address
  • PROTONMAIL_PASSWORD: Your Protonmail SMTP password (not your regular login password)
  • PROTONMAIL_HOST: SMTP server hostname (default: smtp.protonmail.ch)
  • PROTONMAIL_PORT: SMTP server port (default: 587 for STARTTLS, 465 for SSL/TLS)
  • PROTONMAIL_SECURE: Whether to use a secure connection (default: "false" for port 587, "true" for port 465)
  • DEBUG: Enable debug logging (set to "true" to see detailed logs, "false" to hide them)

Usage

Once configured, you can send emails using the following tool:

send_email

Parameters:

  • to: Recipient email address(es). Multiple addresses can be separated by commas.
  • subject: Email subject line
  • body: Email body content (can be plain text or HTML)
  • isHtml: (Optional) Whether the body contains HTML content (default: false)
  • cc: (Optional) CC recipient(s), separated by commas
  • bcc: (Optional) BCC recipient(s), separated by commas

Example:

<use_mcp_tool>
<server_name>protonmail-mcp</server_name>
<tool_name>send_email</tool_name>
<arguments>
{
  "to": "[email protected]",
  "subject": "Test Email from Cline",
  "body": "This is a test email sent via the Protonmail MCP server.",
  "cc": "[email protected]"
}
</arguments>
</use_mcp_tool>

Troubleshooting

If you encounter issues:

  1. Ensure your Protonmail SMTP credentials are correct in both configuration files
  2. Verify that the SMTP port is not blocked by your firewall
  3. Check if your Protonmail account has any sending restrictions
  4. Look for error messages in the logs:
    • Claude Desktop app logs
    • Cline VSCode extension output panel
  5. Restart the Claude Desktop app or reload the VSCode window after configuration changes

How to install this MCP server

For Claude Code

To add this MCP server to Claude Code, run this command in your terminal:

claude mcp add-json "protonmail-mcp" '{"command":"npx","args":["-y","protonmail-mcp"]}'

See the official Claude Code MCP documentation for more details.

For Cursor

There are two ways to add an MCP server to Cursor. The most common way is to add the server globally in the ~/.cursor/mcp.json file so that it is available in all of your projects.

If you only need the server in a single project, you can add it to the project instead by creating or adding it to the .cursor/mcp.json file.

Adding an MCP server to Cursor globally

To add a global MCP server go to Cursor Settings > Tools & Integrations and click "New MCP Server".

When you click that button the ~/.cursor/mcp.json file will be opened and you can add your server like this:

{
    "mcpServers": {
        "protonmail-mcp": {
            "command": "npx",
            "args": [
                "-y",
                "protonmail-mcp"
            ]
        }
    }
}

Adding an MCP server to a project

To add an MCP server to a project you can create a new .cursor/mcp.json file or add it to the existing one. This will look exactly the same as the global MCP server example above.

How to use the MCP server

Once the server is installed, you might need to head back to Settings > MCP and click the refresh button.

The Cursor agent will then be able to see the available tools the added MCP server has available and will call them when it needs to.

You can also explicitly ask the agent to use the tool by mentioning the tool name and describing what the function does.

For Claude Desktop

To add this MCP server to Claude Desktop:

1. Find your configuration file:

  • macOS: ~/Library/Application Support/Claude/claude_desktop_config.json
  • Windows: %APPDATA%\Claude\claude_desktop_config.json
  • Linux: ~/.config/Claude/claude_desktop_config.json

2. Add this to your configuration file:

{
    "mcpServers": {
        "protonmail-mcp": {
            "command": "npx",
            "args": [
                "-y",
                "protonmail-mcp"
            ]
        }
    }
}

3. Restart Claude Desktop for the changes to take effect

Want to 10x your AI skills?

Get a free account and learn to code + market your apps using AI (with or without vibes!).

Nah, maybe later