1. Conduid
  2. Developer Tools
  3. Mailpit MCP
MCP server · Developer Tools

Mailpit MCP

An MCP server for Mailpit, enabling AI assistants to interact with email testing workflows.

Unclaimed MIT last commit 8 months ago devtools
56Fair

Scored 5 months ago · breakdown

About Mailpit MCP

Mailpit MCP is an MCP server published by amirhmoradi in the Developer Tools category: an MCP server for Mailpit, enabling AI assistants to interact with email testing workflows.

The repository has 4 stars and 3 forks, with the last commit 8 months ago. Six months or more without a commit doesn't mean the server is broken, but check the open issues before depending on it in production.

Install

From source
git clone https://github.com/amirhmoradi/mailpit-mcp

This server has no ConduID identity, so agent calls to it are not receipted. Pin the version you install and review the source before granting it credentials.

Tools (24)

check_htmlCheck HTML email client compatibility

Parameters not published.

check_linksValidate links in an email

Parameters not published.

check_spamGet SpamAssassin analysis

Parameters not published.

delete_messagesDelete messages by ID

Parameters not published.

delete_searchDelete messages matching a search

Parameters not published.

delete_tagDelete a tag

Parameters not published.

get_attachmentDownload an attachment

Parameters not published.

get_chaosGet chaos testing config

Parameters not published.

get_infoGet server information

Parameters not published.

get_messageGet full message details

Parameters not published.

Show all 24 tools
get_message_headersGet message headers

Parameters not published.

get_message_htmlGet rendered HTML content

Parameters not published.

get_message_sourceGet raw RFC 2822 source

Parameters not published.

get_message_textGet plain text content

Parameters not published.

get_webui_configGet Mailpit configuration

Parameters not published.

list_messagesList messages with pagination

Parameters not published.

list_tagsList all tags

Parameters not published.

release_messageRelay to external SMTP

Parameters not published.

rename_tagRename a tag

Parameters not published.

search_messagesSearch using Mailpit query syntax

Parameters not published.

send_messageSend a test email

Parameters not published.

set_chaosConfigure chaos testing

Parameters not published.

set_read_statusMark messages as read/unread

Parameters not published.

set_tagsSet tags on messages

Parameters not published.

Ask AI

✦

Ask AI about Mailpit MCP

Powered by Claude · Grounded in docs

I know everything about Mailpit MCP. Ask me about installation, configuration, usage, or troubleshooting.

Security checks

Static checks derived from the repository 5 days ago. Heuristics on the source, not an audit.

  • ✓README presentThe repository ships documentation.
  • ✓License declaredUsable under a stated license.
  • ✓Tests presentA test suite exists in the repository.
  • ✓Dependencies pinnedA lockfile pins dependency versions.
  • ✓No dynamic code executionSource scan found no eval, dynamic Function, or shell execution.
  • !Scoped permissionsDoesn't declare a permission scope. Assume it can do anything its process can.

README

Mailpit MCP Server

A standalone Model Context Protocol (MCP) server that enables AI assistants to interact with Mailpit email testing environments.

Overview

This project provides an MCP server that connects AI assistants (Claude, Cursor, VS Code Copilot, etc.) to Mailpit's API, enabling natural language interaction with your email testing workflow.

Key Features:

  • Browse, search, and analyze emails using natural language
  • Check HTML compatibility across email clients
  • Validate links and detect broken images
  • Run spam analysis on messages (requires SpamAssassin)
  • Send test emails and manage tags
  • Debug email delivery issues

Prerequisites

  • A running Mailpit instance (the MCP server connects to Mailpit via its HTTP API)
  • Go 1.24+ (if building from source)

Installation

Option 1: Docker (Recommended)

docker run -d \
  --name mailpit-mcp \
  -e MAILPIT_URL=http://your-mailpit-host:8025 \
  -e MCP_TRANSPORT=http \
  -p 3000:3000 \
  ghcr.io/amirhmoradi/mailpit-mcp:latest

Option 2: Docker Compose

Create a docker-compose.yml:

services:
  mailpit:
    image: axllent/mailpit:latest
    ports:
      - "8025:8025"
      - "1025:1025"

  mailpit-mcp:
    image: ghcr.io/amirhmoradi/mailpit-mcp:latest
    environment:
      MAILPIT_URL: http://mailpit:8025
      MCP_TRANSPORT: http
    ports:
      - "3000:3000"
    depends_on:
      - mailpit

Run with:

docker-compose up -d

Option 3: Build from Source

# Clone the repository
git clone https://github.com/amirhmoradi/mailpit-mcp.git
cd mailpit-mcp

# Build the binary
cd mcp
go build -o mailpit-mcp-server ./cmd/mailpit-mcp-server

# Run the server
MAILPIT_URL=http://localhost:8025 ./mailpit-mcp-server

Option 4: Go Install

go install github.com/amirhmoradi/mailpit-mcp/cmd/mailpit-mcp-server@latest

Configuration

Configure the MCP server using environment variables:

Variable Description Default
MAILPIT_URL Mailpit server URL http://localhost:8025
MAILPIT_AUTH_USER Basic auth username (if Mailpit requires auth) (none)
MAILPIT_AUTH_PASS Basic auth password (none)
MAILPIT_TIMEOUT Request timeout in seconds 30
MCP_TRANSPORT Transport mode: stdio or http stdio
MCP_HTTP_HOST HTTP server bind address 0.0.0.0
MCP_HTTP_PORT HTTP server port 3000
MCP_LOG_LEVEL Log level: debug, info, warn, error info

Usage with AI Tools

Claude Desktop

Add to your Claude Desktop configuration file:

macOS: ~/Library/Application Support/Claude/claude_desktop_config.json

Windows: %APPDATA%\Claude\claude_desktop_config.json

{
  "mcpServers": {
    "mailpit": {
      "command": "/path/to/mailpit-mcp-server",
      "env": {
        "MAILPIT_URL": "http://localhost:8025"
      }
    }
  }
}

Or if using Docker:

{
  "mcpServers": {
    "mailpit": {
      "command": "docker",
      "args": ["run", "-i", "--rm",
        "-e", "MAILPIT_URL=http://host.docker.internal:8025",
        "ghcr.io/amirhmoradi/mailpit-mcp:latest"]
    }
  }
}

Cursor / VS Code

For IDE integration, run the MCP server in HTTP mode:

# Start the server in HTTP mode
MAILPIT_URL=http://localhost:8025 MCP_TRANSPORT=http ./mailpit-mcp-server

Then add to your IDE's MCP configuration:

{
  "mcp.servers": {
    "mailpit": {
      "url": "http://localhost:3000/mcp"
    }
  }
}

Available Tools

Tool Description
list_messages List messages with pagination
search_messages Search using Mailpit query syntax
get_message Get full message details
get_message_headers Get message headers
get_message_source Get raw RFC 2822 source
get_message_html Get rendered HTML content
get_message_text Get plain text content
get_attachment Download an attachment
delete_messages Delete messages by ID
delete_search Delete messages matching a search
set_read_status Mark messages as read/unread
check_html Check HTML email client compatibility
check_links Validate links in an email
check_spam Get SpamAssassin analysis
list_tags List all tags
set_tags Set tags on messages
rename_tag Rename a tag
delete_tag Delete a tag
send_message Send a test email
release_message Relay to external SMTP
get_chaos Get chaos testing config
set_chaos Configure chaos testing
get_info Get server information
get_webui_config Get Mailpit configuration

Available Prompts

Prompt Description
analyze_latest_email Comprehensive analysis of the most recent email
debug_email_delivery Debug delivery issues for a message
check_email_quality Full quality check (HTML, links, spam)
search_emails Help construct search queries
compose_test_email Create and send test emails
analyze_email_headers Deep header analysis
compare_emails Compare two emails (A/B testing)
summarize_inbox Summarize inbox state

Search Syntax

The search tool supports Mailpit's query syntax:

  • from:email@example.com - Sender address
  • to:email@example.com - Recipient address
  • subject:keyword - Subject contains text
  • message-id:id - Specific Message-ID
  • tag:tagname - Has specific tag
  • is:read / is:unread - Read status
  • has:attachment - Has attachments
  • before:YYYY-MM-DD - Before date
  • after:YYYY-MM-DD - After date

Multiple terms are combined with AND logic.

Development

# Build
cd mcp
go build ./...

# Test
go test ./...

# Run locally (STDIO mode for Claude Desktop)
MAILPIT_URL=http://localhost:8025 go run ./cmd/mailpit-mcp-server

# Run locally (HTTP mode for IDE integration)
MAILPIT_URL=http://localhost:8025 MCP_TRANSPORT=http go run ./cmd/mailpit-mcp-server

License

MIT License - See LICENSE for details.

Acknowledgments

This project provides MCP integration for Mailpit, the excellent email testing tool created by @axllent.

README fetched from the repository 5 days ago. The original is authoritative.

Questions

About Mailpit MCP

How do I install Mailpit MCP?

No package has been published for this server, so install it from source: clone the repository and follow its README.

Is Mailpit MCP safe to use with an AI agent?

Its trust score is 56 out of 100 (fair). It passes 5 of the 6 static security checks run so far; the failures are listed above. It has no ConduID identity yet, so agent calls to it are not receipted.

Is Mailpit MCP still maintained?

The last commit was 8 months ago and 3 open issues. That's long enough that you should check whether the maintainer is responding to issues before depending on it.