Skip to main content
Glama

@mailsink/mcp

MailSink 的模型上下文协议 (MCP) 服务器 — 为 AI 智能体和测试自动化提供程序化的临时电子邮件收件箱。

为您的智能体提供八种类型化的工具,用于配置一次性地址、 等待注册邮件、提取 OTP 验证码和魔法链接,以及在任务完成后进行清理。 适用于 Claude Code、Claude Desktop、Cursor、Windsurf 以及任何其他支持 MCP 的客户端。

安装

npm install -g @mailsink/mcp

或者通过 npx 运行,无需安装:

npx @mailsink/mcp

Related MCP server: guerrillamail-mcp

获取 API 密钥

  1. 使用 GitHub 登录 https://mailsink.dev/app。

  2. 从一次性显示中复制密钥。将其存储在您的密码管理器或 .env 文件中。

  3. 导出它以便 MCP 服务器可以读取:

export MAILSINK_API_KEY="msk_..."

免费层级每月提供 50 个收件箱并包含 MCP 支持。专业版($15/月)和团队版($49/月)可提高收件箱上限、增加邮件大小限制、延长 TTL 并提高请求速率。请参阅 定价。

配置您的客户端

Claude Code

claude mcp add mailsink -- npx -y @mailsink/mcp

Claude Desktop / Cursor / Windsurf

添加到客户端配置文件的 mcpServers 部分:

{
  "mcpServers": {
    "mailsink": {
      "command": "npx",
      "args": ["-y", "@mailsink/mcp"],
      "env": {
        "MAILSINK_API_KEY": "msk_..."
      }
    }
  }
}

重启客户端。您应该会看到 mailsink 服务器及其八个工具已列出。

工具

工具

用途

create_inbox

配置一个一次性地址。返回 email、id、expires_at。

list_inboxes

列出账户上的活动收件箱。

wait_for_email

阻塞最多 timeout 秒(最长 120 秒)以等待任何邮件到达。

get_verification_code

从收件箱中提取最新的 OTP(轮询直到找到或超时)。

get_verification_link

提取最新的魔法链接。

list_messages

收件箱中所有邮件的摘要。

get_message

通过 ID 获取特定邮件的完整内容。

delete_inbox

立即销毁收件箱。

智能体流程示例

> Sign me up for Figma, capture the verification code, confirm, and
> tell me the plan once you're in.

[agent invokes]
  create_inbox()                                → agent@codenotify.net
  [agent fills the Figma signup form with that address]
  wait_for_email(inbox_id)                      → blocks 30s…
                                                → returns email + OTP
  [agent types the OTP into the Figma form]
  delete_inbox(inbox_id)                        → cleanup

无需 Webhook 管道。无需 IMAP 凭据。无需解析 MIME。

环境变量

  • MAILSINK_API_KEY (必需) — 您账户的 API 密钥。

  • MAILSINK_API_URL (可选,默认 https://api.mailsink.dev) — 用于自托管或开发 API 的覆盖设置。

源码

https://github.com/heocoi/mailsink/tree/main/mcp

许可证

MIT — 请参阅 LICENSE。

Related MCP Connectors

Related MCP Servers

  • F
    license
    Not graded
    quality
    D
    maintenance
    A minimal MCP server for reading and sending emails via IMAP/SMTP, supporting multiple accounts in a single instance with zero external dependencies.
    1
    -
  • A
    license
    A
    quality
    C
    maintenance
    MCP server for the Guerrilla Mail temporary/disposable email API. Spin up throwaway inboxes, poll for mail, and read messages from any MCP client.
    6
    10 npm
    1
    MIT
  • A
    license
    Not graded
    quality
    C
    maintenance
    A minimal MCP server for reading, searching, managing, and sending email over IMAP and SMTP.
    MIT