AI agent signup test

Let an AI agent test your signup flow end to end

A coding agent can test a signup flow the way a person does. It opens the page, fills in the form, waits for the verification email and types the code. Playwright MCP gives the agent a browser, and the MailBots MCP server gives it an inbox on your own hostname, so nobody has to copy the code by hand.

Before you start

  • A MailBots trial, Starter or Pro plan. The trial gives you a ready hostname such as x7f3k2q9ab.trial.mailbots.top, with no card and no DNS.
  • An API key with the messages:read and domains:read scopes, created in Dashboard → Developer.
  • Claude Code, Cursor or another MCP client, and Node.js 18 or later for Playwright MCP.
  • The app you want to test, running locally or on a staging server that you own.

Connect both servers

Playwright MCP runs on your machine and drives a real browser. The MailBots server is hosted, so it only needs a URL and your key.

In Claude Code:

claude mcp add playwright npx @playwright/mcp@latest
claude mcp add --transport http mailbots https://api.mailbots.top/v1/mcp --header "Authorization: Bearer mb_live_REPLACE_ME"

In Cursor, add both to .cursor/mcp.json:

{
  "mcpServers": {
    "playwright": {
      "command": "npx",
      "args": ["@playwright/mcp@latest"]
    },
    "mailbots": {
      "url": "https://api.mailbots.top/v1/mcp",
      "headers": { "Authorization": "Bearer mb_live_REPLACE_ME" }
    }
  }
}

To share the setup with your team in Claude Code, commit a .mcp.json that reads the key from an environment variable, so the key itself never enters the repository:

{
  "mcpServers": {
    "playwright": {
      "command": "npx",
      "args": ["@playwright/mcp@latest"]
    },
    "mailbots": {
      "type": "http",
      "url": "https://api.mailbots.top/v1/mcp",
      "headers": { "Authorization": "Bearer ${MAILBOTS_API_KEY}" }
    }
  }
}
Note

Restart the client after you set MAILBOTS_API_KEY. A client that was already open does not see a new environment variable. In Claude Code, the /mcp command shows whether both servers are connected.

Ask the agent to sign up

Describe the flow and the rules in one prompt. The agent picks the tools itself.

Note

Test the signup flow at http://localhost:3000/signup. Call list_domains and use the active hostname. Sign up with a new address signup-<current time>@<hostname> and the password Test-Password-1. After you submit the form, call get_latest_otp for that address. If found is false, wait five seconds and try again, for up to one minute. Enter the code, then check that the dashboard shows the new account. If the email has a verification link instead of a code, read it with get_message and open the link. Report every step and anything that failed.

A new address on every run means an old message can never be mistaken for the new one. Every address under your hostname is accepted, so there is nothing to create in MailBots first.

What the agent does

  1. Calls list_domains and gets your hostname, for example x7f3k2q9ab.trial.mailbots.top.
  2. Calls browser_navigate to open the signup page, then browser_snapshot to read the form.
  3. Fills in the email and password with browser_type or browser_fill_form, then submits with browser_click.
  4. Calls get_latest_otp with the address. Until the email arrives it gets found: false and waits.
  5. Gets the code from the otp field, types it into the verification form and submits again.
  6. Takes a final browser_snapshot to confirm that the signup finished.

When the email has arrived, get_latest_otp returns the code with a summary of the message:

{
  "found": true,
  "otp": "847291",
  "message": {
    "id": "msg_049e0e73…",
    "to": "signup-1762600000@x7f3k2q9ab.trial.mailbots.top",
    "from": "noreply@example.com",
    "subject": "Your verification code",
    "otp": "847291",
    "receivedAt": "2026-11-08T11:18:17.131Z",
    "expiresAt": "2026-11-09T11:18:17.000Z"
  }
}

While nothing has arrived, it returns found: false with a hint to wait about five seconds and call again.

The MCP reference lists every tool.

Turn the run into a regression test

An agent is good at exploring a flow and finding where it breaks. For a check that runs on every pull request, ask the agent to write the run down as a Playwright test. The Playwright guide has a helper that waits for the code through the REST API, and the CLI reads codes in a GitHub Actions step.

Limits and safe use

  • Only test applications you own or are authorized to test. The acceptable use policy applies to agents as it does to people, and creating accounts on other companies' services is not allowed.
  • A CAPTCHA stops the agent, as it should. On staging, use the CAPTCHA provider's test keys instead of turning protection off in production.
  • The trial covers 500 messages, kept for 24 hours. Starter and Pro keep mail for 72 hours, as the pricing page shows.
  • Keep the API key in the client's configuration, never in a prompt. MCP tools can only read mail, so a leaked key cannot send or delete anything, but revoke it from the dashboard anyway.

Questions

Which agents can I use?

Any MCP client that supports remote servers over Streamable HTTP for MailBots and local servers for Playwright MCP. Claude Code and Cursor both do.

Does the agent need Playwright to read the code?

No. Playwright MCP is only for the browser. If the agent signs up through your API instead of the page, the MailBots server alone is enough.

Can I try it without a domain?

Yes. Start the 14-day trial and use the trial hostname it gives you. Your own subdomain goes live when you choose Starter or Pro.