MCP server
Send and inspect test email from Cursor, Claude and any MCP client

MCP (the Model Context Protocol) is how AI coding agents like Cursor and Claude call external tools. Point one at MailSandbox and it can send a test email, read what landed in an inbox and check it for problems — all from inside your editor, without you switching to the dashboard.

What it does

Once connected, your agent gets a set of tools for one inbox. Ask it to send a test email and it does. Ask what your app just sent and it lists the messages, opens one, and reads the HTML back to you. It can also run the spam and HTML compatibility checks so you catch issues while you are still writing the code that sends the mail.

It works with any MCP client — Cursor, Claude, VS Code and others — because MailSandbox exposes a standard MCP endpoint over HTTPS.

Connect your client

Open the inbox, click "Configuration" and copy the API key (it starts with "ms_") from the "Connect to Cursor & Claude" panel. That key is what scopes the connection to your inbox — see inboxes for where credentials live.

Add this to your client's MCP config. In Cursor that's ~/.cursor/mcp.json:

{
  "mcpServers": {
    "mailsandbox": {
      "url": "https://mailsandbox.com/mcp/sandbox",
      "headers": {
        "Authorization": "Bearer ms_your_inbox_api_key"
      }
    }
  }
}

Reload your client and MailSandbox shows up in its tool list. Some older clients only speak stdio and can't call a URL directly — bridge those with mcp-remote:

npx -y mcp-remote https://mailsandbox.com/mcp/sandbox \
  --header "Authorization: Bearer ms_your_inbox_api_key"
The tools

Your agent picks the right tool for what you ask. There are five:

  • send-email — send a test email into the inbox. Give it a subject, sender, recipients and an HTML or plain-text body.
  • list-messages — list recent messages, newest first. Filter by a search term or show only unread.
  • get-message — read one message in full: HTML, plain text, headers, attachments and, if you ask, the raw source.
  • analyze-message — run the spam score and HTML compatibility checks on a message and get the score plus what it triggered.
  • delete-message — remove a message from the inbox once you are done with it.
A typical flow

Say you just wrote a welcome email in your app. You can ask your agent, in plain language:

Send a test welcome email to jane@example.com,
then check it for spam and rendering issues.

The agent calls send-email, then analyze-message, and reports the score back with anything worth fixing — before that email ever goes near a real recipient. A minute later you can ask it to read the message back and confirm the copy looks right.

Scope & safety

The API key identifies a single inbox, so every tool call only ever touches your inbox — your agent can't see anyone else's email. And like everything in MailSandbox, mail sent through the MCP is captured, never delivered, so you can use any recipient address you like for testing.

Prefer plain HTTP?
The MCP tools sit on top of the same capture engine as the API. Use whichever fits your workflow — or both.