saci.cc
← Blog

Claude Code testing your app's sign-up, email included

An AI agent with a browser and an email inbox can do what QA does on a sign-up flow: open the page, fill in the form, wait for the email, type the code and check that everything worked. And at the end, turn what it did into an automated test. This post shows how to set that up in Claude Code with two MCP servers, Playwright's for the browser and saci.cc's for email, and which prompts work well.

The MCP post explains the saci.cc server and its tools. Here the focus is using it to test your own app.

Both servers in the project

Create a free key on your account page, ideally one just for the agent, and put it in the SACI_API_KEY variable. Then, at the project root, create .mcp.json:

{
  "mcpServers": {
    "playwright": {
      "command": "npx",
      "args": ["@playwright/mcp@latest"]
    },
    "saci": {
      "type": "http",
      "url": "https://saci.cc/api/mcp",
      "headers": {
        "Authorization": "Bearer ${SACI_API_KEY}"
      }
    }
  }
}

Claude Code replaces ${SACI_API_KEY} with the environment variable's value, so the file can go in the repository without the key, and everyone on the team uses their own. On the Team plan, inboxes one person's agent creates are visible to the whole team.

Open Claude Code in the project, approve both servers and run /mcp to check they're connected.

A first prompt

With the app running locally or on staging:

Test sign-up at http://localhost:3000/signup:
1. Create a saci.cc inbox and sign up with it.
2. Get the verification code that arrives and finish signing up.
3. Tell me how long the email took, who sent it, what the subject was and whether the code worked the first time.
If anything fails, take a screenshot and show me the error.

The agent calls create_inbox, uses Playwright to fill in the form, calls get_verification_code and types the code. If the email takes longer than 25 seconds, the tool says so and it waits again.

Ask it to look at what a test doesn't

An automated test checks what you told it to check. An agent can read the email the way a person does:

Sign up again with a new inbox, but this time open the whole email with get_email and check:
- that the subject and text are in English and have no placeholders like {{name}};
- that every link points to our domain, not localhost or staging;
- that the code in the email is the one the page accepts;
- that the old code stops working after asking for a new one.
List what you found, most serious first.

You can do the same with password reset, email change or inviting someone: any flow that goes through an email.

A command to repeat it

Prompts you repeat become Claude Code commands. Save this as .claude/commands/test-signup.md:

Test the sign-up flow at $ARGUMENTS (default: http://localhost:3000/signup).
Always use a new saci.cc inbox, never a real email.
Sign up, confirm with the code and check the whole email: language,
placeholders, link domains and whether the old code is refused.
Finish with a list of the problems found and screenshots of errors.

Then /test-signup https://staging.your-app.com/signup runs it all again, for example before a deploy.

It's also worth a line in the project's CLAUDE.md, so the agent uses saci.cc whenever a flow needs email, even when you don't ask:

To test any flow that sends email, create an inbox with the saci.cc MCP server. Never use real email addresses.

From exploratory test to regression test

Once the flow works, ask for it as code:

Now write a Playwright test in tests/signup.spec.ts that does the same sign-up, using the saci.cc npm package (createInbox and waitForCode). Run it and fix it until it passes.

The test uses the same key, through SACI_API_KEY, and runs in CI without an agent. The Playwright guide shows what to expect, and the Cypress one the equivalent for Cypress.

Things to watch

  • Test locally or on staging. An agent signing up on production pollutes your database and metrics.
  • CAPTCHA blocks the agent. Turn it off in the test environment or use your provider's test keys.
  • Inboxes are private for 7 days on Free, and emails disappear about a day after arriving. Don't use these accounts for anything that needs to last.
  • The limit is per account. The agent shares Free's 120 requests per minute with your scripts. A separate key for it doesn't raise the limit, but makes it easy to see its usage and revoke it.

In short

  • Put the Playwright and saci.cc MCP servers in the project's .mcp.json, with the key in ${SACI_API_KEY}.
  • Ask for the full sign-up and then a critical read of the email: language, links, placeholders, old code.
  • Save prompts you repeat in .claude/commands/ and a rule in CLAUDE.md.
  • When it's right, ask for the Playwright or Cypress test with the saci.cc package to run in CI.