Provider REST API

Communication

Connect Claude to Mailtrap

Send transactional email, catch test email in sandboxes, and read delivery logs, stats and suppressions. Toolspoke puts 17 of its actions behind one MCP endpoint that Claude, Cursor, and Codex all speak.

Connection
Provider REST API
Authentication
API token
Actions exposed
17
What a call bills
Nothing
Adapter
Maintained by Toolspoke

Connected in three steps

  1. 1

    Install Mailtrap

    Open the marketplace in your workspace, add Mailtrap to the project your agents work in, and it appears on the gateway immediately.

  2. 2

    Connect the credential

    Authenticate with api token. Where to get one, and what it has to be able to reach, is the next section.

  3. 3

    Point your agent at the gateway

    Give your client one address, https://toolspoke.com/mcp. Claude Code takes it as a command, Claude and Claude Desktop add it as a custom connector, and Cursor, Codex and VS Code each read it from a config file of their own.

.mcp.json
{
  "mcpServers": {
    "toolspoke": {
      "type": "http",
      "url": "https://toolspoke.com/mcp"
    }
  }
}

One block covers every tool you have installed. Mailtrap shows up in the client as soon as your policy allows it, and so does everything else you install later.

Where the address goes, per client

Claude Code

Run it in your project, then /mcp to sign in

claude mcp add --transport http toolspoke https://toolspoke.com/mcp
Claude and Claude Desktop

Settings, then Connectors, then Add custom connector

https://toolspoke.com/mcp
Cursor

~/.cursor/mcp.json, or .cursor/mcp.json for one project

{ "mcpServers": { "toolspoke": { "url": "https://toolspoke.com/mcp" } } }
Codex

~/.codex/config.toml

[mcp_servers.toolspoke]
url = "https://toolspoke.com/mcp"
VS Code

.vscode/mcp.json, or the MCP: Add Server command

{ "servers": { "toolspoke": { "type": "http", "url": "https://toolspoke.com/mcp" } } }

What Mailtrap asks for

API token. You provide it once, when you install the connector. Toolspoke encrypts it at rest and decrypts it only for the length of a single call, and the gateway attaches it to the outbound request itself, so it is never part of the arguments an agent sends.

API tokenRequired
Mailtrap → Settings → API Tokens → Add Token. Give it access to the sending domains you send from and the sandboxes you test with; a token only sees the domains, projects and sandboxes it was granted.
a1b2c3d4e5…

What Claude can do in Mailtrap

17 actions, each one declared and named by the connector rather than discovered at runtime. A workspace policy grants a person all of them, a hand-picked selection, everything on the read side, everything on the write side, or none.

Reads
12Reads
Writes
1Writes
Destructive
4Destructive

Reads

12

Fetches data and changes nothing.

  • list_sandboxes

    List every sandbox (test inbox) the token can reach, across projects, with its id and message counts. The sandbox id is what every other sandbox operation takes.

  • list_sandbox_messages

    List the messages caught in one sandbox, newest first, with subject, sender, recipients and size.

  • get_sandbox_message

    Read one caught message's details - headers summary, recipients, size, and links to its HTML, text and raw bodies.

  • get_sandbox_spam_report

    Read the SpamAssassin report for one caught message - the overall score and each rule that fired.

  • get_sandbox_html_analysis

    Read the HTML compatibility analysis for one caught message - which elements and CSS each email client does not support.

  • list_sending_domains

    List the sending domains with their DNS verification and compliance status. Takes no arguments and reads real account data, so it is what an install tests itself with - and an unverified domain is the usual answer to why a send was rejected.

  • get_sending_domain

    Read one sending domain, including the DNS records Mailtrap expects and whether each one is verified.

  • list_email_logs

    List sent messages with their delivery status, newest first - the place to look when someone says an email never arrived. Paged by cursor.

  • get_email_log

    Read one sent message's log entry and its event history - delivery, opens, clicks, bounces.

  • get_sending_stats

    Aggregate sending stats for a date range - delivered, bounced, opened, clicked and spam counts and rates, the same numbers as the Stats dashboard.

  • list_suppressions

    List suppressed addresses - hard bounces, spam complaints and unsubscribes Mailtrap will not send to.

  • list_templates

    List the email templates on the account, with the uuid send_email takes as template_uuid.

Writes

1

Creates or updates something on the other side.

  • send_sandbox_email

    Send one email into a Mailtrap sandbox instead of to its recipients. A write rather than destructive: the message is caught in the sandbox and reaches nobody, which is the point - use it to check how an email renders, scores for spam and validates before send_email. Same body fields as send_email.

Destructive

4

Deletes or permanently alters something. Worth granting on purpose.

  • send_email

    Send one email through Mailtrap's transactional stream. Destructive: it delivers to real inboxes, cannot be recalled, and counts against the plan's sending quota. from must be on a verified sending domain. Supply text, html, or both - or template_uuid with template_variables instead of a body. To try an email without sending it, use send_sandbox_email.

  • delete_sandbox_message

    Delete one caught message from a sandbox. There is no undo.

  • clean_sandbox

    Delete every message in a sandbox at once. Destructive because it is irreversible and other people's test runs may share the sandbox.

  • delete_suppression

    Remove an address from the suppression list, so Mailtrap will send to it again. Destructive because it overrides a bounce, complaint or unsubscribe - sending to someone who opted out is the thing suppression exists to prevent.

What it will not do

Enforced by the gateway rather than left to convention, which is why each of these can be stated flatly.

It cannot call anything else
The 17 actions above are the whole of it. A call to any other name is refused before it reaches Mailtrap rather than forwarded on, and connecting your account does not add to the list: it is fixed by the connector, not discovered at run time.
It reaches no further than your credential
Toolspoke holds no access to Mailtrap of its own. Every call carries the credential you stored and nothing besides, so whatever that credential cannot reach, this connector cannot reach either.
It never hears from Mailtrap
Nothing is pushed to it. There is no webhook, no subscription and no polling, so this connector cannot notice by itself that something changed in Mailtrap. An agent has to ask.
It does not smooth over provider limits
Toolspoke does not retry, queue or back off around Mailtrap's own rate limits. A call that Mailtrap refuses comes back to the agent as a failed call.

Before you connect it

What can Claude do in Mailtrap?

17 named actions: 12 that only read, 1 that write and 4 that delete or permanently alter something. They include send_email, send_sandbox_email and list_sandboxes. Nothing outside that list is reachable: the connector declares each operation by name rather than proxying whatever an agent asks for.

What credentials does the Mailtrap connector need?

API token. The connector asks for api token. Values are encrypted at rest and attached to the outbound request by the gateway, so they are never part of the arguments an agent sends and never reach the audit log.

Does the Mailtrap connector work with Cursor and Codex, or only Claude?

Any client that speaks MCP, and every one of them gets the same 17 actions. There is a single address, https://toolspoke.com/mcp. Claude Code adds it with claude mcp add --transport http, Claude and Claude Desktop take it as a custom connector in settings, Cursor reads it from .cursor/mcp.json, Codex from ~/.codex/config.toml, and VS Code from .vscode/mcp.json. Each of them signs in to the gateway itself, so there is no key to paste.

What does the Mailtrap connector not do?

The 17 actions above are the whole of it. A call to any other name is refused before it reaches Mailtrap rather than forwarded on, and connecting your account does not add to the list: it is fixed by the connector, not discovered at run time. Toolspoke holds no access to Mailtrap of its own. Every call carries the credential you stored and nothing besides, so whatever that credential cannot reach, this connector cannot reach either. Nothing is pushed to it. There is no webhook, no subscription and no polling, so this connector cannot notice by itself that something changed in Mailtrap. An agent has to ask. Toolspoke does not retry, queue or back off around Mailtrap's own rate limits. A call that Mailtrap refuses comes back to the agent as a failed call.

Can I limit which actions an agent can call?

Yes, in two places. The project switches Mailtrap's actions on and off one at a time, for everyone in the project at once, and the screen groups them by read, write and destructive so turning off everything that deletes is one click. An individual agent key can then be narrowed further, to particular toolkits in a project and to particular actions in a toolkit. Whatever it was granted, a key never reaches a project its owner cannot.

What gets recorded when an agent calls Mailtrap?

Every attempt, with the agent that made it and the person that agent belongs to, the full request payload, the response payload, the status, the duration, and what the call cost in sandbox time and model tokens. Values whose key names a secret are masked out before the record is shown to anyone. An operation the connector marks as not retained never has its response body written at all, so the gateway keeps no second copy of what was read.