Mailtrap
MCP server by Mailtrap
Send transactional and bulk email, test messages in sandbox inboxes, and manage templates, domains, contacts and webhooks in Mailtrap.
Install Mailtrap
Runs on your machine. Your client starts it with this command:
Needs Node.js on your computer. The setup steps below show where the command goes in each client.
MAILTRAP_API_TOKENsecret Mailtrap API token from https://mailtrap.io/api-tokensMAILTRAP_ACCOUNT_IDoptional Mailtrap account ID from https://mailtrap.io/account-management
Share this server
Opens this page, with the install command and setup steps.
mcp.tc/i/mailtrapAbout
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.
What you can do
- 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
Tools 131
send-emailSend an email with HTML or text content to one or more recipients.
batch-send-transactional-emailSend a batch of transactional emails with shared fields and per-recipient overrides.
batch-send-bulk-emailSend a batch of bulk emails with shared fields and per-recipient overrides.
create-templateCreate a new email template.
list-templatesList all email templates in the account.
get-templateGet a template with its subject, category and bodies.
update-templateUpdate an existing email template.
delete-templateDelete an email template.
send-sandbox-emailSend a test email to the sandbox without reaching real recipients.
batch-send-sandbox-emailSend a batch of emails to a sandbox test inbox.
get-sandbox-messagesList messages in the sandbox test inbox.
show-sandbox-email-messageShow sandbox message details, with optional spam report and HTML analysis.
Show 119 more tools
list-sandbox-projectsList sandbox projects and their inboxes.
create-sandbox-projectCreate a sandbox project to group test inboxes.
get-sandbox-projectGet a sandbox project and its inboxes.
update-sandbox-projectRename a sandbox project.
delete-sandbox-projectDelete a sandbox project and all its inboxes.
create-sandboxCreate a new sandbox within a project.
get-sandboxGet sandbox details including SMTP credentials, email counts, and status.
update-sandboxUpdate a sandbox name or email username.
delete-sandboxDelete a sandbox and all its messages.
clean-sandboxDelete all messages from a sandbox without deleting the sandbox itself.
list-sandboxesList all sandbox inboxes accessible to the token.
mark-sandbox-as-readMark all messages in a sandbox inbox as read.
reset-sandbox-credentialsReset the SMTP credentials of a sandbox inbox.
enable-sandbox-email-addressEnable the forwarding email address of a sandbox inbox.
reset-sandbox-email-addressReset the forwarding email address of a sandbox inbox.
forward-sandbox-messageForward a sandbox message to a real email address.
update-sandbox-messageMark a sandbox message as read or unread.
delete-sandbox-messageDelete a single sandbox message.
get-sandbox-message-spam-scoreGet the SpamAssassin report and score for a message.
get-sandbox-message-html-analysisCheck message HTML for email client compatibility issues.
get-sandbox-message-headersGet the headers of a sandbox message.
get-sandbox-message-htmlGet the rendered HTML body of a sandbox message.
get-sandbox-message-textGet the plain text body of a sandbox message.
get-sandbox-message-rawGet the raw source of a sandbox message.
get-sandbox-message-emlDownload a sandbox message as an EML file.
get-sandbox-message-html-sourceGet the unrendered HTML source of a sandbox message.
list-sandbox-attachmentsList attachments on a sandbox message.
get-sandbox-attachmentGet details and download URL of a message attachment.
get-sending-statsGet email sending statistics (delivery, bounce, open, click, spam rates) for a date range with optional breakdowns.
get-marketing-statsGet aggregated Email Marketing statistics across campaigns and automations for a date range.
list-email-logsList sent email logs (delivery history) with optional pagination and filters.
get-email-log-messageGet a single email log message by ID to inspect delivery status and event history.
list-domainsList domains and their DNS verification status.
get-domainGet a domain by ID and its verification status, with optional DNS setup instructions.
create-domainCreate a new domain.
update-domainUpdate a domain's tracking and inbound settings.
delete-domainDelete a domain.
send-domain-setup-instructionsEmail a domain's DNS setup instructions to a colleague.
get-company-infoGet the company info of a domain, used for domain compliance verification.
create-company-infoSet the company info of a domain, required for domain compliance verification.
update-company-infoUpdate the company info of a domain.
list-suppressionsList or search the suppressed email addresses on the account.
create-suppressionAdd an email address to the account's suppression list, so Mailtrap stops delivering to it.
delete-suppressionRemove an email address from the suppression list, so Mailtrap resumes delivering to it.
list-tracking-opt-outsList email addresses excluded from open and click tracking.
create-tracking-opt-outExclude an email address from open and click tracking for a domain.
delete-tracking-opt-outRemove an email address from the tracking opt-out list, so open and click tracking applies to it again.
list-webhooksList all webhooks configured on the account.
get-webhookGet a single webhook and its configuration.
create-webhookCreate a webhook for email sending, audit log, or inbound receiving events.
update-webhookUpdate a webhook's URL, active state, payload format, or subscribed events.
delete-webhookPermanently delete a webhook.
get-contactGet a contact by ID or email address, with list memberships and custom fields.
create-contactCreate a contact and optionally subscribe it to contact lists.
update-contactUpdate a contact's fields and list memberships.
delete-contactPermanently delete a contact.
create-contact-eventRecord an event against a contact to trigger automations.
list-contact-listsList the contact lists on the account.
get-contact-listGet a single contact list.
create-contact-listCreate a new contact list.
update-contact-listRename an existing contact list.
delete-contact-listPermanently delete a contact list.
list-contact-fieldsList the custom contact field definitions on the account.
get-contact-fieldGet a single custom contact field definition.
create-contact-fieldCreate a custom contact field for use as a template variable.
update-contact-fieldUpdate the name, merge tag, or data type of a custom contact field.
delete-contact-fieldPermanently delete a custom contact field.
create-contact-importBulk import contacts and return an import job to poll.
get-contact-importGet the status and counts of a contact import job.
create-contact-exportExport the contacts matching a set of filters and return an export job to poll.
get-contact-exportGet the status of a contact export job and its download link once finished.
list-email-campaignsList the account's email campaigns, newest first, with optional search by name.
get-email-campaignGet a single email campaign.
create-email-campaignCreate a draft email campaign for a verified domain.
update-email-campaignUpdate a draft email campaign and its template.
delete-email-campaignDelete a draft email campaign.
start-email-campaignStart sending a draft email campaign immediately.
schedule-email-campaignSchedule a draft email campaign to start sending at a future time.
cancel-email-campaignCancel a scheduled email campaign, returning it to draft.
terminate-email-campaignTerminate a campaign that is currently sending, aborting the send.
reset-email-campaignReset a scheduled email campaign back to draft.
get-email-campaign-statsGet the performance statistics of an email campaign, optionally for a date range.
list-accountsList the Mailtrap accounts the API token can access, with their access levels.
get-billing-usageGet the current billing cycle's plans, limits, and usage.
list-account-accessesList the users, invites, and API tokens with access to the account.
remove-account-accessRevoke a user's permissions, or delete an invite or API token.
get-permission-resourcesList the sandboxes, projects, domains, and billing resources the token administers.
bulk-update-permissionsCreate, update, or remove several permissions on an account access in one call.
list-api-tokensList the API tokens on the account.
create-api-tokenCreate an API token; the secret value is returned only on creation.
get-api-tokenGet an API token's metadata; the secret value is not returned.
reset-api-tokenRotate an API token, invalidating the previous secret value.
delete-api-tokenPermanently delete an API token.
list-sub-accountsList the sub-accounts in the organization.
create-sub-accountCreate a new sub-account under the organization.
list-inbound-foldersList the inbound folders on the account.
get-inbound-folderGet a single inbound folder.
create-inbound-folderCreate a new inbound folder to group inboxes.
update-inbound-folderRename an inbound folder.
delete-inbound-folderDelete an inbound folder and all the inboxes it contains.
list-inbound-inboxesList the inbound inboxes in a folder.
get-inbound-inboxGet a single inbound inbox and its receiving address.
create-inbound-inboxCreate a Mailtrap-hosted or custom-domain inbound inbox.
update-inbound-inboxUpdate an inbound inbox's settings.
delete-inbound-inboxDelete an inbound inbox and the messages it holds.
list-inbound-messagesList the messages received in an inbound inbox.
get-inbound-messageGet a received message with its body and attachment download URLs.
delete-inbound-messageDelete a received message.
reply-to-inbound-messageReply to a received message, sending real email to its sender.
reply-all-to-inbound-messageReply to a received message and all its recipients, sending real email.
forward-inbound-messageForward a received message to other recipients, sending real email.
list-inbound-threadsList the conversation threads in an inbound inbox.
get-inbound-threadGet a conversation thread and the messages it contains.
delete-inbound-threadDelete a conversation thread and its messages.
list-inbound-forward-rulesList the forward rules of an inbound inbox.
get-inbound-forward-ruleGet a forward rule with its conditions and destinations.
create-inbound-forward-ruleCreate a rule that forwards matching received messages to other addresses.
update-inbound-forward-ruleUpdate a forward rule's name, conditions, or destinations.
delete-inbound-forward-ruleDelete a forward rule.
From the package’s own manifest, not a live connection, on 3 Oct 2026.
Example 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
Set up
Every client starts Mailtrap on your machine with the same command. Pick yours; the page remembers your choice.
Claude Code
- 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- 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
- Open Settings → Developer → Edit Config. It opens
claude_desktop_config.json. Add:
{
"mcpServers": {
"mailtrap": {
"command": "npx",
"args": [
"-y",
"mcp-mailtrap"
],
"env": {
"MAILTRAP_API_TOKEN": "<YOUR_MAILTRAP_API_TOKEN>"
}
}
}
}- 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
Add to Cursor (opens in a new tab)
Or add it by hand to ~/.cursor/mcp.json (all projects) or .cursor/mcp.json (this project):
{
"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:
{
"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
- Add it to
~/.config/devin/mcp_config.json(macOS and Linux) or%APPDATA%\devin\mcp_config.json(Windows):
{
"mcpServers": {
"mailtrap": {
"command": "npx",
"args": [
"-y",
"mcp-mailtrap"
],
"env": {
"MAILTRAP_API_TOKEN": "<YOUR_MAILTRAP_API_TOKEN>"
}
}
}
}- 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-mailtrapOr edit ~/.codex/config.toml directly:
[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-mailtrapThis 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.
Embed
Show Mailtrap in a README or on your site. Each embed links to this page, uses the server’s own install command, and sets no cookies. How embeds work
The card, the iframe and the JSON are in English. Add ?lang=it, fr, de or es to their address for another language.
README badge
[](https://mcp.tc/i/mailtrap)<a href="https://mcp.tc/i/mailtrap"><img src="https://mcp.tc/i/mailtrap/badge.svg" alt="Mailtrap on mcp.tc" height="20"></a>It follows the reader’s light or dark mode. Add ?theme=light or ?theme=dark to fix it, or ?style=compact to show the mark without the word.
Website card
<script src="https://mcp.tc/w/mailtrap.js" async></script>The card appears where the tag is. Add data-theme="dark" or data-size="compact" to the tag to change it. The file holds everything it needs, so it makes no other requests and sets no cookies.
iframe
<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>Use it on pages that don’t allow scripts. Add ?theme=light or ?theme=dark to the address to fix the colors.
JSON
The listing as data for your own pages and tools: name, tagline, install command, tools and the “Add to” links. Any site can read it (CORS is open).
https://mcp.tc/i/mailtrap.jsonAI prompt
Paste this into an AI coding assistant, such as Claude Code or Cursor, and it adds the Mailtrap card to your site.
Add the mcp.tc card for Mailtrap, an MCP server, to my website. It is one static script: no build step, no package to install, no cookies.
Put this tag where the card should appear. The card renders right before it:
```html
<script src="https://mcp.tc/w/mailtrap.js" async></script>
```
To show the card somewhere else, put this placeholder there and load the same script once, for example before `</body>`. Keep the link inside: visitors without JavaScript see it.
```html
<div data-mcptc="mailtrap"><a href="https://mcp.tc/i/mailtrap">Mailtrap on mcp.tc</a></div>
```
Options:
- `data-theme="light"` or `"dark"` on the tag or the placeholder fixes the colors. Without it, the card follows the visitor’s light or dark mode.
- `data-size="compact"` gives a smaller card without the tagline.
- The CSS variable `--mcptc-max-width` on the placeholder or a parent sets the width (default `520px`).
- `?lang=` on the script URL sets the card’s language: `en`, `it`, `fr`, `de` or `es`.
If the site has a Content Security Policy, allow `script-src https://mcp.tc` and `img-src data:` (the icon is inline).
For a README or other Markdown docs, use the badge instead:
```markdown
[](https://mcp.tc/i/mailtrap)
```
Reference: https://mcp.tc/embedChange history
We read the tool list in this server’s bundle manifest on GitHub every 3 hours and record what changes. Last read 18 Nov 2026, 05:31 UTC.
-
New version 0.13.1 (was 0.13.0). Read from npm.
-
11 tools added, 11 tools removed and 18 tools changed.
Details, 9 Nov 2026, 11:51 UTC
Added 11
clean-sandboxDelete all messages from a sandbox without deleting the sandbox itself.
create-domainCreate a new domain.
create-sandboxCreate a new sandbox within a project.
delete-domainDelete a domain.
delete-sandboxDelete a sandbox and all its messages.
get-domainGet a domain by ID and its verification status, with optional DNS setup instructions.
get-sandboxGet sandbox details including SMTP credentials, email counts, and status.
list-domainsList domains and their DNS verification status.
send-domain-setup-instructionsEmail a domain's DNS setup instructions to a colleague.
update-domainUpdate a domain's tracking and inbound settings.
update-sandboxUpdate a sandbox name or email username.
Removed 11
clean-sandbox-inboxDelete all messages from a sandbox inbox without deleting the inbox itself.
create-sandbox-inboxCreate a new sandbox test inbox within a project.
create-sending-domainCreate a new sending domain.
delete-sandbox-inboxDelete a sandbox inbox and all its messages.
delete-sending-domainDelete a sending domain.
get-sandbox-inboxGet sandbox inbox details including SMTP credentials, email counts, and status.
get-sending-domainGet a sending domain by ID and its verification status, with optional DNS setup instructions.
list-sending-domainsList sending domains and their DNS verification status.
send-sending-domain-setup-instructionsEmail a sending domain's DNS setup instructions to a colleague.
update-sandbox-inboxUpdate a sandbox inbox name or email username.
update-sending-domainUpdate a sending domain's tracking and inbound settings.
Changed 18
batch-send-sandbox-emaildescriptionBeforeSend a batch of emails in sandbox mode to a
test inboxin one call.AfterSend a batch of emails in sandbox mode to a sandbox in one call.
create-company-infodescriptionBeforeSet the company info of a
sendingdomain, required for domain compliance verification.AfterSet the company info of a domain, required for domain compliance verification.
create-email-campaigndescriptionBeforeCreate a draft email campaign for a verified
sendingdomain.AfterCreate a draft email campaign for a verified domain.
create-sandbox-projectdescriptionBeforeCreate a new sandbox project to group
test inboxes.AfterCreate a new sandbox project to group sandboxes.
create-tracking-opt-outdescriptionBeforeExclude an email address from open and click tracking for a
sendingdomain.AfterExclude an email address from open and click tracking for a domain.
delete-sandbox-messagedescriptionBeforeDelete a single message from a
sandbox inbox.AfterDelete a single message from a sandbox.
delete-sandbox-projectdescriptionBeforeDelete a sandbox project and all its
inboxes.AfterDelete a sandbox project and all its sandboxes.
enable-sandbox-email-addressdescriptionBeforeEnable the forwarding email address of a
sandbox inbox.AfterEnable the forwarding email address of a sandbox.
get-company-infodescriptionBeforeGet the company info of a
sendingdomain, used for domain compliance verification.AfterGet the company info of a domain, used for domain compliance verification.
get-permission-resourcesdescriptionBeforeList the
inboxes,projects, domains, and billing resources the token administers.AfterList the sandboxes, projects, domains, and billing resources the token administers.
get-sandbox-messagesget-sandbox-projectlist-sandbox-projectslist-sandboxesmark-sandbox-as-readreset-sandbox-credentialsreset-sandbox-email-addressupdate-company-info -
New version 0.13.0 (was 0.12.0). Read from npm.
-
New version 0.12.0 (was 0.11.0). Read from npm.
-
1 tool added.
Details, 2 Nov 2026, 14:46 UTC
Added 1
get-marketing-statsGet aggregated Email Marketing statistics across campaigns and automations for a date range.
-
New version 0.11.0 (was 0.10.0). Read from npm.
-
5 tools added.
Details, 12 Oct 2026, 16:30 UTC
Added 5
create-inbound-forward-ruleCreate a rule that forwards matching received messages to other addresses.
delete-inbound-forward-ruleDelete a forward rule.
get-inbound-forward-ruleGet a forward rule with its conditions and destinations.
list-inbound-forward-rulesList the forward rules of an inbound inbox.
update-inbound-forward-ruleUpdate a forward rule's name, conditions, or destinations.
-
New version 0.10.0 (was 0.9.0). Read from npm.
-
1 tool changed.
Details, 9 Oct 2026, 16:33 UTC
Changed 1
list-templatesdescriptionBeforeList
allemail templates in your Mailtrapaccount.AfterList the email templates in your Mailtrap account, one page at a time. Pages are offsets over the newest-first list, so after deleting templates list again from token 1 instead of continuing with the next token.
-
Tracking started: 125 tools.
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 131 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.
Does mcp.tc track changes to Mailtrap?
Yes. We follow the tool list in Mailtrap’s bundle manifest, and its History tab shows each change we find, plus new versions and edits by its owner. Follow the listing to get an email when it changes.
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.
mcp.tc isn’t affiliated with Mailtrap. This page was built from Mailtrap’s public metadata, last checked on 3 Oct 2026, and an AI model wrote the description, so it can be wrong. Names and marks belong to their owners. Something off? Report this listing.