Maildev Mcp

io.github.pierre3由 GitHub 账号 pierre3 发布v1.0.1更新于 Oct 24, 2026

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

已验证STDIO仅桌面开发者工具沟通与协作

概览

AI 生成的概览

面向 MailDev 的本地 MCP 服务器,让助手启动和停止 MailDev Docker 容器,并查看、搜索、等待和校验其收到的邮件。

可以做什么
启动、停止并检查本地 MailDev Docker 容器的状态,可配置 SMTP 与 API 端口、可选 SMTP 认证以及使用自签名证书的 TLS。按主题、发件人或收件人列出、搜索和读取收到的邮件,包括 HTML 正文和附件信息。等待符合条件的新邮件到达,适合在触发应用发信后使用。删除单封邮件或清空整个收件箱。以 Base64 获取附件内容,并将收到的附件与原始数据逐字节比对校验。
适用场景
适用于本地开发和测试自动化场景:助手需要驱动 MailDev 实例,启动它、触发应用发送邮件、等待投递,然后检查或校验邮件及其附件。不适合生产环境的邮件处理。
运行要求
以本地进程运行;该包是 .NET 全局工具,需要 .NET 10 SDK 或更高版本。同一台机器上必须安装并可用 Docker。通过 localhost 上的 HTTP API 访问 MailDev;环境变量 MAILDEV_API_PORT 设置 API 端口(默认 1080),且必须与 Docker 暴露的端口一致。
安装前请注意
StartMaildev 会创建和移除 Docker 容器,并接受可选的 SMTP 凭据;空或仅含空白的凭据会被视为关闭认证。DeleteEmail 和 DeleteAllEmails 会永久删除收件箱中的邮件。TLS 使用生成的自签名证书,客户端可能不信任。

安装

在 SourceWeft 中

  1. 打开 控制台中的 Maildev Mcp,将其添加到工作区。
  2. 为需要使用其工具的对话启用该服务。

Desktop only,通过 STDIO。 STDIO 服务会启动本地进程,因此需要 SourceWeft 桌面宿主。

其他 MCP 客户端

参照 仓库 中的启动说明。

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:

sh
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.):

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

Environment Variables

VariableDefaultDescription
MAILDEV_API_PORT1080Port 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

ToolDescription
StartMaildevStart the MailDev Docker container with configurable SMTP port, API port, authentication, and TLS
StopMaildevStop and remove the MailDev Docker container
MaildevStatusCheck the running status of MailDev
ListEmailsRetrieve the list of received emails
GetEmailGet the details of an email by ID, including attachment information
GetEmailHtmlGet the HTML body of an email by ID
SearchEmailsSearch received emails by subject, sender, or recipient
DeleteEmailDelete a single email by ID
DeleteAllEmailsDelete all received emails
WaitForEmailWait until a new email matching given criteria arrives (useful for test automation)
GetAttachmentContentGet the raw Base64-encoded content of an email attachment
VerifyAttachmentVerify 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

sh
git clone https://github.com/pierre3/MailDevMcp.gitcd MailDevMcpdotnet pack -c Releasedotnet tool install -g --add-source ./bin/Release MailDevMcp

License

MIT

来源:README.md,提交 15c2a39

工具

0
SourceWeft 尚未在沙箱中启动过该软件包,因此其工具未知。

版本历史

1
  1. v1.0.1最新Sep 16, 2026

评分

已满足适用检查项的 50%

该评分衡量此收录条目的完整程度,依据注册中心条目、端点与公开来源计算得出。它不是对服务器本身的评价,也不表示服务器安全或当前可用:可连通性是带日期的检查结果,评分也不包含安装量或用户评价。

  • 近 30 天内可连通25 分

    请保持端点能够响应 MCP 握手;SourceWeft 每 30 天探测一次。

  • 已声明认证方式10 分

    请在注册中心条目中声明凭据请求头,或保持端点能够响应探测,以便判定其认证方式。

  • 已列出工具15 分

    请让服务器在无凭据时响应 tools/list,或发布可在沙箱中无凭据启动的软件包。

  • 描述必需15 分
  • 图标10 分
  • 文档15 分
  • 许可证10 分