• CLEAN
  • READY
  • ACTIVE
  • HUMAN

How to automate sandbox testing workflows with your AI

Connect Mailtrap to your agent to handle the repetitive parts of email testing. It manages your sandboxes and keeps your test data organized.

Ask AI about this page

Short answer

How can I use AI to automate my Mailtrap sandbox testing?

Your agent uses Mailtrap tools to find available sandboxes, fire off test emails, and clear out old messages once a test run finishes. This keeps your testing cycles predictable and your inboxes empty. You get a clean slate for every test run.

Testing outcomes

Clean testing environments

What happens when your agent runs a test cycle.

CLEAN

Empty inboxes

The agent clears out old test data so you don't have to hunt through stale emails. You always start with a fresh environment.

READY

Sandbox availability

The agent identifies which sandboxes are ready for use. You won't waste time trying to send mail to an inactive environment.

ACTIVE

Email delivery

The agent sends the specific test payloads you need. It handles the actual transmission to the sandbox targets.

HUMAN

Manual review

You decide when a test passes or fails. The agent handles the plumbing, but you keep control over the final validation.

The workflow

What your AI does when the test starts.

The agent takes over the repetitive tasks of environment management and message delivery.

  1. Locate sandboxes

    The agent checks your Mailtrap account to see which sandboxes are available for the current test run.

    list_sandboxes
  2. Send test mail

    Once a target is identified, the agent sends the test email directly to the sandbox address.

    send_test_email
  3. Verify delivery

    The agent confirms the email reached the destination before moving to the next step.

    send_test_email
  4. Wipe environment

    After the test is complete, the agent empties the inbox to prevent data overlap in the next run.

    clear_sandbox_inbox

Try it

Copy these to start.

Use these prompts to kick off your testing automation.

Starting points

Swap out the bracketed info for your specific sandbox names or email addresses.

Mailtrap Connector

You're all set. Choose your MCP client and follow the setup instructions.

Connector linkhttps://edge.vinkius.com/vk_preview_Ad5Juop0aQx2ay54WiDoJvVK7YtPyDjMRVyTPy0Y/mcp

Claude Desktop

Follow the steps below to connect in seconds.

  1. 1In Claude Desktop, open Settings → Connectors.
  2. 2Click “Add custom connector” and paste the connector link above as the remote MCP server URL.
  3. 3Click Add and start a new chat — Mailtrap capabilities are ready to use.
Configuration · claude_desktop_config.jsonCopy
{
  "mcpServers": {
    "mailtrap-mcp": {
      "url": "https://edge.vinkius.com/vk_preview_Ad5Juop0aQx2ay54WiDoJvVK7YtPyDjMRVyTPy0Y/mcp"
    }
  }
}
Copy into chat04
  • List all my Mailtrap sandboxes so I can pick one for testing.

  • Send a test email to the 'staging-sandbox' with the subject 'Health Check'.

  • Clear the inbox for the 'qa-testing' sandbox after I finish this run.

  • Find an available sandbox and send a test email to it.

  • Claude
  • ChatGPT
  • Cursor
  • VS Code
  • Windsurf
  • Claude Code
  • JetBrains
  • Cline

Start here

Connect Mailtrap once, then ask.

You only need to link your account once. Your credentials stay encrypted, and you can immediately start giving commands to your agent.

Connect Mailtrap to your AI

FAQ

How the Mailtrap Connector behaves

  • 01

    Can the AI delete my entire Mailtrap account?

    No. The agent only has permission to list sandboxes, send emails, and clear inboxes.

  • 02

    Will the AI clear my production inboxes?

    No. The agent can only clear inboxes for the sandboxes it can access through the provided tools.

  • 03

    Does the agent decide if a test passed?

    No. The agent performs the actions, but you are responsible for inspecting the results and deciding if the test was successful.

  • 04

    Can I use this to send real emails to customers?

    No. This connector is designed for sandbox testing environments, not for sending mail to real users.

  • 05

    How does the agent know which sandbox to use?

    You tell the agent which sandbox to use in your prompt, or it can find one using the list tool.

  • More questions about Mailtrap? The Connector page answers them. See everything the Mailtrap Connector can do

Connect Mailtrap to Claude, Cursor, ChatGPT & more