cd /news/ai-agents/give-an-ai-agent-a-real-email-inbox-… · home › topics › ai-agents › article
[ARTICLE · art-175214] src=dev.to ↗ pub= topic=ai-agents verified=true sentiment=↑ positive

Give an AI Agent a Real Email Inbox over Remote MCP (with Human Approval)

Aljay Miskino, VP of Partnerships at Email for Agents, outlined a method for giving AI agents their own dedicated email inboxes connected over remote MCP with OAuth, keeping a human in the loop on outbound mail. The server exposes six scoped tools—list_inboxes, list_threads, list_messages, get_message, create_draft, and send_message—and omits any tool the OAuth grant does not cover from tools/list, so a prompt-injected email body cannot invoke capabilities the session never advertised. Drafts strip the send scope before running, and held sends require human approval bound to the exact reviewed draft, expiring after seven days.

recommendation

Give each agent its own inbox with read-and-draft scopes plus human approval, and omit ungranted tools from tools/list so injected email text cannot invoke send.

more in playbook: Securing agents and AI tools
by read4 min views1 publishedNov 24, 2026

By Aljay Miskino, VP of Partnerships at Email for Agents

If you have already wired an AI agent into Claude Code, Cursor, or another MCP client, the next request is often: “now let it handle email.” The usual shortcuts are to connect a personal Gmail account or to stand up a send-only API. Both work for a demo. Both get awkward in production: the agent either borrows a person’s identity, or it can send mail but cannot own a conversation.

This walkthrough shows a third shape: give the agent its own inbox, connect it over remote MCP with OAuth, and keep a human in control of what actually leaves. The examples use Email for Agents, where I work. The same design questions apply if you build the mailbox yourself.

Sign in to the console, create a project, and create an inbox in it. The address you get depends on the project’s environment:

.mail.invalid. It uses a simulated transport. You cannot ask for a custom local part or a custom domain there — that restriction is what makes it safe to point an unproven agent at.ada@agents.emailforagents.ai). Custom domains are a later, paid-plan step. Do the first end-to-end test in a test project. If the agent tries to send to a real person, the message cannot leave.

The MCP endpoint is:

https://mcp.emailforagents.ai/mcp

Paste that URL into the client’s remote MCP settings, start the connection, and sign in in the browser window that opens. On the consent screen you pick:

The grant expires after 30 days and can be revoked sooner. The server identifies itself as email-for-agents-mcp and expects a client that supports remote MCP and OAuth (authorization code with S256 PKCE). A project API key (efa_live_… or efa_test_…) presented at /mcp is rejected on purpose. If your client cannot do OAuth, use the REST API at https://api.emailforagents.ai/v1 instead — same permissions, same send pipeline, different credential.

No named client is certified or one-click. Claude Code, Claude Desktop, and Cursor are listed as testing targets only. Connect one, then prove a round trip in a test project before you rely on it.

The server exposes six tools. A tool the grant does not cover is omitted from tools/list, not merely refused at call time.

Tool Needs What it does
list_inboxes read Lists the inboxes this grant covers
list_threads read Lists conversations in one inbox
list_messages read Lists message ids, recipients, attachment metadata, and previews
get_message read Reads one message body, bounded in size
create_draft draft Composes a new message or a threaded reply. It cannot transmit mail
send_message send Transmits a message, still subject to the inbox’s approval policy

A read grant sees four tools. Adding draft adds create_draft. Only a send grant sees send_message. Before the draft tool runs, the send scope is stripped from the calling principal, so draft access is not a side door into sending.

That filtering is the point of using MCP this way. A hostile email body is untrusted text in the model’s context. It can argue. It cannot invoke a tool the session never advertised.

Permission on the grant is only half of the control plane. Each inbox can also:

Approvals are a record with a lifecycle, not a label you invent in your own code. A held send expires if nobody acts on it (seven days in the current product). The decision is bound to the exact draft that was reviewed; if the body or recipients change, the approval does not apply to the new version.

For a support-triage agent, a typical setup is read and draft plus “ask me first.” For invoice intake that should never reply, use read only and do not grant send. For follow-ups to people you already know, you might grant send and restrict the allow list to one domain, with a daily cap.

If you call REST instead of MCP, send with an Idempotency-Key on every request that can transmit mail. The same key and the same body return the original result. A retry does not produce a second email. A key reused with a different body is a conflict, which is almost always a bug in the client.

Treat inbound mail, links, and attachments as untrusted data. Permissions come from the grant you configured, never from the text of a message. The product does not claim to be prompt-injection proof — that is why the approval queue exists.

list_inboxes only returns the inboxes you picked. If you want the worked quickstart, including client-specific setup steps, it lives in the Email for Agents docs. Read it, then run the first mail in test mode.

Aljay Miskino is VP of Partnerships at Email for Agents (emailforagents.ai).

── more in #ai-agents 4 stories · sorted by recency
── more on @email for agents 3 stories trending now
sponsored brought to you by zahid.host 4,200+ EU-deployed projects
reading about agents? ship yours in a single git push.

Run your AI side-project on zahid.host

EU-based hosting, git-push deploys, automatic HTTPS, no cold starts. Free tier with a custom domain — perfect for shipping the agent you just read about.

$git push zahid main
→ Live at https://your-agent.zahid.host ✓
Get free account → Pricing
from €0/mo · no card required
LIVE [news/give-an-ai-agent-a-r…] indexed:0 read:4min 2026-11-24 · —