{"slug": "give-an-ai-agent-a-real-email-inbox-over-remote-mcp-with-human-approval", "title": "Give an AI Agent a Real Email Inbox over Remote MCP (with Human Approval)", "summary": "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.", "body_md": "**By Aljay Miskino, VP of Partnerships at Email for Agents**\n\nIf 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.\n\nThis 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](https://emailforagents.ai/docs/quickstart), where I work. The same design questions apply if you build the mailbox yourself.\n\nSign in to the console, create a project, and create an inbox in it. The address you get depends on the project’s environment:\n\n`.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.\nDo the first end-to-end test in a test project. If the agent tries to send to a real person, the message cannot leave.\n\nThe MCP endpoint is:\n\n```\nhttps://mcp.emailforagents.ai/mcp\n```\n\nPaste 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:\n\nThe 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.\n\nNo 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.\n\nThe server exposes six tools. A tool the grant does not cover is omitted from `tools/list`, not merely refused at call time.\n\n| Tool | Needs | What it does | \n|---|---|---|\n| `list_inboxes` | read | Lists the inboxes this grant covers | \n| `list_threads` | read | Lists conversations in one inbox | \n| `list_messages` | read | Lists message ids, recipients, attachment metadata, and previews | \n| `get_message` | read | Reads one message body, bounded in size | \n| `create_draft` | draft | Composes a new message or a threaded reply. It cannot transmit mail | \n| `send_message` | send | Transmits a message, still subject to the inbox’s approval policy | \n\nA `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.\n\nThat 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.\n\nPermission on the grant is only half of the control plane. Each inbox can also:\n\nApprovals 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.\n\nFor 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.\n\nIf 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.\n\nTreat 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.\n\n`list_inboxes` only returns the inboxes you picked.\nIf you want the worked quickstart, including client-specific setup steps, it lives in the [Email for Agents docs](https://emailforagents.ai/docs/quickstart). Read it, then run the first mail in test mode.\n\n*Aljay Miskino is VP of Partnerships at Email for Agents (emailforagents.ai).*", "url": "https://wpnews.pro/news/give-an-ai-agent-a-real-email-inbox-over-remote-mcp-with-human-approval", "canonical_source": "https://dev.to/emailforagents/give-an-ai-agent-a-real-email-inbox-over-remote-mcp-with-human-approval-3kgb", "published_at": "2026-11-24 06:07:55+00:00", "updated_at": "2026-11-24 06:12:41.644370+00:00", "lang": "en", "topics": ["ai-agents", "agent-protocols", "ai-tools", "ai-safety"], "entities": ["Email for Agents", "Aljay Miskino", "Claude Code", "Claude Desktop", "Cursor", "MCP"], "also_reported_by": [], "takeaway": "Scope MCP tool exposure to the OAuth grant so uncovered tools are omitted from tools/list rather than refused at call time, and strip the send scope before the draft tool runs so drafting cannot become a side door to sending.", "recommendation": {"advice": "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.", "playbook": "agent-security", "playbook_url": "https://wpnews.pro/playbooks/agent-security"}, "alternates": {"html": "https://wpnews.pro/news/give-an-ai-agent-a-real-email-inbox-over-remote-mcp-with-human-approval", "markdown": "https://wpnews.pro/news/give-an-ai-agent-a-real-email-inbox-over-remote-mcp-with-human-approval.md", "text": "https://wpnews.pro/news/give-an-ai-agent-a-real-email-inbox-over-remote-mcp-with-human-approval.txt", "jsonld": "https://wpnews.pro/news/give-an-ai-agent-a-real-email-inbox-over-remote-mcp-with-human-approval.jsonld"}}