Skip to main content
Glama
pierre3

MailDevMcp

by pierre3

MailDevMcp

English | 日本語

CI NuGet

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

一个用于 MailDevMCP(模型上下文协议) 服务器。
直接在你的 AI 驱动编辑器或 MCP 客户端中管理 MailDev Docker 容器并检查收到的电子邮件。

该服务器面向本地开发和测试自动化场景,适用于 MCP 客户端需要执行以下操作的场景:

  • 启动或停止 MailDev 容器

  • 检查收件箱内容

  • 在触发应用程序行为后等待电子邮件

  • 检查 HTML 正文和附件

  • 逐字节验证附件的完整性

安装

作为全局 .NET 工具安装:

dotnet tool install -g MailDevMcp

安装后,maildev-mcp 命令即可使用。

Related MCP server: @injaan.dev/ms365-email-cli-mcp

MCP 客户端配置

将以下内容添加到你的 MCP 客户端设置中(例如 Claude Desktop、VS Code 等):

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

环境变量

变量

默认值

描述

MAILDEV_API_PORT

1080

MailDev REST API 的端口号

典型工作流程

  1. 调用 StartMaildev 启动本地 MailDev 容器

  2. 触发你的应用程序发送电子邮件

  3. 如果投递是异步的,请调用 WaitForEmail

  4. 使用 ListEmailsSearchEmailsGetEmail 检查结果

  5. 当需要更深入的验证时,使用 GetEmailHtmlGetAttachmentContentVerifyAttachment

  6. 使用 DeleteEmailDeleteAllEmailsStopMaildev 进行清理

可用工具

工具

描述

StartMaildev

使用可配置的 SMTP 端口、API 端口、身份验证和 TLS 启动 MailDev Docker 容器

StopMaildev

停止并删除 MailDev Docker 容器

MaildevStatus

检查 MailDev 的运行状态

ListEmails

检索收到的电子邮件列表

GetEmail

按 ID 获取电子邮件的详细信息,包括附件信息

GetEmailHtml

按 ID 获取电子邮件的 HTML 正文

SearchEmails

按主题、发件人或收件人搜索收到的电子邮件

DeleteEmail

按 ID 删除单个电子邮件

DeleteAllEmails

删除所有收到的电子邮件

WaitForEmail

等待符合条件的新电子邮件到达(对测试自动化很有用)

GetAttachmentContent

获取电子邮件附件的原始 Base64 编码内容

VerifyAttachment

通过逐字节比较来验证电子邮件附件是否与原始数据匹配

工具行为说明

  • StartMaildev

    • 支持自定义 SMTP 和 API 端口

    • 支持可选的 SMTP 身份验证

    • 将空凭据或仅包含空格的凭据视为禁用身份验证

    • 支持使用生成的自我签名证书进行 TLS

  • GetEmailListEmails

    • 将缺失或空主题显示为 (no subject)

    • 将缺失的地址列表显示为 (none)

  • WaitForEmail

    • 轮询 MailDev,直到匹配的电子邮件到达或达到超时时间

    • 在轮询期间发生瞬时 MailDev 连接失败时,在返回的消息中报告该错误

  • VerifyAttachment

    • 接受 Base64 编码的原始负载

    • 逐字节比较收到的附件

    • 报告完全匹配、大小不匹配或内容不匹配

要求和假设

  • 必须安装 Docker,并且该 MCP 服务器运行的机器上必须可用

  • 通过 localhost 上的 HTTP API 访问 MailDev

  • MCP 客户端中配置的 API 端口必须与 Docker 公开的 MailDev API 端口匹配

先决条件

从源代码构建

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

许可证

MIT

A
license - permissive license
Not graded
quality - not tested
C
maintenance

Maintenance

Maintainers
Response time
0dRelease cycle
2Releases (12mo)
Commit activity

Resources

Unclaimed servers have limited discoverability.

Looking for Admin?

If you are the server author, to access and configure the admin panel.

Related MCP Servers

  • A
    license
    A
    quality
    D
    maintenance
    Deprecated MCP server wrapper for ms365-email-cli that exposes Microsoft 365 email operations (list, read, send, reply, search, etc.) as MCP tools. Use the main ms365-email-cli package instead, which now includes built-in MCP server support.
    10
    30
    ISC

View all related MCP servers

Related MCP Connectors

  • Read, search, send, organize, draft and schedule email across your inboxes from any MCP client.

  • MCP tools for TON Sites, TON DNS and TON Storage.

  • Hosted email MCP for AI agents with inboxes, send/receive, memory, recovery, and credits.

View all MCP Connectors

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/pierre3/MailDevMcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server