
e2a — email for AI agents
dev.e2aPublished by e2a.devOfficial publisherv1.0.0Updated Oct 24, 2026
Authenticated email gateway for AI agents — per-agent inboxes, HITL approval, SPF/DKIM verified.
Overview
Hosted email gateway that gives an AI agent its own inbox to send, receive, reply to and forward mail, with optional human review of held messages.
- What you can do
- Read, send, reply to, forward, label, trash and restore messages, with optional scheduled sending and attachment download links
- Manage agent inboxes: list, create, inspect and restore agent addresses, plus whoami for identity, scope and limits
- Human-in-the-loop review: list and inspect held inbound and outbound messages, then approve or reject them
- Administer domains, API keys, contacts and outreach, suppressions, email templates and webhook subscriptions
- File and check requests for external sending access when a deployment restricts recipients
- When to use it
- Use it when an agent needs a real, authenticated email identity rather than a scripted SMTP setup: handling inbound mail, replying in threads, running outreach, or sending outbound mail that a human must approve first. It suits both agent-scoped runtime use and account-level administration of inboxes and domains.
- Requirements
- Remote Streamable HTTP endpoint at api.e2a.dev/mcp; nothing to install locally. Authentication is required: OAuth 2.1 via browser authorization, or an e2a dashboard API key sent in the Authorization header. An e2a account and at least one agent inbox are needed; account-scoped callers pass the agent email per tool call.
Installation
In SourceWeft
- Open e2a — email for AI agents in the dashboard and add it to a workspace.
- Connect the required credentials. They are stored privately and never shown on public pages.
- Enable the server for the chats that should use its tools.
Web executable via Streamable HTTP. Remote servers run from the web runtime once configured in a workspace.
Use with an agent
Paste this prompt into Claude Code, Codex, Cursor or another agent — or into SourceWeft chat. The agent reads this server's install guide, shows you its publisher, endpoint and sign-in, and adds it to your client once you agree. Keys never go into a command.
Read https://sourceweft.com/mcp/dev.e2a%2Fmcp-server/install.md and connect the MCP server it describes to my client. Before changing any config, show me its publisher, endpoint and sign-in method and wait for my OK. Never put an API key in a command or in a file I would commit; ask me where it should come from.Other MCP clients
Add this to your client's mcpServers config. The client completes OAuth sign-in on first connect.
{
"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
Source: mcp/README.md at commit 29831a7
Tools
0Version history
1- v1.0.0LatestSep 16, 2026
Score
85% of the applicable checks met
How complete this listing is, computed from the registry entry, the endpoint and public sources. Not a rating of the server and not a statement that it is safe or working today: reachability is a dated check, and no installs or reviews go into the score.
- Reached in the last 30 daysRequired25 pts
- Auth declaredRequired10 pts
- Tools listed15 pts
Answer tools/list without a credential, or ship a package that starts in a sandbox without one.
- DescriptionRequired15 pts
- Logo10 pts
- Documentation15 pts
- License10 pts