MCP Email Server, Explained

By Denis · Published 18 Sep 2026. Updated 28 Sep 2026.

An AI agent can browse, call APIs and write code, but most of them cannot do one very ordinary thing: read email. Verification links, one-time codes, confirmation receipts and replies still decide how much of the web works, so an agent without a mailbox stalls exactly where humans used to. The Model Context Protocol is how that gap gets closed.

This article explains what MCP is in plain terms, what an "email server" means in that world, and how Tempx's own MCP server works, what it lets an agent do, how it stays safe, and where its limits are.

What the Model Context Protocol is

MCP is an open protocol for connecting tools to AI assistants. Instead of every app inventing its own plugin format, an app exposes a small set of named tools over one standard transport, and any MCP-capable client (Claude Code, Claude Desktop, ChatGPT connectors, or your own script) can list those tools and call them. The protocol handles the boring parts: discovery, typed arguments, structured results.

The mental model is a power socket. The client does not need to know how a tool is built; it needs the plug to fit. That is why one command can connect an assistant to a database, a browser, and a mailbox without three bespoke integrations.

Tempx speaks the streamable-HTTP flavour of MCP: one endpoint, https://tempx.uk/mcp, speaking JSON-RPC 2.0. Every request carries its own authorization, and there are no sessions to babysit, which suits agents that start, run and exit.

What an email server adds to an agent

Concretely, tools. A mailbox behind MCP stops being a web page and becomes callable functions: list what arrived, read one message, search by sender or subject, and (the one that matters most) wait for a message that matches a filter, blocking on the server until it lands or a timeout passes.

That wait primitive changes how agents verify things. Without it, an agent must poll in a loop: check, sleep, check again, burning tokens and time on the empty intervals. With it, the story is one call: "tell me when mail from noreply@example.com with 'verify' in the subject arrives, up to 60 seconds."

It also changes safety. The tools an agent gets can be limited to reading, with composing and sending granted separately, so you can hand out an inbox without handing over a mailgun.

How Tempx's MCP server is connected

There are two paths. If your client understands OAuth-style pairing (Claude Code, Claude Desktop, ChatGPT connectors), the client discovers Tempx, opens tempx.uk in your browser, and you approve the connection there: one inbox, one permission set, one expiry. No token ever gets pasted into a chat or config file:

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

For custom agents and automations, you mint a tmcp_ token from your Tempx account instead and send it as a static bearer header. Either way the credential is scoped server-side to exactly one disposable inbox (tool arguments can never widen that scope) and it can be revoked with one click from the account page.

The tool surface is deliberately small: list_inboxes and get_inbox for status, list_emails, get_email and search_emails for reading, wait_for_email for the blocking wait, plus two tools behind the optional "send" permission described below. Message bodies come back through the same sanitizer the web inbox uses, mail content is untrusted input, not instructions for the agent to obey.

The verification loop, end to end

The classic use is closing a signup loop. The agent fills a form with the paired inbox address, submits it, then blocks on the mail:

// the whole "check your inbox" step, server-side:
const hit = await tools.wait_for_email({
 from_contains: "noreply@newservice.example",
 subject_contains: "verify",
 timeout_seconds: 90,
});
// hit.email carries the message; read the code, enter it, done

Because the wait happens on the server, the agent spends zero cycles on sleep-retry loops and reacts the moment the message arrives, often well inside the validity window of a one-time code.

The same three tools cover the quieter jobs: confirm a receipt after a purchase flow, watch a test inbox during a migration, or let an automation react to a notification mail without anyone forwarding it by hand.

The send side is a trap, on purpose

Tempx's send_email tool does not deliver mail to the outside world. A composed message is captured into the connection's own inbox, exactly like a sandbox SMTP service such as Mailtrap, you can read back what "would have been sent", and no real recipient can ever receive it. There is no configuration in which the tool becomes a relay.

That constraint is what makes it reasonable to give an agent a send permission at all. Testing your app's outgoing templates through an agent (compose, capture, inspect) is a real workflow; emailing strangers is not one Tempx enables. The companion create_smtp_credential tool mints an SMTP credential for the same inbox, so classic mail libraries can play the same capture-only game.

The honest limits: this is for testing and automation around things you control. Using disposable inboxes to evade another service's signup rules is against Tempx's terms, and a private inbox's mail ages out fast, by default an hour for private boxes, seven days for named ones. Anything you must keep should leave the disposable world at once.

Choosing between pairing and static tokens

Both paths end at the same eight tools; the difference is who holds the secret and how it dies. Pairing suits interactive clients and humans: the credential lives in the client's store, approval happened in your browser, and the connection expires on the schedule you picked, nothing to paste, nothing to leak into a transcript. Static tmcp_ tokens suit headless automations: scripts, CI, servers, environments where no browser exists to approve anything, and where the token sits in a secret manager like any other credential.

The rule that keeps the choice honest: anything a human runs, pair; anything a machine runs, token, and tokens get named for their purpose and revoked when that purpose ends. The failure mode both paths share is forgetting: an old connection reading an inbox nobody remembers. The quarterly minute spent listing active connections and killing the purposeless ones is the entire maintenance cost of the pattern.

Rate limits and the polite client

The MCP surface is bounded like any API, and the bounds are shaped for the blocking-wait pattern rather than against it. Because wait_for_email parks server-side, a well-behaved agent makes few requests (one wait covers what a naive poller would spend dozens of reads on) and the per-connection limits comfortably serve that rhythm. The patterns that brush the ceilings are the pathological ones: parallel waits on the same inbox from a fan-out, or a client that polls despite having a wait primitive.

The polite-client rules fit in a line: wait instead of poll, one waiter per inbox, back off on any rate-limit response rather than retrying at speed, and treat a 401 as a revoked credential (revoke-and-reissue) rather than a transient error to hammer. Clients built that way never see the limits as a constraint, which is the sign the API's shape matches the workload.

Drafted with AI assistance and reviewed against Tempx's editorial rules (no invented statistics, no competitor claims).

Related: The MCP integration guide · Making an AI agent receive email · Testing email with SMTP and MCP · Email for AI agents, product overview

Create a temporary email address

Free, instant, no sign-up, messages auto-delete.

Go to your inbox