batch-send-bulk-email
Send a batch of bulk emails (Mailtrap bulk-stream API) in one call. Shared fields go on base; per-recipient overrides go in requests[]. Each request must include at least one of to/cc/bcc.
Send email through Mailtrap and test it safely — deliver or batch transactional and bulk mail, inspect sandbox messages with spam scores, manage templates and contacts.
LABSCO SUMMARY
The sandbox is the reason to reach for this over a plain send-only integration: send-sandbox-email lands in a test inbox where get-sandbox-message-spam-score and get-sandbox-message-html-analysis tell you the SpamAssassin score and the client-rendering problems before a real recipient sees it. When you do go live, get-sending-stats and the suppression tools give you the deliverability side that a bare SMTP relay does not.
A server for the Mailtrap email platform: 105 tools across live sending, the sandbox testing environment, templates, contacts and contact lists, inbound streams, sending stats and suppressions.
A Mailtrap API token in MAILTRAP_API_TOKEN, required for everything. MAILTRAP_ACCOUNT_ID is required for templates, stats, email logs, the sandbox list and sending domains, and optional for the send tools. DEFAULT_FROM_EMAIL sets the sender when a send omits from. Node, run as npx mcp-mailtrap. Organization tools need a separate MAILTRAP_ORGANIZATION_API_TOKEN.
Add the configuration to your client
USE CASES
Send the message to a sandbox inbox, read its spam score and HTML analysis, and view the rendered body — catching filter and rendering problems before a real recipient does.
Deliver a single message, or batch a run of transactional emails in one call with a shared base and per-recipient fields.
Create a template, list and read the existing ones, and update it — so sends reference a maintained template rather than inline HTML.
Read the sending stats for delivery, bounce and spam rates, and manage the suppression list so you stop mailing addresses that hurt your reputation.
Add and update contacts, group them into lists, and run a bulk import or export when the list changes wholesale.
Counted once with only startup setup. Other versions, modes or optional credentials may expose a different list.
batch-send-bulk-emailSend a batch of bulk emails (Mailtrap bulk-stream API) in one call. Shared fields go on base; per-recipient overrides go in requests[]. Each request must include at least one of to/cc/bcc.
batch-send-transactional-emailSend a batch of transactional emails in one Mailtrap API call. Shared fields go on base; per-recipient overrides go in requests[]. Each request must include to.
bulk-update-permissionsBulk create, update, or destroy permissions for an account access. Existing (resource_type, resource_id) pairs are updated; new ones are created. Set destroy: true to remove.
clean-sandbox-inboxDelete all messages from a sandbox inbox without deleting the inbox itself
create-api-tokenCreate a new API token. The response includes the secret token value — this is the only time the full token is returned, so store it immediately.
create-contactCreate a new contact. Requires email; optionally accepts custom fields, list_ids to subscribe to, and unsubscribed to start in unsubscribed status.
create-contact-eventRecord a contact event (by name + arbitrary params) against a contact ID or email. Used to trigger automations.
create-contact-exportExport contacts matching a set of AND-combined filters. Returns an export job; poll status with get-contact-export to retrieve the download URL.
create-contact-fieldCreate a new contact field definition. merge_tag must be unique and is used in template variables.
create-contact-importBulk import contacts. Returns an import job record; poll status via get-contact-import.
create-contact-listCreate a new contact list.
create-inbound-folderCreate a new inbound folder.
create-inbound-inboxCreate a new inbound inbox in a folder. Omit domain_id for a Mailtrap-hosted inbox; pass it for a custom-domain (catch-all) inbox.
create-sandbox-inboxCreate a new sandbox test inbox within a project. Returns SMTP credentials for the new inbox.
create-sandbox-projectCreate a new sandbox project to group test inboxes
create-sending-domainCreate a new sending domain
create-sub-accountCreate a new sub-account under the organization. Requires MAILTRAP_ORGANIZATION_ID and sub-account management permissions.
create-templateCreate a new email template
create-webhookCreate a webhook. webhook_type may be email_sending, audit_log, or inbound_receiving; for inbound_receiving, inbound_inbox_id is optional (scopes the webhook to one inbox — omit to apply to all inboxes). The response includes a signing_secret for verifying webhook payload signatures — this secret is returned only on creation, so store it now.
delete-api-tokenPermanently delete an API token by ID. The token can no longer authenticate after deletion.
delete-contactPermanently delete a contact by ID or email. Returns the deleted contact record when available.
delete-contact-fieldPermanently delete a contact field definition by ID.
delete-contact-listPermanently delete a contact list by ID.
delete-inbound-folderPermanently delete an inbound folder along with all of its inboxes.
delete-inbound-inboxPermanently delete an inbound inbox.
delete-inbound-messagePermanently delete an inbound message.
delete-inbound-threadPermanently delete an inbound thread.
delete-sandbox-inboxDelete a sandbox inbox and all its messages
delete-sandbox-messageDelete a single sandbox message
delete-sandbox-projectDelete a sandbox project and all its inboxes
delete-sending-domainDelete a sending domain
delete-suppressionDelete a suppression by ID. Mailtrap will resume delivery to this email unless it gets suppressed again.
delete-templateDelete an existing email template
delete-webhookPermanently delete a webhook by ID. Returns the deleted webhook record.
enable-sandbox-email-addressEnable the receive-by-email address for a sandbox
forward-inbound-messageForward an inbound message to new recipients (at least one to is required). Sends a real email.
forward-sandbox-messageForward a sandbox message to an email address (counts against your monthly forwarding quota)
get-api-tokenGet an API token by ID. The secret token value is NOT returned here — only the metadata (name, last 4 digits, resources).
get-billing-usageGet the current billing cycle usage for the account (sending and testing plans, limits, and current counts).
get-contactGet a contact by ID or email address. Returns the full contact record including list memberships, status, and custom fields.
get-contact-exportGet the status of a contact export job. Once status is finished, the url field holds the download link.
get-contact-fieldGet a contact field definition by ID.
get-contact-importGet the status of a contact import job, including created/updated/over-limit counts.
get-contact-listGet a contact list by ID.
get-email-log-messageGet a single email log message by ID (UUID) to inspect delivery status and event history.
get-inbound-folderGet a single inbound folder by ID.
get-inbound-inboxGet a single inbound inbox by ID.
get-inbound-messageGet a single inbound message with its full body and attachment download URLs.
get-inbound-threadGet a single inbound thread with its messages embedded (oldest first).
get-permission-resourcesGet all resources (inboxes, projects, domains, billing, account) to which the API token has admin access, nested by hierarchy.
get-sandbox-attachmentGet the metadata and download URL for a single sandbox attachment.
get-sandbox-inboxGet sandbox inbox details including SMTP credentials, email counts, and status
get-sandbox-message-emlGet a sandbox message as an EML file payload.
get-sandbox-message-headersGet the parsed mail headers for a sandbox message.
get-sandbox-message-htmlGet the rendered HTML body of a sandbox message.
get-sandbox-message-html-analysisGet HTML analysis for a sandbox message (client compatibility, problematic elements).
get-sandbox-message-html-sourceGet the unrendered HTML source of a sandbox message.
get-sandbox-message-rawGet the raw message (MIME-formatted) for a sandbox message.
get-sandbox-message-spam-scoreGet the SpamAssassin spam report for a sandbox message (score, rules, report).
get-sandbox-message-textGet the plain-text body of a sandbox message.
get-sandbox-messagesGet list of messages from the sandbox test inbox
get-sandbox-projectGet a sandbox project by ID, including its inboxes and email counts
get-sending-domainGet a sending domain by ID and its verification status. Optionally include DNS setup instructions via include_setup_instructions.
get-sending-statsGet email sending statistics (delivery, bounce, open, click, spam rates) for a date range. Optionally break down by domain, category, email service provider, or date.
get-templateGet a single email template by ID, including subject, category, and HTML/text body.
get-webhookGet a single webhook by ID.
list-account-accessesList account accesses (users, invites, API tokens) for the account. Optionally scope by domain UUIDs, inbox IDs, or project IDs. Requires account admin/owner permissions.
list-accountsList Mailtrap accounts accessible to the API token, with each account's access levels.
list-api-tokensList all API tokens for the account.
list-contact-fieldsList all contact field definitions for the account.
list-contact-listsList all contact lists for the account. Optionally filter by name with search (case-insensitive match).
list-email-logsList sent email logs (delivery history) with optional pagination and filters; use to debug delivery issues.
list-inbound-foldersList all inbound folders in the account.
list-inbound-inboxesList all inboxes in an inbound folder.
list-inbound-messagesList received messages in an inbound inbox (paginated). Pass last_id from a previous response to fetch the next page.
list-inbound-threadsList conversation threads in an inbound inbox (paginated). Pass last_id from a previous response to fetch the next page.
list-sandbox-attachmentsList all attachments on a sandbox message.
list-sandbox-projectsList all sandbox projects and their inboxes in your Mailtrap account
list-sandboxesList all sandboxes accessible to the API token across projects
list-sending-domainsList sending domains and their DNS verification status
list-sub-accountsList sub-accounts in the organization. Requires MAILTRAP_ORGANIZATION_ID env var and sub-account management permissions.
list-suppressionsList or search suppressions. Optionally filter by email. Returns up to 1000 suppressions per call.
list-templatesList all email templates
list-webhooksList all webhooks for the account.
mark-sandbox-as-readMark all messages in a sandbox as read
remove-account-accessRemove an account access by ID. For User specifiers this revokes permissions; for Invite or ApiToken specifiers it removes the specifier itself. Requires admin/owner.
reply-all-to-inbound-messageReply to an inbound message and copy the original's other recipients. Sends a real email.
reply-to-inbound-messageReply to an inbound message (sends to the original sender). Sends a real email.
reset-api-tokenReset (rotate) an API token by ID. The response includes the new secret token value — returned only on this call, so store it immediately. The previous token is invalidated.
reset-sandbox-credentialsReset the SMTP credentials for a sandbox
reset-sandbox-email-addressGenerate a new receive-by-email address for a sandbox
send-emailSend an email to your recipient email address using Mailtrap Email API. You can send emails to multiple recipients at once.
send-sandbox-emailSend an email in sandbox mode to a test inbox without delivering to your recipients
send-sending-domain-setup-instructionsEmail DNS setup instructions for a sending domain to a given address.
show-sandbox-email-messageShow sandbox email message details and content from the sandbox test inbox. Optionally include spam report (SpamAssassin score) and HTML analysis (client compatibility) for email testing workflows.
update-contactUpdate a contact (identified by ID or email). list_ids replaces the membership set; list_ids_included/list_ids_excluded add/remove without disturbing the rest.
update-contact-fieldUpdate a contact field definition. Any combination of name, merge_tag, or data_type can be changed.
update-contact-listRename an existing contact list.
update-inbound-folderRename an inbound folder.
update-inbound-inboxRename an inbound inbox.
update-sandbox-inboxUpdate a sandbox inbox name or email username
update-sandbox-messageMark a sandbox message as read or unread
update-sandbox-projectRename an existing sandbox project
update-templateUpdate an existing email template
update-webhookUpdate a webhook's mutable fields (url, active, payload_format, event_types, inbound_inbox_id). webhook_type, sending_stream, and domain_id cannot be changed after creation.
BEFORE YOU INSTALL
105 tools when we connected; the project documents 117. The email-campaign tools (create, schedule, start, stats and others) and batch-send-sandbox-email did not appear on connection. Templates, stats, email logs, sandbox list/show and sending domains need MAILTRAP_ACCOUNT_ID; the two organization tools need MAILTRAP_ORGANIZATION_API_TOKEN.
MAILTRAP_ACCOUNT_ID in your environment
Both documented clients run the server on your machine.
INSTALLATION
{
"mcpServers": {
"mailtrap": {
"command": "npx",
"args": [
"-y",
"mcp-mailtrap"
],
"env": {
"MAILTRAP_API_TOKEN": "<YOUR_MAILTRAP_API_TOKEN>",
"DEFAULT_FROM_EMAIL": "<YOUR_DEFAULT_FROM_EMAIL>",
"MAILTRAP_ACCOUNT_ID": "<YOUR_MAILTRAP_ACCOUNT_ID>",
"MAILTRAP_TEST_INBOX_ID": "<YOUR_MAILTRAP_TEST_INBOX_ID>"
}
}
}
}{
"servers": {
"mailtrap": {
"command": "npx",
"args": [
"-y",
"mcp-mailtrap"
],
"env": {
"MAILTRAP_API_TOKEN": "<YOUR_MAILTRAP_API_TOKEN>",
"DEFAULT_FROM_EMAIL": "<YOUR_DEFAULT_FROM_EMAIL>",
"MAILTRAP_ACCOUNT_ID": "<YOUR_MAILTRAP_ACCOUNT_ID>",
"MAILTRAP_TEST_INBOX_ID": "<YOUR_MAILTRAP_TEST_INBOX_ID>"
}
}
}
}