Give your AI agent an inbox

This is the practical setup guide. If you want the reasoning — why agents need their own mail, what agent-grade email should look like — read Email for AI Agents first. Here we do the wiring: pair an MCP client, wire the verification loop, and hand the agent a safe way to send.

One command for Claude Code

Claude Code, Claude Desktop and any OAuth-capable MCP client pair through the browser. Add the server:

claude mcp add --transport http tempx https://tempx.uk/mcp

The first time the agent uses it, your browser opens tempx.uk: you sign in, pick one inbox, choose permissions (read/search/wait, optionally send) and an expiry, and approve. No token is ever pasted into a chat or shell — the agent receives a scoped credential, and you can revoke it in one click from your account.

Other MCP clients and automations

Any client that speaks streamable HTTP can connect directly. Preferred auth is the same browser pairing (the server advertises /.well-known/oauth-protected-resource); for custom automations a static tmcp_ token works as a Bearer header:

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

The loop that matters: wait_for_email

Verification codes are the reason most agents get an inbox. Instead of sleep-and-retry polling, Tempx exposes a blocking tool — the request hangs on the server until a matching message arrives (5–175 s window) and then returns it. An agent session looks like:

# the agent's plan, in plain steps:
# 1. fill the signup form with agent-inbox-9c4@tempx.uk
# 2. submit
# 3. call wait_for_email(from="noreply@example.com", since="2 minutes ago")
# 4. read the 6-digit code from the message text
# 5. fill the code into the form, submit, confirm success

Between waits, list_emails and search_emails cover catch-up reads, and get_email returns the full message body — useful when the code sits further into the text than the API preview reaches.

When the agent needs to send

Agents testing outgoing mail use the send_email tool, or mint their own SMTP credentials with create_smtp_credential and talk to smtp.tempx.uk:587 like any mail server. Both are capture-only: the message is stored in the agent's own inbox with its original To/Cc intact, and nothing is relayed to the real world — a test run can never email a real person.

Ground rules baked into the design

Pair your agent now

One command for Claude Code, one connector for ChatGPT and Z.ai — approve one inbox and you are done.

Connect your agent

Related