MailDevMcp

MailDevMcp

Provides MCP tools to manage MailDev Docker containers and inspect received emails, including listing, searching, retrieving, deleting, waiting for, and verifying email content and attachments for local development and test automation.

Category
Visit Server

README

MailDevMcp

English | 日本語

CI NuGet

mcp-name: io.github.pierre3/maildev-mcp

An MCP (Model Context Protocol) server for MailDev.
Manage MailDev Docker containers and inspect received emails directly from your AI-powered editor or MCP client.

This server is intended for local development and test automation scenarios where an MCP client needs to:

  • start or stop a MailDev container
  • inspect inbox contents
  • wait for emails after triggering application behavior
  • inspect HTML bodies and attachments
  • verify attachment integrity byte-for-byte

Installation

Install as a global .NET tool:

dotnet tool install -g MailDevMcp

After installation, the maildev-mcp command becomes available.

MCP Client Configuration

Add the following to your MCP client settings (e.g. Claude Desktop, VS Code, etc.):

{
  "mcpServers": {
    "maildev-mcp": {
      "command": "maildev-mcp",
      "env": {
        "MAILDEV_API_PORT": "1080"
      }
    }
  }
}

Environment Variables

Variable Default Description
MAILDEV_API_PORT 1080 Port number for the MailDev REST API

Typical Workflow

  1. Call StartMaildev to launch a local MailDev container
  2. Trigger your application to send an email
  3. Call WaitForEmail if delivery is asynchronous
  4. Use ListEmails, SearchEmails, or GetEmail to inspect the result
  5. Use GetEmailHtml, GetAttachmentContent, or VerifyAttachment when deeper validation is needed
  6. Clean up with DeleteEmail, DeleteAllEmails, or StopMaildev

Available Tools

Tool Description
StartMaildev Start the MailDev Docker container with configurable SMTP port, API port, authentication, and TLS
StopMaildev Stop and remove the MailDev Docker container
MaildevStatus Check the running status of MailDev
ListEmails Retrieve the list of received emails
GetEmail Get the details of an email by ID, including attachment information
GetEmailHtml Get the HTML body of an email by ID
SearchEmails Search received emails by subject, sender, or recipient
DeleteEmail Delete a single email by ID
DeleteAllEmails Delete all received emails
WaitForEmail Wait until a new email matching given criteria arrives (useful for test automation)
GetAttachmentContent Get the raw Base64-encoded content of an email attachment
VerifyAttachment Verify that an email attachment matches the original data by byte-by-byte comparison

Tool Behavior Notes

  • StartMaildev
    • Supports custom SMTP and API ports
    • Supports optional SMTP authentication
    • Treats empty or whitespace-only credentials as authentication disabled
    • Supports TLS with a generated self-signed certificate
  • GetEmail and ListEmails
    • Render missing or empty subjects as (no subject)
    • Render missing address lists as (none)
  • WaitForEmail
    • Polls MailDev until a matching email arrives or the timeout is reached
    • Reports transient MailDev connection failures in the returned message when they occur during polling
  • VerifyAttachment
    • Accepts a Base64-encoded original payload
    • Compares the received attachment byte-by-byte
    • Reports either exact match, size mismatch, or content mismatch

Requirements and Assumptions

  • Docker must be installed and available on the same machine where this MCP server runs
  • MailDev is accessed through its HTTP API on localhost
  • The configured API port in the MCP client must match the MailDev API port exposed by Docker

Prerequisites

Building from Source

git clone https://github.com/pierre3/MailDevMcp.git
cd MailDevMcp
dotnet pack -c Release
dotnet tool install -g --add-source ./bin/Release MailDevMcp

License

MIT

Recommended Servers

playwright-mcp

playwright-mcp

A Model Context Protocol server that enables LLMs to interact with web pages through structured accessibility snapshots without requiring vision models or screenshots.

Official
Featured
TypeScript
Magic Component Platform (MCP)

Magic Component Platform (MCP)

An AI-powered tool that generates modern UI components from natural language descriptions, integrating with popular IDEs to streamline UI development workflow.

Official
Featured
Local
TypeScript
Audiense Insights MCP Server

Audiense Insights MCP Server

Enables interaction with Audiense Insights accounts via the Model Context Protocol, facilitating the extraction and analysis of marketing insights and audience data including demographics, behavior, and influencer engagement.

Official
Featured
Local
TypeScript
VeyraX MCP

VeyraX MCP

Single MCP tool to connect all your favorite tools: Gmail, Calendar and 40 more.

Official
Featured
Local
Kagi MCP Server

Kagi MCP Server

An MCP server that integrates Kagi search capabilities with Claude AI, enabling Claude to perform real-time web searches when answering questions that require up-to-date information.

Official
Featured
Python
graphlit-mcp-server

graphlit-mcp-server

The Model Context Protocol (MCP) Server enables integration between MCP clients and the Graphlit service. Ingest anything from Slack to Gmail to podcast feeds, in addition to web crawling, into a Graphlit project - and then retrieve relevant contents from the MCP client.

Official
Featured
TypeScript
Neon Database

Neon Database

MCP server for interacting with Neon Management API and databases

Official
Featured
Exa Search

Exa Search

A Model Context Protocol (MCP) server lets AI assistants like Claude use the Exa AI Search API for web searches. This setup allows AI models to get real-time web information in a safe and controlled way.

Official
Featured
Qdrant Server

Qdrant Server

This repository is an example of how to create a MCP server for Qdrant, a vector search engine.

Official
Featured
E2B

E2B

Using MCP to run code via e2b.

Official
Featured