Maildev MCP logo

Maildev MCP

Controls a local MailDev Docker container and lets MCP clients inspect, search, validate, and clean up test emails.

Install Maildev MCP

Run the project’s own setup commands, in order.

Setup steps from the project

maildev-mcp installs with its own steps rather than a config we can generate, so these are copied as-is. Follow them in order and run the commands in a terminal. Source: github.com

  1. 1. Install
    dotnet tool install -g MailDevMcp
    
  2. 2. Install
    git clone https://github.com/pierre3/MailDevMcp.git
    
  3. 3. Run
    cd MailDevMcp
    
  4. 4. Install
    dotnet pack -c Release
    
  5. 5. Install
    dotnet tool install -g --add-source ./bin/Release MailDevMcp
    

Overview

The maildev-mcp MCP server manages a MailDev Docker container and exposes its local HTTP API to MCP clients. It can start, stop, and check MailDev, then list, search, inspect, delete, and wait for emails. Additional tools expose HTML bodies, Base64 attachment data, and byte-level attachment verification. Reach for it when local development or automated tests need to capture and validate application email without using a real mail service.

Use cases

  • Start a local MailDev container for email tests
  • Wait for an asynchronously delivered message
  • Search and inspect captured application emails
  • Validate HTML bodies and attachment contents
  • Clean up test inbox data after a run

Key features

  • MailDev Docker container lifecycle management
  • Email listing, search, retrieval, and deletion
  • Polling for matching incoming emails
  • HTML body and Base64 attachment inspection
  • Byte-by-byte attachment verification
  • Configurable SMTP, API, authentication, and TLS settings

Tools12

What Maildev MCP lets your agent do. Expand a tool for its parameters.

Self-reported~200 tokens of context

Security & health

What it can reach and how reliably it runs — from our own checks, not the maintainer’s claims.

ActiveLast checked

Recent health check succeeded.

14/14 checks healthy over the last 89d

Adoption & maintenance

Factual signals from GitHub, npm, and our automated checks — not a rating.

GitHub stars2Stargazers on the source repository.
Last commit8mo agoMost recent push to the default branch.
Tools exposed12Callable tools this server registers over MCP.

How Maildev MCP works

What maildev-mcp MCP server does

The maildev-mcp MCP server connects an MCP client to MailDev running in Docker. It supports local email workflows in which an application sends messages to MailDev and an AI editor or other MCP client examines the captured results.

The server covers container lifecycle operations as well as message inspection. It can start MailDev with selected SMTP and API ports, optional SMTP authentication, and TLS. It can also stop and remove the container or report whether MailDev is running.

For received messages, the server can return inbox listings, retrieve one message by ID, search by subject, sender, or recipient, and remove one or all messages. Missing subjects are shown as (no subject), while missing address lists are shown as (none).

How it works

MailDev is accessed through its HTTP API on localhost. The MCP server starts the Docker container and uses the configured API endpoint to perform email operations. Docker must be installed and available on the same machine as the MCP server, and the API port configured for the MCP client must match the port exposed by Docker.

A typical test flow starts MailDev, triggers application behavior that sends an email, and waits for delivery when processing is asynchronous. WaitForEmail polls until a message matching the supplied criteria arrives or the timeout expires. If MailDev has a temporary connection problem during polling, that failure is reported in the returned message.

After delivery, a client can inspect the message, retrieve its HTML body, examine attachments, and clean up individual messages or the entire inbox. VerifyAttachment compares a received attachment with an original Base64-encoded payload byte by byte and reports an exact match, size mismatch, or content mismatch.

Setup and configuration

Install the .NET global tool with:

sh
dotnet tool install -g MailDevMcp

After installation, the maildev-mcp command is available to MCP clients. A configuration can invoke that command over standard input and output and set the MailDev API port:

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

MAILDEV_API_PORT defaults to 1080. The StartMaildev tool separately accepts custom SMTP and API ports, optional SMTP credentials, and TLS. Empty or whitespace-only credentials disable SMTP authentication. TLS uses a generated self-signed certificate.

Building from source requires the .NET 10 SDK or later and Docker. Clone the repository, run dotnet pack -c Release, then install the generated package as a global tool using the local Release output as its package source.

Tools and capabilities

The maildev-mcp MCP server provides these operations:

  • Start, stop, and check the status of the MailDev container.
  • List, retrieve, search, and delete received emails.
  • Wait for a matching email during asynchronous tests.
  • Return an email's HTML body.
  • Return raw Base64-encoded attachment content.
  • Compare an attachment against original data byte by byte.

Limitations and notes

This server is designed for local development and test automation. SMTP and API ports must be coordinated between MailDev, Docker, and the MCP client configuration. Attachment verification requires the original payload in Base64 form, and TLS uses a self-signed certificate rather than a certificate-management workflow.

Written by AllMCPs with AI assistance from the project’s README and listing data. How we build listings

Reviews

No reviews yet — be the first to share how it worked for you.

Frequently Asked Questions about Maildev MCP

maildev-mcp is an MCP server that connects AI editors and MCP clients to MailDev in a local Docker container. Its main tools start and stop MailDev, check status, list and search messages, retrieve email details and HTML, wait for messages, manage inbox data, and inspect or verify attachments.

Install it as a global .NET tool with `dotnet tool install -g MailDevMcp`. The `maildev-mcp` command then becomes available for MCP client configuration. Building from source requires the .NET 10 SDK or later and Docker.

Set `MAILDEV_API_PORT` in the MCP client environment, or use its default value of `1080`. The configured port must match the MailDev API port exposed by Docker. `StartMaildev` also supports custom SMTP and API ports.

Yes. The README gives Claude Desktop and VS Code as MCP client configuration examples. Configure either client to run the `maildev-mcp` command and set the MailDev API port when the default of `1080` is not appropriate.

Related MCP servers

Add a badge to your READMEShow it’s listed — live SVG, Markdown or HTML.

AllMCPs Directory Badge

Full Badge Customizer

Showcase your server listing on GitHub or your project documentation. Embed this dynamic SVG badge to highlight official listing status and live engagement.

Badge Style:
Live Dynamic SVG PreviewMaildev MCP AllMCPs Directory Badge
Markdown (GitHub README)
[![AllMCPs](https://allmcps.com/api/badge/maildev-mcp?style=directory)](https://allmcps.com/mcp/maildev-mcp)
HTML Embed
<a href="https://allmcps.com/mcp/maildev-mcp"><img src="https://allmcps.com/api/badge/maildev-mcp?style=directory" alt="Maildev MCP on AllMCPs" /></a>