Illustration: a friendly robot with an envelope arriving from above

Make Your AI Agent Receive Email

Most agent workflows hit the same wall: the agent can fill in a signup form, but the verification code lands in an inbox only you can read. So you end up as the human middleware — watching your own inbox, copying six digits, pasting them back into the chat. There is a cleaner split: give the agent an inbox of its own, one it can read but never abuse. Tempx ships exactly that as a read-only MCP server, and this guide wires it up end to end.

What you will end up with

Your agent gets six tools — list_inboxes, get_inbox, list_emails, get_email, search_emails and wait_for_email — scoped to one disposable inbox. It can watch for a code, read the message, and hand you the link. It cannot send mail, delete anything, touch your other inboxes, or spend a cent: the whole surface is read-only by design. If you are new to why an agent should have an inbox at all, start with Give Your Email to Your AI Agent; this article is the hands-on version.

Step 1 — Create the inbox

Open the Tempx mail app and generate an address. No signup, no password — the inbox exists the moment you load the page. This is the address your agent will use for signups from now on. Send it a test email if you want to watch messages arrive in real time.

Step 2 — Keep it (claim it to an account)

A raw inbox lives in your browser and expires with it. Press Keep this inbox and sign in with Google: the inbox is claimed to your account, survives across devices, and becomes something you can grant API access to. Claiming is one click and needs no password — the Google flow is enough.

Step 3 — Create an MCP connection

On your account page, scroll to MCP Connections and create one for the inbox you just kept. Two things happen: you pick a scope and expiry, and the server mints a token like tmcp_…. The token is shown exactly once — only a hash of it is stored server-side, so a screenshot now saves regret later. Each connection is limited to a single inbox, so a token for your agent's inbox can never read your personal one.

Step 4 — Point your client at it

Tempx speaks MCP over streamable HTTP with Bearer auth, which every current client understands. Drop this into your client's MCP config, replacing the placeholder with your token:

{
  "mcpServers": {
    "tempx": {
      "url": "https://tempx.uk/mcp",
      "headers": { "Authorization": "Bearer tmcp_YOUR_TOKEN_HERE" }
    }
  }
}

Reload the client and the six tempx tools appear next to your others. That is the entire installation.

Step 5 — Let the agent wait for mail

The tool that changes workflows is wait_for_email: it long-polls server-side and returns the moment a matching message arrives, instead of spamming refresh. Try a prompt like:

Sign up on example.com using the tempx inbox, then call wait_for_email for a message from example.com and read me the verification code.

The agent fills the form, waits, reads the code, and continues — no human in the loop. You can narrow the wait with from_contains or subject_contains, and set timeout_seconds (5–175) so a missing email fails fast instead of hanging.

What the agent can and cannot do

Keeping it tidy

Treat the connection like the inbox itself: disposable. Give a short-lived token to a one-off automation, revoke it when the task is done, and mint a fresh one next time. Verification mail is exactly the kind of message that should die young — the inbox auto-deletes on its retention schedule, and the token's hash dies with the connection.

Give your agent an inbox

Inbox, account, token, working agent — about five minutes, all free.

Create an inbox