How to Test Sign-Up Flows with a Temp Mail MCP Server and Playwright
A temp mail MCP server lets an AI coding agent create a disposable inbox and read what arrives in it. Paired with Playwright, that turns a manual sign-up test into one you can ask an agent to run and report back on.
Quick access
What a Temp Mail MCP Server Adds to Playwright Testing
Playwright can submit the sign-up form, but your test still needs a way to access the confirmation email that arrives afterward. A temp mail MCP server fills that gap: it gives an MCP-compatible agent (Claude Code, for example) tools to create a disposable address, wait for a message to land in it, and return that message's text, links, and any verification code. The agent can create the address before the test starts, hand it to Playwright for the form, then read the resulting email once Playwright submits.
Tmailor runs an MCP server for exactly this: creating receive-only temporary addresses and reading the email they receive for testing sign-up, invite, and password-reset flows you own.
What the Tools Actually Do
Tmailor's MCP server exposes a small set of tools, not a general inbox API. The read-only ones are account_status, list_domains, list_mailboxes, and list_messages. The ones that change state are create_mailbox, wait_for_message (which blocks until a message arrives or a timeout passes), read_message (plain text or the original HTML), and delete_mailbox. There's no tool to send mail: a Tmailor address only ever receives.
The hosted server requires an active paid API plan and supports OAuth sign-in in compatible clients or an API key in the authorization header. The open-source local server runs with uvx tmailor-mcp on any plan, including Free; it reads an API key from an environment variable, and Free-plan users need to allowlist the calling computer's IP. Either way, the agent only reaches addresses and messages belonging to the Tmailor account it's connected to.
A Practical E2E Flow: Agent Creates the Inbox, Playwright Drives the Browser
The useful split of labor is this: the MCP server manages the inbox, Playwright manages the browser, and the agent coordinates both. A typical run looks like this:
Step 1: Create a disposable address before the test starts
Ask the agent to create a mailbox. It calls create_mailbox and gets back a working address with nothing in it yet.
Step 2: Hand that address to Playwright
Pass the address into your existing Playwright script as the email field value, the same way you'd use any test fixture. Playwright fills the sign-up form and submits it against your own app.
Step 3: Wait for the confirmation email
The agent calls wait_for_message on the address; the call blocks until your app's confirmation or OTP email arrives or a timeout is hit. This replaces a human tester checking an inbox and copying out a code.
Step 4: Read the message and finish the flow
read_message returns the email as plain text or original HTML, so the agent can extract a verification link or code. Depending on what the test needs, it can hand that back to Playwright to click the link or type the code and complete the sign-up, or it can simply confirm the email's subject, sender, and wording matched what the test expected.
Step 5: Delete the address when the test is done
delete_mailbox removes the address. Messages clear after about 24 hours, but the address itself remains in your account until you delete it.
Setting Up an MCP Client for This
Connect an MCP-compatible agent the same way you'd add any other MCP server: point it at the hosted endpoint and sign in with OAuth or an API key, or run the local open-source server and point the agent at that instead. The Temp Mail API page explains both connection methods, their prerequisites, and example client configuration, with links to further setup and API documentation for teams that want to call it directly instead of through an agent.
What This Setup Isn't For
This is built for testing sign-up, invite, and password-reset flows on apps you own or are authorized to test, not for creating accounts on someone else's service without permission or at a scale meant to evade their signup limits. A Tmailor address can't send mail, so it won't stand in for a real user replying to anything. Messages clear after about 24 hours, so it isn't a place to park a long-running test account, and if a test needs to receive mail at a stable address for weeks, a real mailbox fits better than a disposable one.
Frequently Asked Questions
Short answers about connecting a temp mail MCP server to an agent-driven Playwright test.
Do I need a paid plan to use the MCP server?
A paid API plan is required for the hosted endpoint. The local server works on the Free plan too, but it still needs an API key and, on Free, an allowlisted calling IP.
Can this test a mobile app's sign-up flow, not just a web page?
Playwright drives a browser, so it fits a web sign-up form directly. For a mobile app, the MCP server (or the REST API/SDK it's built on) can still create the address and read the confirmation email; you'd pair it with your mobile test framework instead of Playwright for the UI side.
Can I use this to test or create accounts on a site that isn't mine?
It's meant for sign-up flows you own or have permission to test, not for automating account creation on someone else's service without authorization.
What happens if the confirmation email never arrives?
wait_for_message returns a timeout if no message arrives within the configured wait, rather than hanging indefinitely, so a test can report a missing email instead of stalling. Check that your app actually sent the message to the generated address and that your test environment allows mail to that recipient domain, then check the timeout and retry policy.
The Short Version
A temp mail MCP server doesn't replace Playwright; it fills the one gap a browser test can't cross on its own: reading what your app sends back after a form submits. For a sign-up or password-reset test you already run with Playwright, adding an agent that creates the address and reads the confirmation turns a flow that needed a human watching an inbox into one you can ask an agent to run end to end.

Jordan Mills has covered disposable email, OTP delivery and online privacy since 2018. He writes Tmailor's guides on staying anonymous, avoiding spam, and getting verification codes to land every time.