Skip to main content
Glama
EngageLab Agent Email MCP Server

EngageLab Agent Email MCP Server

Official

EngageLab Agent Email MCP Server

npm License: MIT Node

English | 简体中文

从 AI 代理发送、接收和回复电子邮件 — 通过 Model Context Protocol。

每个代理都拥有自己的邮箱:一个真实地址,既可以发送也可以接收邮件,对话按线程分组,让代理拥有上下文。适用于 Claude Desktop、Claude Code、Cursor、Cowork 以及任何兼容 MCP 的客户端。

{
  "mcpServers": {
    "engagelab-email": {
      "command": "npx",
      "args": ["-y", "@engagelabemail/mcp"],
      "env": { "ENGAGELAB_EMAIL_SECRET_KEY": "sk_sg_your_key" }
    }
  }
}

为什么

大多数电子邮件 API 仅支持发送。需要通过电子邮件进行对话的代理(支持、调度、审批)需要一个收件箱。

  • 发送与接收 — 代理拥有专用邮箱,而非附加的解析 webhook

  • 线程感知 — 回复按对话分组,代理可查看完整历史

  • 沙盒模式 — 无需向真实用户发送邮件即可测试代理流程

  • 一个环境变量 — 本地使用无需 OAuth 流程;区域从密钥推断

Related MCP server: InboxAPI CLI

工具

工具

功能

发现

list_mailboxes

列出邮箱;先调用此工具获取 ID

发送

send_email

新邮件(文本/HTML,抄送/密送,附件,沙盒)

reply_email

回复消息 — 自动推断收件人和线程

接收

list_inbound_messages

入站邮件,按邮箱/关键词过滤

get_message

按 UID 获取完整消息详情

check_new_messages

一次性轮询新邮件

线程

list_threads / get_thread / list_thread_messages

浏览对话

快速开始

1. 获取 Secret Key。 创建 EngageLab 账户并从控制台生成密钥(格式 sk_sg_xxx — 前缀选择区域)。或者使用 CLI:engagelab-email-cli login 通过浏览器创建一个。

2. 创建邮箱。 在控制台中为你的代理创建一个邮箱(共享子域名即时生效;自定义域名需要 DNS 验证)。编程式创建邮箱已在路线图中 — 如果 list_mailboxes 返回空,请参阅故障排除。

3. 注册服务器。

Claude Desktop — 将上面的 JSON 块添加到 claude_desktop_config.json。

Claude Code:

claude mcp add engagelab-email \
  -e ENGAGELAB_EMAIL_SECRET_KEY=sk_sg_your_key \
  -- npx -y @engagelabemail/mcp

然后向你的代理提问:

列出我的邮箱,然后从第一个邮箱向 bob@example.com 发送一封邮件,说明发票已批准。

支持机器人的典型代理循环:

check_new_messages()            → [messageUids]
get_message(uid)                → body, attachments
list_thread_messages(threadId)  → full conversation context
reply_email(uid, { text: ... }) → response lands in the same thread

配置

环境变量

必需

描述

ENGAGELAB_EMAIL_SECRET_KEY

是

以 sk_ 开头的 Secret Key

ENGAGELAB_EMAIL_BASE_URL

否

覆盖 API 基础 URL。从密钥区域推断:sg → 新加坡,tr → 土耳其

限制:每条消息最多 10 个附件 / 总大小 10MB(在工具模式中 base64 编码)。

故障排除

  • list_mailboxes 返回空列表 — 你的账户还没有邮箱。请在 EngageLab 控制台创建一个(参见快速开始第 2 步)。代理目前无法自行创建邮箱。

  • 401 / code 100101 — Secret Key 错误或已被撤销。检查 ENGAGELAB_EMAIL_SECRET_KEY,并确保密钥的区域前缀(sk_sg_ / sk_tr_)与你使用的端点匹配。

  • 无法确定 API 基础 URL — 密钥的区域前缀无法识别。请显式设置 ENGAGELAB_EMAIL_BASE_URL。

  • 回复显示为新对话 — 请使用 reply_email(而不是 send_email),以保持 In-Reply-To 头和线程完整。

路线图

  • 托管 MCP(OAuth)实现零配置远程使用

  • 通过 Secret Key 编程式创建邮箱

  • 为 check_new_messages 提供 Webhook 推送(无需轮询)

  • 基于 URL 的附件引用(上下文中无需 base64)

从源码运行

git clone https://github.com/Metaverse-Cloud/engagelab-email-mcp
cd engagelab-email-mcp
npm install && npm run build
ENGAGELAB_EMAIL_SECRET_KEY=sk_sg_xxx node dist/index.cjs

相关

许可证

MIT

Available Tools

9 tools
check_new_messagesA

Poll for new inbound messages received since the last check (one-shot; does not block). Use this to monitor an inbox for new email.

Inputs: limit, mailboxId.

get_messageA

Get full details of one inbound message by its UID, including body and attachments.

Inputs: messageUid (required).

get_threadB

Get details of one conversation thread.

Inputs: threadId (required).

list_inbound_messagesB

List inbound (received) email messages, newest first. Optionally filter by mailbox and keyword.

Inputs: pageNo, keyword, pageSize, mailboxId.

list_mailboxesA

List all mailboxes available to the authenticated account. Each mailbox has its own address for sending and receiving email. Call this first to discover mailbox IDs used by other tools.

Inputs: no named parameters.

list_thread_messagesA

List all messages inside a conversation thread, oldest first.

Inputs: threadId (required), pageNo, pageSize.

list_threadsC

List conversation threads. A thread groups messages exchanged with the same counterpart.

Inputs: pageNo, keyword, pageSize, mailboxId.

reply_emailA

Reply to an inbound message. Recipients are inferred from the original message; additional cc/bcc can be added. Provide either text or html body.

Inputs: messageUid (required), cc, bcc, html, +6 more.

send_emailA

Send a new email from one of your EngageLab mailboxes. Provide either text or html body. Recipients are arrays of email addresses. Use sandbox=true for testing without real delivery.

Inputs: to (required), mailboxId (required), cc, bcc, +8 more.

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections.

    TDQS

    A3.7/5.0

    Scored across 9 tools

    Disambiguation4/5

    Each tool maps to a distinct resource/action: mailbox discovery, message listing/retrieval, sending/reply, and thread navigation. The only mild overlap is between check_new_messages and list_inbound_messages, but their descriptions clearly separate the polling behavior from general listing.

    Naming Consistency5/5

    All tool names consistently follow the snake_case verb_noun pattern (get_message, list_mailboxes, send_email, reply_email, etc.), with no mixed conventions or vague verbs.

    Tool Count5/5

    Nine tools is well within the ideal range for an email-focused server, covering mailbox discovery, message operations, sending, replying, and threads without unnecessary bloat.

    Completeness4/5

    The core email lifecycle is covered: discover mailboxes, list/read inbound messages, send new emails, reply to existing ones, and inspect threads. Minor gaps include no way to list sent messages and no support for sending attachments, but these are not fatal for typical agent email workflows.

    Maintenance

    ActivitySlowing
    ResponsivenessNo recent community issues

    Related MCP Connectors

    Related MCP Servers

    • A
      license
      Not graded
      quality
      B
      maintenance
      Provides an AI agent with its own email address to send, receive, and manage emails via MCP. No email server setup required.
      30 npm
      13
      MIT
    • F
      license
      Not graded
      quality
      D
      maintenance
      Give AI agents their own email inboxes. Create, send, receive, and manage email entirely via MCP tools.
      -
    • F
      license
      B
      quality
      B
      maintenance
      Enables external AI agents to read, send, and manage email over IMAP/SMTP via MCP, including inbox listing, search, drafts, scheduled/batch sending, and operations like reply, archive, and labels.
      30
      3
      -