Let AI agents test emails

Our MCP server lets your agent create test addresses and read the codes and links in your test emails. Sign in with your browser, no API key.

Connect your agent

Server URL
https://api.testmail.app/mcp
  1. Run this in your terminal:
    Terminal
    claude mcp add --transport http testmail https://api.testmail.app/mcp

    Add --scope user to use it in all your projects.

  2. Start Claude Code (or restart it), type /mcp, select testmail, then Authenticate.

    Or sign in from your terminal: claude mcp login testmail

Or in the VS Code extension:

Type /mcp and click Add server. Name it testmail, choose HTTP (remote), paste the URL above and click Add server. Then click Authenticate, and start a new conversation: the tools load there.

Then ask your agent "Who am I on testmail.app?" It answers with your account's email.

Example session
  1. Test the signup on my app with a new testmail.app address and verify the email.
  2. testmail_generate_test_addressab12cd.signup-7f3e2a…@inbox.testmail.app
  3. Signed up with that address.
  4. testmail_get_verificationCode 482913, from an email that arrived after 4 seconds
  5. Entered the code. The account is verified.
interacjohnsoncontrolsapolloverorbimercksalesforceworkdayatlassianpbstoyotaadobemediumcartaoptimizelysapxeroxassabloyenvatophilipstransunioninteracjohnsoncontrolsapolloverorbimercksalesforceworkdayatlassianpbstoyotaadobemediumcartaoptimizelysapxeroxassabloyenvatophilipstransunion

Let your agent set it up

Paste this prompt into Claude Code or Codex

Prompt
Set up the testmail.app MCP server in this agent, so you can read my test emails while we test my app.
It's a remote server at https://api.testmail.app/mcp with no API key: I sign in to testmail.app in my browser.

1. First check whether it's already set up: claude mcp list in Claude Code (a claude.ai connector for testmail.app counts too), or codex mcp list in Codex. If one already uses https://api.testmail.app/mcp as its URL, don't add another: if it shows Connected (Claude Code) or OAuth under Auth (Codex), skip to step 4; if it's turned off, tell me how to turn it on; otherwise go to step 2. If testmail is there with another URL, ask me before changing it. Otherwise add it with your own command, not by editing config files:
   - Claude Code: claude mcp add --transport http testmail https://api.testmail.app/mcp
   - Codex: codex mcp add testmail --url https://api.testmail.app/mcp
   - Another agent: tell me where to add the address in your settings, then stop.

2. Then ask me to sign in. Don't try it yourself: it needs me, in the app and in my browser.
   - Claude Code: I type /mcp, choose testmail, then Authenticate. If it isn't listed (this chat started before it was added), I run claude mcp login testmail in my own terminal.
   - Codex: your add command may already have started the sign-in: it opens my browser or prints a link. If it did, tell me, give me the link if there is one, and wait while I finish. If it didn't, or that sign-in ends without success, ask me to run codex mcp login testmail in my own terminal.
   testmail.app opens in my browser; I sign in (or sign up) and click Allow.

3. Never ask me to paste a password, sign-in code, link or API key into this chat, and never sign in or click Allow for me.

4. When I say I'm done, check it: claude mcp get testmail says Connected (Claude Code), or codex mcp list shows OAuth under Auth for testmail (Codex). Then tell me to start a new chat so the testmail tools load; testmail_whoami there shows the account.

How it works

1. Add the URL

Add the server URL to your agent with its own command, or paste it into its settings.

2. Sign in

testmail.app opens in your browser. Sign in (or sign up for free), and then click Allow.

3. Start testing

Ask your agent to test a signup. It creates the address and reads the email for you.

What to ask your agent

Test a signup

Sign up on my app with a new testmail.app address and verify the account.

Test a password reset

Request a password reset for my test user, then follow the reset link from the email.

Check your inbox

Did I get any emails in the last 10 minutes?

Read recent emails

Read me the last 3 emails in my test inbox.

Tools your agent gets

All six are read-only

Generate an address
Creates an email address in one of your namespaces. testmail_generate_test_address
Get a code or link
Finds the verification code or link in your newest emails. testmail_get_verification
Read emails
Reads the emails in one of your namespaces. testmail_get_emails
List namespaces
Lists the namespaces you can use. testmail_list_namespaces
Who am I
Shows which account your agent is signed in as. testmail_whoami
About
Gets information about testmail.app. testmail_about

Get started with our free forever plan

No credit card required.

FAQ

What is an MCP server?

MCP (Model Context Protocol) is an open standard for connecting AI apps to outside tools. With our MCP server, agents like Claude Code or Codex can create addresses in your namespaces and read the emails in your test inboxes.

Do I need to add my API key to my AI agent?

No. Your agent signs in to your testmail.app account with OAuth. On our side, we use your API key to read your test inboxes.

Which AI agents are supported?

Any agent that supports remote MCP servers with OAuth should work, including Claude Code, Claude, Codex, Cursor and VS Code.

What can my AI agent do with my testmail.app account?

It can create addresses in your namespaces and read the emails in them. The tools are read-only: your agent can't change your account, manage your API keys or send emails.

Will usage through an AI agent count towards my plan's limits?

Reading emails counts towards your plan's API request limits, the same as a request to our JSON or GraphQL API. Generating addresses doesn't.

I signed in with the wrong testmail.app account. What now?

Click Cancel on the Allow page. Sign out of testmail.app, sign in with the right account, then connect again from your agent.

How can I disconnect my AI agent?

Remove testmail.app from your agent: in Claude Code, run claude mcp remove testmail; in Codex, run codex mcp logout testmail, then codex mcp remove testmail. If you added it in Claude or claude.ai, remove it in Customize > Connectors; that also removes it from Claude Code. For security, an agent's access also ends after 30 days. To keep using it after that, sign in again from your agent (in Claude Code: /mcp, then Authenticate).