# maildev-mcp [Health: Active]

**Category:** 💬 Communication  
**Repository:** https://github.com/pierre3/MailDevMcp  
**GitHub Stars:** 2  
**Views:** 0  
**Installs:** 0  
**Upvotes:** 0  
**Directory Page:** https://allmcps.com/mcp/maildev-mcp

## Description
MailDev MCP server. Manage Docker containers and inspect emails from your AI editor or MCP client.

## Tools
Capabilities this server exposes over MCP:

- **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

## Claude Desktop Quick Installation
No generated config for this server: it installs through its own setup steps.

The project's own setup steps (from https://github.com/pierre3/MailDevMcp), copied verbatim. Follow them in order; they are not an mcpServers config.

1. Install:

```sh
dotnet tool install -g MailDevMcp
```

2. Install:

```sh
git clone https://github.com/pierre3/MailDevMcp.git
```

3. Run:

```sh
cd MailDevMcp
```

4. Install:

```sh
dotnet pack -c Release
```

5. Install:

```sh
dotnet tool install -g --add-source ./bin/Release MailDevMcp
```

## Documentation

## 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:

```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.

_Full upstream README: https://allmcps.com/mcp/maildev-mcp/readme_

