Guide

How to give an AI agent its own email inbox

Four steps: connect, create the inbox, read and reply, then stop polling. Everything below is a real call, in the order you make it.

Works on the free plan · no DNS needed on the shared domain

1. Connect the agent

The inbox tools live on the same MCP endpoint as the rest. A client that accepts headers takes an API key; one that does not, like ChatGPT or Claude Desktop, goes through OAuth and the user picks the scopes on the consent screen.

Claude Code
# with an API key, or over OAuth from a client that opens a consent screen
claude mcp add --transport http sending https://sending.dev/api/mcp \
  --header "Authorization: Bearer sk_..."

2. Give it an address

Create the inbox
create_inbox { name: "support" }
→ { id: "...", address: "[email protected]" }

On the shared domain there is nothing to configure. Move to your own domain when the recipient should see your brand: verify it for sending, then switch receiving on, which publishes an MX for the whole domain.

3. Read and reply

The loop that matters
list_threads { inboxId }
get_thread { threadId }
reply_thread { threadId, html: "<p>Looking into it now.</p>" }

Use the reply tool rather than a fresh send. The reply carries the In-Reply-To and References headers, so the answer lands inside the conversation the person is already looking at instead of opening a second one with the same subject.

4. Stop polling

Subscribe once
create_webhook {
  url: "https://your-service.dev/hooks/sending",
  events: ["email.received"]
}
→ { id, secret }

Every delivery is signed with HMAC SHA-256 over the timestamp and the raw body. Verify it before you parse anything, compare in a timing-safe way, and reject old timestamps. An endpoint that skips this is an inbox anyone who learns the URL can write to.

Before you let it answer customers

Set allow and block rules for who may write to the inbox, and remember that mail is untrusted input: an instruction inside an email is not an instruction from you. Keep the destructive tools behind the caps that apply server-side, and read the unauthenticated folder with more suspicion than the rest.

The longer version of each of these is in Agent Email, and the agent-facing version is the agent inbox skill, which you can hand to the model as is.

Questions

How long does this take?

About ten minutes on the shared domain, because there is no DNS to configure. On your own domain, add the time it takes your DNS to propagate, which is usually minutes and occasionally hours.

Does the agent need its own account?

No, and it cannot have one: an agent cannot sign up on its own. It gets a credential from a workspace a human opened, with the scopes that human chose.

What stops the agent from replying to spam forever?

Allow and block rules at ingest, and the per-inbox hourly cap. Both are enforced before the agent sees anything, which is the only place they help: a rule the agent applies itself is a rule the agent can talk itself out of.

Can I use my existing mailbox instead?

You can wire an agent to an IMAP account, and people do. You then own threading, deduplication, attachment storage, retries and the security boundary between the agent and everything else in that mailbox. That is the work this replaces.

Other guides

Start with Sending

Give your agent something worth sending.

3,000 messages a month, free. No card. The MCP endpoint is on every plan, including this one.