Mailtrap

listing.by

Send transactional and bulk email, test messages in sandbox inboxes, and manage templates, domains, contacts and webhooks in Mailtrap.

state.local.long (state.local.title)listing.badge.runs_withstate.key.long

listing.install

listing.local.explain

npx -y mcp-mailtrap

listing.local.needs listing.local.note

  • MAILTRAP_API_TOKEN listing.env.secret Mailtrap API token from https://mailtrap.io/api-tokens
  • MAILTRAP_ACCOUNT_ID listing.env.optional Mailtrap account ID from https://mailtrap.io/account-management

listing.share.h

listing.share.p_local

mcp.tc/i/mailtrap

listing.about

Connects an assistant to a Mailtrap account. It can send transactional and bulk email, including batches, test messages in Email Sandbox inboxes, and inspect spam scores, headers and HTML compatibility. It also manages templates, sending domains, suppressions, webhooks, contacts and lists, and reads email logs and delivery statistics.

Runs locally over stdio with npx -y mcp-mailtrap (Node.js required). A Mailtrap API token is needed in MAILTRAP_API_TOKEN. MAILTRAP_ACCOUNT_ID is required for templates, stats, logs, sandbox listing, domains and suppressions. Optional variables set a default sender and sandbox.

listing.can

  • Send single, batch transactional and bulk emails
  • Send test emails to sandbox inboxes and read their messages
  • Check spam score and HTML client compatibility of test messages
  • Create, update and delete email templates
  • Manage sending domains, suppressions and webhooks
  • Manage contacts, lists, custom fields and imports
  • View sending statistics and email delivery logs

listing.tools 125

  • send-email

    Send an email with HTML or text content to one or more recipients.

  • batch-send-transactional-email

    Send a batch of transactional emails with shared fields and per-recipient overrides.

  • batch-send-bulk-email

    Send a batch of bulk emails with shared fields and per-recipient overrides.

  • create-template

    Create a new email template.

  • list-templates

    List all email templates in the account.

  • get-template

    Get a template with its subject, category and bodies.

  • update-template

    Update an existing email template.

  • delete-template

    Delete an email template.

  • send-sandbox-email

    Send a test email to the sandbox without reaching real recipients.

  • batch-send-sandbox-email

    Send a batch of emails to a sandbox test inbox.

  • get-sandbox-messages

    List messages in the sandbox test inbox.

  • show-sandbox-email-message

    Show sandbox message details, with optional spam report and HTML analysis.

listing.tools_more
  • list-sandbox-projects

    List sandbox projects and their inboxes.

  • create-sandbox-project

    Create a sandbox project to group test inboxes.

  • get-sandbox-project

    Get a sandbox project and its inboxes.

  • update-sandbox-project

    Rename a sandbox project.

  • delete-sandbox-project

    Delete a sandbox project and all its inboxes.

  • create-sandbox-inbox

    Create a sandbox test inbox in a project.

  • get-sandbox-inbox

    Get inbox details including SMTP credentials and counts.

  • update-sandbox-inbox

    Update a sandbox inbox name or email username.

  • delete-sandbox-inbox

    Delete a sandbox inbox and its messages.

  • clean-sandbox-inbox

    Delete all messages in an inbox but keep the inbox.

  • list-sandboxes

    List all sandbox inboxes accessible to the token.

  • mark-sandbox-as-read

    Mark all messages in a sandbox inbox as read.

  • reset-sandbox-credentials

    Reset the SMTP credentials of a sandbox inbox.

  • enable-sandbox-email-address

    Enable the forwarding email address of a sandbox inbox.

  • reset-sandbox-email-address

    Reset the forwarding email address of a sandbox inbox.

  • forward-sandbox-message

    Forward a sandbox message to a real email address.

  • update-sandbox-message

    Mark a sandbox message as read or unread.

  • delete-sandbox-message

    Delete a single sandbox message.

  • get-sandbox-message-spam-score

    Get the SpamAssassin report and score for a message.

  • get-sandbox-message-html-analysis

    Check message HTML for email client compatibility issues.

  • get-sandbox-message-headers

    Get the headers of a sandbox message.

  • get-sandbox-message-html

    Get the rendered HTML body of a sandbox message.

  • get-sandbox-message-text

    Get the plain text body of a sandbox message.

  • get-sandbox-message-raw

    Get the raw source of a sandbox message.

  • get-sandbox-message-eml

    Download a sandbox message as an EML file.

  • get-sandbox-message-html-source

    Get the unrendered HTML source of a sandbox message.

  • list-sandbox-attachments

    List attachments on a sandbox message.

  • get-sandbox-attachment

    Get details and download URL of a message attachment.

  • get-sending-stats

    Get email sending statistics (delivery, bounce, open, click, spam rates) for a date range with optional breakdowns.

  • list-email-logs

    List sent email logs (delivery history) with optional pagination and filters.

  • get-email-log-message

    Get a single email log message by ID to inspect delivery status and event history.

  • list-sending-domains

    List sending domains and their DNS verification status.

  • get-sending-domain

    Get a sending domain by ID and its verification status, with optional DNS setup instructions.

  • create-sending-domain

    Create a new sending domain.

  • update-sending-domain

    Update a sending domain's tracking and inbound settings.

  • delete-sending-domain

    Delete a sending domain.

  • send-sending-domain-setup-instructions

    Email a sending domain's DNS setup instructions to a colleague.

  • get-company-info

    Get the company info of a sending domain, used for domain compliance verification.

  • create-company-info

    Set the company info of a sending domain, required for domain compliance verification.

  • update-company-info

    Update the company info of a sending domain.

  • list-suppressions

    List or search the suppressed email addresses on the account.

  • create-suppression

    Add an email address to the account's suppression list, so Mailtrap stops delivering to it.

  • delete-suppression

    Remove an email address from the suppression list, so Mailtrap resumes delivering to it.

  • list-tracking-opt-outs

    List email addresses excluded from open and click tracking.

  • create-tracking-opt-out

    Exclude an email address from open and click tracking for a sending domain.

  • delete-tracking-opt-out

    Remove an email address from the tracking opt-out list, so open and click tracking applies to it again.

  • list-webhooks

    List all webhooks configured on the account.

  • get-webhook

    Get a single webhook and its configuration.

  • create-webhook

    Create a webhook for email sending, audit log, or inbound receiving events.

  • update-webhook

    Update a webhook's URL, active state, payload format, or subscribed events.

  • delete-webhook

    Permanently delete a webhook.

  • get-contact

    Get a contact by ID or email address, with list memberships and custom fields.

  • create-contact

    Create a contact and optionally subscribe it to contact lists.

  • update-contact

    Update a contact's fields and list memberships.

  • delete-contact

    Permanently delete a contact.

  • create-contact-event

    Record an event against a contact to trigger automations.

  • list-contact-lists

    List the contact lists on the account.

  • get-contact-list

    Get a single contact list.

  • create-contact-list

    Create a new contact list.

  • update-contact-list

    Rename an existing contact list.

  • delete-contact-list

    Permanently delete a contact list.

  • list-contact-fields

    List the custom contact field definitions on the account.

  • get-contact-field

    Get a single custom contact field definition.

  • create-contact-field

    Create a custom contact field for use as a template variable.

  • update-contact-field

    Update the name, merge tag, or data type of a custom contact field.

  • delete-contact-field

    Permanently delete a custom contact field.

  • create-contact-import

    Bulk import contacts and return an import job to poll.

  • get-contact-import

    Get the status and counts of a contact import job.

  • create-contact-export

    Export the contacts matching a set of filters and return an export job to poll.

  • get-contact-export

    Get the status of a contact export job and its download link once finished.

  • list-email-campaigns

    List the account's email campaigns, newest first, with optional search by name.

  • get-email-campaign

    Get a single email campaign.

  • create-email-campaign

    Create a draft email campaign for a verified sending domain.

  • update-email-campaign

    Update a draft email campaign and its template.

  • delete-email-campaign

    Delete a draft email campaign.

  • start-email-campaign

    Start sending a draft email campaign immediately.

  • schedule-email-campaign

    Schedule a draft email campaign to start sending at a future time.

  • cancel-email-campaign

    Cancel a scheduled email campaign, returning it to draft.

  • terminate-email-campaign

    Terminate a campaign that is currently sending, aborting the send.

  • reset-email-campaign

    Reset a scheduled email campaign back to draft.

  • get-email-campaign-stats

    Get the performance statistics of an email campaign, optionally for a date range.

  • list-accounts

    List the Mailtrap accounts the API token can access, with their access levels.

  • get-billing-usage

    Get the current billing cycle's plans, limits, and usage.

  • list-account-accesses

    List the users, invites, and API tokens with access to the account.

  • remove-account-access

    Revoke a user's permissions, or delete an invite or API token.

  • get-permission-resources

    List the inboxes, projects, domains, and billing resources the token administers.

  • bulk-update-permissions

    Create, update, or remove several permissions on an account access in one call.

  • list-api-tokens

    List the API tokens on the account.

  • create-api-token

    Create an API token; the secret value is returned only on creation.

  • get-api-token

    Get an API token's metadata; the secret value is not returned.

  • reset-api-token

    Rotate an API token, invalidating the previous secret value.

  • delete-api-token

    Permanently delete an API token.

  • list-sub-accounts

    List the sub-accounts in the organization.

  • create-sub-account

    Create a new sub-account under the organization.

  • list-inbound-folders

    List the inbound folders on the account.

  • get-inbound-folder

    Get a single inbound folder.

  • create-inbound-folder

    Create a new inbound folder to group inboxes.

  • update-inbound-folder

    Rename an inbound folder.

  • delete-inbound-folder

    Delete an inbound folder and all the inboxes it contains.

  • list-inbound-inboxes

    List the inbound inboxes in a folder.

  • get-inbound-inbox

    Get a single inbound inbox and its receiving address.

  • create-inbound-inbox

    Create a Mailtrap-hosted or custom-domain inbound inbox.

  • update-inbound-inbox

    Update an inbound inbox's settings.

  • delete-inbound-inbox

    Delete an inbound inbox and the messages it holds.

  • list-inbound-messages

    List the messages received in an inbound inbox.

  • get-inbound-message

    Get a received message with its body and attachment download URLs.

  • delete-inbound-message

    Delete a received message.

  • reply-to-inbound-message

    Reply to a received message, sending real email to its sender.

  • reply-all-to-inbound-message

    Reply to a received message and all its recipients, sending real email.

  • forward-inbound-message

    Forward a received message to other recipients, sending real email.

  • list-inbound-threads

    List the conversation threads in an inbound inbox.

  • get-inbound-thread

    Get a conversation thread and the messages it contains.

  • delete-inbound-thread

    Delete a conversation thread and its messages.

listing.prov.mcpb_on

listing.prompts

  • Send a welcome email to jane@example.com using my Mailtrap template

  • Show the spam score of the latest message in my sandbox inbox

  • List my sending domains and their DNS verification status

  • Get delivery and bounce rates for the last 7 days

listing.setup.h

listing.setup.local

Claude Code

  1. Run this in a terminal, in your project folder:
claude mcp add --transport stdio mailtrap --env "MAILTRAP_API_TOKEN=<YOUR_MAILTRAP_API_TOKEN>" -- npx -y mcp-mailtrap
  1. Start Claude Code and type /mcp. mailtrap should show as connected.

Add --scope user to make it available in every project. Replace the placeholders with your own values.

Claude Desktop

  1. Open Settings → Developer → Edit Config. It opens claude_desktop_config.json. Add:
claude_desktop_config.json
{
  "mcpServers": {
    "mailtrap": {
      "command": "npx",
      "args": [
        "-y",
        "mcp-mailtrap"
      ],
      "env": {
        "MAILTRAP_API_TOKEN": "<YOUR_MAILTRAP_API_TOKEN>"
      }
    }
  }
}
  1. Save the file and restart Claude Desktop. Replace the placeholders with your own values.

Needs Node.js on your computer. The file lives in ~/Library/Application Support/Claude/ on macOS and %APPDATA%\Claude\ on Windows.

Cursor

Or add it by hand to ~/.cursor/mcp.json (all projects) or .cursor/mcp.json (this project):

mcp.json
{
  "mcpServers": {
    "mailtrap": {
      "command": "npx",
      "args": [
        "-y",
        "mcp-mailtrap"
      ],
      "env": {
        "MAILTRAP_API_TOKEN": "<YOUR_MAILTRAP_API_TOKEN>"
      }
    }
  }
}

Needs Node.js on your computer. Replace the placeholders with your own values.

VS Code

Add it to .vscode/mcp.json. VS Code asks for the secret the first time and stores it securely:

.vscode/mcp.json
{
  "servers": {
    "mailtrap": {
      "type": "stdio",
      "command": "npx",
      "args": [
        "-y",
        "mcp-mailtrap"
      ],
      "env": {
        "MAILTRAP_API_TOKEN": "${input:mailtrap-api-token}"
      }
    }
  },
  "inputs": [
    {
      "type": "promptString",
      "id": "mailtrap-api-token",
      "description": "MAILTRAP_API_TOKEN",
      "password": true
    }
  ]
}

Needs Node.js on your computer.

Devin Desktop

  1. Add it to ~/.config/devin/mcp_config.json (macOS and Linux) or %APPDATA%\devin\mcp_config.json (Windows):
mcp_config.json
{
  "mcpServers": {
    "mailtrap": {
      "command": "npx",
      "args": [
        "-y",
        "mcp-mailtrap"
      ],
      "env": {
        "MAILTRAP_API_TOKEN": "<YOUR_MAILTRAP_API_TOKEN>"
      }
    }
  }
}
  1. Refresh the MCP server list in Cascade. Replace the placeholders with your own values.

Devin Desktop is the new name for Windsurf.

Codex

codex mcp add mailtrap --env "MAILTRAP_API_TOKEN=<YOUR_MAILTRAP_API_TOKEN>" -- npx -y mcp-mailtrap

Or edit ~/.codex/config.toml directly:

config.toml
[mcp_servers.mailtrap]
command = "npx"
args = ["-y", "mcp-mailtrap"]
env = { MAILTRAP_API_TOKEN = "<YOUR_MAILTRAP_API_TOKEN>" }

Needs Node.js on your computer. Replace the placeholders with your own values.

Gemini CLI

gemini mcp add -e "MAILTRAP_API_TOKEN=<YOUR_MAILTRAP_API_TOKEN>" mailtrap npx -- -y mcp-mailtrap

This adds it to the current project. Add -s user to use it everywhere.

Any client

Most clients that start local servers accept this shape:

{
  "mcpServers": {
    "mailtrap": {
      "command": "npx",
      "args": [
        "-y",
        "mcp-mailtrap"
      ],
      "env": {
        "MAILTRAP_API_TOKEN": "<YOUR_MAILTRAP_API_TOKEN>"
      }
    }
  }
}

Zed puts servers under context_servers in its settings, with the same command, args and env fields.

Needs Node.js on your computer. Replace the placeholders with your own values.

listing.faq

Can I paste mcp.tc/i/mailtrap into my MCP client?

No. Mailtrap runs on your own computer, started by your client, so it has no web address to connect to. The quick link is the page to share; the install command is npx -y mcp-mailtrap.

Does Mailtrap need an API key?

Yes. It reads MAILTRAP_API_TOKEN from its environment, and MAILTRAP_API_TOKEN is a secret. Put the value in your client's config on your own machine, never in a shared file.

Is Mailtrap a remote or a local server?

Local. Your client starts it as a process on your computer with npx -y mcp-mailtrap, which needs Node.js.

What can Mailtrap do?

It has 125 tools, including send-email, batch-send-transactional-email and batch-send-bulk-email. You can send single, batch transactional and bulk emails, send test emails to sandbox inboxes and read their messages and check spam score and HTML client compatibility of test messages.

Which clients can use it?

Any client that starts local servers: Claude Code, Claude Desktop, Cursor, VS Code, Devin Desktop, Codex, Gemini CLI, Zed and others. claude.ai and ChatGPT only connect to remote servers.

Who wrote this page?

mcp.tc's robot read Mailtrap's public metadata (its package and repository pages), and an AI model drafted the text from it. A person reviews anything the checks can't confirm. The text can still be wrong, so if you spot a mistake, use Report this listing on this page.

listing.em.h

listing.em.lead_local listing.em.how

listing.em.badge

em.prev_lightem.prev_dark
Markdown
[![Mailtrap on mcp.tc](https://mcp.tc/i/mailtrap/badge.svg)](https://mcp.tc/i/mailtrap)
HTML
<a href="https://mcp.tc/i/mailtrap"><img src="https://mcp.tc/i/mailtrap/badge.svg" alt="Mailtrap on mcp.tc" height="20"></a>

listing.em.badge_note

listing.em.widget

HTML
<script src="https://mcp.tc/w/mailtrap.js" async></script>

listing.em.widget_note

iframe

HTML
<iframe src="https://mcp.tc/embed/mailtrap" title="Mailtrap on mcp.tc" width="420" height="200" loading="lazy" allow="clipboard-write" style="border:0;border-radius:8px;max-width:100%"></iframe>

listing.em.iframe_note

JSON

listing.em.json_local

https://mcp.tc/i/mailtrap.json

listing.em.fields

listing.disclaimer_checked