
e2a — email for AI agents
dev.e2a由 e2a.dev 发布官方发布者v1.0.0更新于 Oct 24, 2026
Authenticated email gateway for AI agents — per-agent inboxes, HITL approval, SPF/DKIM verified.
概览
托管式邮件网关,为 AI 智能体提供专属收件箱,可收发、回复和转发邮件,并支持人工审核暂扣邮件。
- 可以做什么
- 读取、发送、回复、转发、打标签、移入回收站与恢复邮件,支持定时发送和附件下载链接
- 管理智能体收件箱:列出、创建、查看和恢复智能体地址,并用 whoami 查看身份、权限范围与限额
- 人工审核:列出并查看被暂扣的收件与发件,然后批准或拒绝
- 管理域名、API 密钥、联系人与外联、退信屏蔽名单、邮件模板和 webhook 订阅
- 在部署限制收件人时,提交并查询外部发信权限申请
- 适用场景
- 当智能体需要一个真实且经过认证的邮件身份,而不是自行搭建 SMTP 时使用:处理来信、在邮件线程中回复、开展外联,或发送需要人工先批准的外发邮件。既适合以智能体权限运行,也适合在账户层面管理收件箱和域名。
- 运行要求
- 远程 Streamable HTTP 端点 api.e2a.dev/mcp,无需本地安装。必须认证:可通过浏览器授权的 OAuth 2.1,或在 Authorization 头中提供 e2a 控制台 API 密钥。需要 e2a 账户和至少一个智能体收件箱;账户级调用需在每次工具调用中传入智能体邮箱地址。
安装
在 SourceWeft 中
- 打开 控制台中的 e2a — email for AI agents,将其添加到工作区。
- 连接 所需的 凭据。它们会被私密存储,绝不会在公开页面上展示。
- 为需要使用其工具的对话启用该服务。
Web executable,通过 Streamable HTTP。 远程服务在工作区中配置后即可从网页运行时运行。
交给智能体安装
把这段提示词粘贴到 Claude Code、Codex、Cursor 等智能体,或 SourceWeft 对话中。智能体会读取该服务器的安装指南,先向你展示发布者、端点和登录方式,经你同意后再把它添加到你的客户端。密钥不会写进任何命令。
阅读 https://sourceweft.com/mcp/dev.e2a%2Fmcp-server/install.md,并按其中说明把这个 MCP 服务器接入我的客户端。修改任何配置之前,先告诉我它的发布者、端点和登录方式,等我确认。不要把 API 密钥写进命令或我会提交的文件;问我密钥应从哪里获取。其他 MCP 客户端
把它添加到你客户端的 mcpServers 配置中。 客户端会在首次连接时完成 OAuth 登录。
{
"mcpServers": {
"e2a-email-for-ai-agents": {
"type": "http",
"url": "https://api.e2a.dev/mcp"
}
}
}README
@e2a/mcp-server
Model Context Protocol server for e2a — gives any MCP-aware AI agent its own email inbox to send, receive, reply, and (optionally) review held outbound mail before it ships.
Works with Google ADK, LangChain, OpenAI Agents SDK, Claude Desktop, Cursor, Cline, and any other MCP host.
Connect
e2a's MCP server is hosted. Point your MCP host at the Streamable HTTP endpoint:
Two ways to authenticate:
- OAuth 2.1 (recommended for interactive hosts) — add e2a as a connector and authorize in the browser. No key is pasted into config.
- Bearer API key (programmatic / self-host) — send your e2a dashboard API key in the
Authorization: Bearer <e2a API key>header.
An agent-scoped credential resolves its agent server-side. Account-scoped callers pass the agent email per tool call.
Quick start
Google ADK (Python)
LangChain (Python)
Using langchain-mcp-adapters:
OpenAI Agents SDK (Python)
Claude Desktop / Cline / Cursor
Add e2a as a remote MCP server in the host's config (claude_desktop_config.json, cline_mcp_settings.json, etc.):
Hosts that support OAuth connectors can instead add https://api.e2a.dev/mcp as a connector and authorize in the browser — no key pasted.
Tools
The server exposes up to 80 tools spanning agents, messages, human-in-the-loop
approval, attachments, domains, events, webhooks, API keys, contacts/outreach,
email templates (beta), suppressions, and external sending access requests
(beta).
The visible set depends on your credential's scope: an agent-scoped
credential sees the 21 runtime/inbox tools (read, send, reply, restore
messages, per-agent outreach); an account-scoped credential also sees the
59 admin/setup tools (agent/domain/webhook/event/template/API-key/contact/
suppression/sending-access management — and HITL review discovery plus
approve/reject, which is an account-owner action, never agent
self-approval) — all 80.
Every tool carries MCP annotations (readOnlyHint/destructiveHint/
idempotentHint) so hosts can auto-approve reads and flag destructive actions.
The tables below highlight the most commonly used ones — your MCP host's tool list
shows the set your scope allows, with per-tool descriptions.
Identity
Webhook deliveries are signed — verify them. Push delivery is a top-level resource (
create_webhook), not a per-agent mode. e2a HMAC-signs every webhook delivery against the webhook's signing secret (returned once fromcreate_webhook/rotate_webhook_secret). Your handler must verify the signature on every request — the e2a SDK exposesconstructEvent(rawBody, signatureHeader, secret)which verifies and returns a typed event in one call (throws on a bad signature). Or skip webhooks entirely and poll vialist_messages.
Messages
Scheduled sending via send_at / scheduled_at is beta and may change
before it is declared stable.
External sending access (beta). On a deployment that restricts it, an account may be limited to sending through the shared identity only to its verified account email and to agent inboxes in the same account. A
send_message/reply_to_message/forward_message(or the deprecatedsend_email) call with any other To/Cc/Bcc recipient refuses the WHOLE send withexternal_sending_not_enabled(403) — nothing is queued, and the identical call will not succeed on retry.whoami'ssending_accessobject reports the current state (enforcement_applies,shared_external_approved,paid_external_sending_entitled,owner_recipient_verified) andavailable_unlocks— what can lift the restriction on this deployment:operator_approvalalways;verified_domain(send from your own verified domain) andpaid_entitlement(a paid plan) only where listed. The hosted service lists onlyoperator_approval. To ask for approval, callrequest_sending_accessonce (account scope; also available in the dashboard at the error'srecovery_url): resubmitting while a request is pending returns the same request, andrate_limited(3 requests per 30 days) must not be retried. An operator decides and the decision is emailed to the account owner;get_sending_access_requestshows the current state. No MCP tool can grant approval.
MCP message output intentionally omits the REST message-read beta thread_id
field and adds no thread filter or endpoint. list_conversations /
get_conversation remain caller-owned conversation_id application views,
not RFC email-thread enumeration. Use reply_to_message with the original
message ID to preserve wire topology.
Human-in-the-loop approval
list_reviews/get_review surface every account-scoped hold: outbound drafts
awaiting send approval and inbound messages held by a screening gate. The
email.review_requested webhook is an additional push notification for either
direction and carries the same message_id. The
approve_review/reject_review tools branch on direction: approving an inbound
hold releases it to the agent's inbox (no send, no draft, override fields
ignored); rejecting one drops it so it never reaches the agent.
Domains
API keys
All admin/account-scoped. create_api_key mints agent-scoped keys only —
the key is bound to one inbox and can act only as that agent. Account-scoped
(workspace-admin) keys cannot be created over MCP; mint those from the
dashboard or the raw API, where a human is in the loop.
Contacts (beta)
The people an account corresponds with (list_contacts / get_contact /
create_contact / update_contact / delete_contact, admin/account-scoped)
and one agent's per-contact outreach state — stage, next action, reply/
suppression facts (list_outreach_contacts / get_outreach_contact /
set_outreach_contact / delete_outreach_contact, available to account scope
or an agent-scoped credential for its bound inbox). Import is inert — it
records identity and enrolls outreach without sending anything.
Suppressions
Recipient block lists at two scopes, all admin/account-scoped (the server rejects agent-scoped credentials on every one — an agent must not read or edit blocklists). The account list is auto-populated by hard bounces and complaints and applies to sends from every agent; the agent list (beta) holds unsubscribe/manual blocks for one exact sending agent.
Templates (beta)
Reusable email templates with {{variable}} interpolation (a flat Mustache
subset — no loops/sections; missing variables render as empty strings), plus a
read-only catalog of pre-built starters (welcome, verify-code,
password-reset, receipt, agent-status, daily-digest,
approval-request). Send with a template via send_message's template_id /
template_alias + template_data (mutually exclusive with literal
subject/body). All template management tools are admin/account-scoped. Beta —
shapes may change before templates are declared stable.
Errors
Every failed tool call returns an MCP result with isError: true and two
representations of the error:
-
structuredContent— the machine-branchable form. Branch on this, not the text: -
content(text) — the human-readable form, unchanged and stable:e2a error [<code>] (retryable)?: <message>for API errors,e2a error: <message>for MCP-layer errors. Existing agents that parse this text keep working, but new integrations should readstructuredContentinstead.
Successful results are unaffected (JSON in a text block; list tools return a
domain-named array plus next_cursor while more pages remain).
Operating the HTTP server
Self-hosters run the HTTP transport via mcp/Dockerfile or the mcp
service in the repo's docker-compose.yaml. Day-2 operations (SLOs,
failure classes, correlation) are covered by
docs/runbooks/mcp-server.md; this
section is the reference for configuration and surface.
Environment variables
Health endpoints
All three are unauthenticated:
-
GET /healthz— process liveness only, never touches the backend:{ "ok": true }. Wire to your liveness probe. -
GET /readyz— readiness: probes{E2A_API_URL}/api/health(2s timeout, result cached 10s so a scraping fleet can't cause a probe storm). 200{ "ok": true, "checks": { "api": "ok" } }when reachable; 503{ "ok": false, "checks": { "api": "unreachable" }, "request_id": "…" }Retry-After: 10(the failure-cache TTL) when not. Wire to your readiness probe.
-
GET /metrics— Prometheus text exposition. Example lines:Route labels are bounded:
mcp | healthz | readyz | metrics | discovery | other.
Structured logs
Single-line JSON on stderr (GCE-shaped severity / event / message
plus fields). Request-scoped events carry request_id (the response's
X-Request-Id): auth_resolution (result, duration_ms, scope?;
invalid/fallback at WARNING), http_request (route, method,
status, duration_ms; successful probe/scrape traffic on
healthz/readyz/metrics is metered but not logged), tool_execution (tool, outcome,
duration_ms, error_code?), terminal_error. Bearer tokens are never
logged; the resolve cache is keyed by SHA-256 fingerprints. An inbound
X-Request-Id matching ^[A-Za-z0-9_-]{1,64}$ is honored; otherwise the
server mints mcpreq_<12hex>. The id is echoed on every response but is
not forwarded to the backend API.
Client retry policy
Failed tool calls return structuredContent (see Errors):
branch on code / retryable / retry_after_seconds. Retry only
retryable: true errors with exponential backoff + jitter, ~3 attempts
max. Never retry 4xx (401 → re-authenticate; 421 → fix the URL).
accepted, scheduled, and pending_review on send tools are success outcomes
— do not retry them. A future send_at to the sending agent's own address
returns 400 invalid_request when direct loopback applies; review holds take
precedence and drop the schedule. The transport is stateless, so "reconnect"
after an interruption is simply re-POSTing; MCP clients do this automatically.
Links
License
Apache-2.0
来源:mcp/README.md,提交 29831a7
工具
0版本历史
1- v1.0.0最新Sep 16, 2026
评分
已满足适用检查项的 85%
该评分衡量此收录条目的完整程度,依据注册中心条目、端点与公开来源计算得出。它不是对服务器本身的评价,也不表示服务器安全或当前可用:可连通性是带日期的检查结果,评分也不包含安装量或用户评价。
- 近 30 天内可连通必需25 分
- 已声明认证方式必需10 分
- 已列出工具15 分
请让服务器在无凭据时响应 tools/list,或发布可在沙箱中无凭据启动的软件包。
- 描述必需15 分
- 图标10 分
- 文档15 分
- 许可证10 分