Mailtrap MCP server
Official MCP Server for Mailtrap
65 stars300 downloads/wk
Reviews
Write oneNobody has reviewed Mailtrap yet.
If you have run it, two minutes of your experience saves the next person an afternoon.
Mailtrap tools (100, 60 write)
write = sends, deletes, buys or postsRead from the package source without running it. The installed server may list more.
batch-send-bulk-emailwrite actionSend 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-sandbox-emailwrite actionSend a batch of emails in sandbox mode to a test inbox in one Mailtrap API call. Shared fields go on `base`; per-recipient overrides go in `requests[]`. Requires `sandbox_id` or the MAILTRAP_SANDBOX_ID env var.
batch-send-transactional-emailwrite actionSend 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-permissionswrite actionBulk 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.
cancel-email-campaignwrite actionCancel a `scheduled` email campaign, returning it to `draft`; only `scheduled` campaigns can be cancelled.
clean-sandbox-inboxwrite actionDelete all messages from a sandbox inbox without deleting the inbox itself
create-company-infowrite actionSet the company info of a sending domain, required for domain compliance verification.
create-contactwrite actionCreate a new contact. Requires `email`; optionally accepts custom `fields`, `list_ids` to subscribe to, and `unsubscribed` to start in unsubscribed status.
create-contact-eventwrite actionRecord a contact event (by `name` + arbitrary `params`) against a contact ID or email. Used to trigger automations.
create-contact-exportwrite actionExport 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-fieldwrite actionCreate a new contact field definition. `merge_tag` must be unique and is used in template variables.
create-contact-importwrite actionBulk import contacts. Returns an import job record; poll status via `get-contact-import`.
create-contact-listwrite actionCreate a new contact list.
create-email-campaignwrite actionCreate a new email campaign in the `draft` state; requires `name`, `domain_id`, `from_local_part`, and a `template_attributes.subject`.
create-sandbox-inboxwrite actionCreate a new sandbox test inbox within a project. Returns SMTP credentials for the new inbox.
create-sandbox-projectwrite actionCreate a new sandbox project to group test inboxes
create-sending-domainwrite actionCreate a new sending domain
create-suppressionwrite actionAdd an email address to the account's suppression list, so Mailtrap stops delivering to it.
create-templatewrite actionCreate a new email template
create-tracking-opt-outwrite actionExclude an email address from open and click tracking for a sending domain.
create-webhookwrite actionCreate 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-contactwrite actionPermanently delete a contact by ID or email. Returns the deleted contact record when available.
delete-contact-fieldwrite actionPermanently delete a contact field definition by ID.
delete-contact-listwrite actionPermanently delete a contact list by ID.
delete-email-campaignwrite actionDelete an email campaign by ID; only a campaign in the `draft` state can be deleted.
delete-sandbox-inboxwrite actionDelete a sandbox inbox and all its messages
delete-sandbox-messagewrite actionDelete a single sandbox message
delete-sandbox-projectwrite actionDelete a sandbox project and all its inboxes
delete-sending-domainwrite actionDelete a sending domain
delete-suppressionwrite actionDelete a suppression by ID. Mailtrap will resume delivery to this email unless it gets suppressed again.
delete-templatewrite actionDelete an existing email template
delete-tracking-opt-outwrite actionRemove an email address from the tracking opt-out list, so open and click tracking applies to it again.
delete-webhookwrite actionPermanently delete a webhook by ID. Returns the deleted webhook record.
enable-sandbox-email-addresswrite actionEnable the receive-by-email address for a sandbox
forward-sandbox-messageForward a sandbox message to an email address (counts against your monthly forwarding quota)
get-billing-usageGet the current billing cycle usage for the account (sending and testing plans, limits, and current counts).
get-company-infoGet the company info of a sending domain, used for domain compliance verification.
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-campaignwrite actionGet an email campaign by ID.
get-email-campaign-statswrite actionGet aggregated performance statistics for an email campaign; optionally narrow the window with `start_date`/`end_date` (`YYYY-MM-DD`).
get-email-log-messagewrite actionGet a single email log message by ID (UUID) to inspect delivery status and event history.
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-campaignswrite actionList the account's email campaigns, newest first, with page-token pagination (`token`, `per_page`). Optionally filter by name with `search`.
list-email-logswrite actionList sent email logs (delivery history) with optional pagination and filters; use to debug delivery issues.
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-suppressionsList or search suppressions. Optionally filter by email. Returns up to 1000 suppressions per call.
list-templatesList all email templates
list-tracking-opt-outsList email addresses excluded from open and click tracking. Returns up to 1000 records per call.
list-webhooksList all webhooks for the account.
mark-sandbox-as-readMark all messages in a sandbox as read
remove-account-accesswrite actionRemove an account access by ID. For User specifiers this revokes permissions; for Invite or ApiToken specifiers it removes the specifier itself. Requires admin/owner.
reset-email-campaignwrite actionReset a `scheduled` email campaign back to `draft`; only `scheduled` campaigns can be reset.
reset-sandbox-credentialsReset the SMTP credentials for a sandbox
reset-sandbox-email-addresswrite actionGenerate a new receive-by-email address for a sandbox
schedule-email-campaignwrite actionSchedule a `draft` email campaign to start sending at `datetime` (ISO 8601, must be in the future and no more than 1 month ahead); only `draft` campaigns can be scheduled.
send-emailwrite actionSend an email to your recipient email address using Mailtrap Email API. You can send emails to multiple recipients at once.
send-sandbox-emailwrite actionSend an email in sandbox mode to a test inbox without delivering to your recipients
send-sending-domain-setup-instructionswrite actionEmail DNS setup instructions for a sending domain to a given address.
show-sandbox-email-messagewrite actionShow 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.
start-email-campaignwrite actionStart sending a `draft` email campaign immediately; only `draft` campaigns can be started.
terminate-email-campaignwrite actionTerminate an email campaign that is currently sending (`started`, `queued`, or `paused`), aborting the in-flight send.
update-company-infowrite actionUpdate the company info of a sending domain.
update-contactwrite actionUpdate 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-fieldwrite actionUpdate a contact field definition. Any combination of `name`, `merge_tag`, or `data_type` can be changed.
update-contact-listwrite actionRename an existing contact list.
update-email-campaignwrite actionUpdate a `draft` email campaign; only the provided fields change, and campaigns in any other state cannot be updated.
update-sandbox-inboxwrite actionUpdate a sandbox inbox name or email username
update-sandbox-messagewrite actionMark a sandbox message as read or unread
update-sandbox-projectwrite actionRename an existing sandbox project
update-sending-domainwrite actionUpdate a sending domain's tracking and inbound settings.
update-templatewrite actionUpdate an existing email template
update-webhookwrite actionUpdate 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.
Public scan report
scanner v0.1.9 · 2026-09-20 · same rubric, same numbers if you re-run it
- Code scan275 source files scanned25/25
- –Live reliabilityno gateway calls yet and no remote to proben/a
- –Tool poisoningtools not inspected (local package is not executed); not countedn/a
- Auth qualitystatic API keys via environment variables6/15
- Maintenancelast push 4 days ago15/15
- Maintainer identityregistry namespace matches repository owner; GitHub account older than a year; website matches verified namespace10/10
What the publisher says
From the Mailtrap repository's README, as published. We do not edit it. Read it on GitHub
Official Mailtrap MCP Server
The official MCP server for Mailtrap — the email delivery platform. It connects your Mailtrap account to Claude, Cursor, VS Code, and other MCP-compatible AI assistants.
Send transactional and bulk email, test messages safely in Email Sandbox, manage templates, contacts, sending domains, and webhooks, inspect email logs and delivery statistics, troubleshoot deliverability, and manage account resources — all using natural-language prompts.
Capabilities
- Email API and SMTP — Send transactional and bulk email, including batch and template-based messages.
- Email testing — Test messages in Email Sandbox and inspect content, headers, attachments, spam scores, and HTML client compatibility.
- Delivery monitoring — Search email logs, inspect event history, and analyze delivery, bounce, open, click, and spam rates.
- Email infrastructure — Manage sending domains, DNS verification, webhooks, and suppressions.
- Contacts — Manage contacts, lists, custom fields, and events, with imports and exports.
- Account management — Review billing usage and manage access, permissions, API tokens, and sub-accounts.
Supported MCP Clients
Works with Claude Desktop, Claude Code, Cursor, VS Code, and any other MCP-compatible client. Setup instructions for each are below.
Prerequisites
Before using this MCP server, you need to:
- Create a Mailtrap account
- Verify your domain
- Get your API token from Mailtrap API settings
- Get your Account ID from Mailtrap account management
Required Environment Variables:
- MAILTRAPAPITOKEN - Required for all functionality
- MAILTRAPACCOUNTID - Required for templates, stats, email logs, sandbox list/show, sending domains, and suppressions. Optional only for the send tools (send-email, send-sandbox-email, and the batch-send-\* tools), the email campaign tools, the company info tools, and the tracking opt-out tools.
Optional (can be passed as tool parameters instead):
- DEFAULTFROMEMAIL - Default sender email when from is not provided to send-email, send-sandbox-email, or the batch-send-\* tools (where it fills base.from). Enables switching sender per call via the from parameter.
- MAILTRAPSANDBOXID - Default sandbox ID for sandbox tools when sandboxid is not provided. Enables switching between sandboxes per call via the sandboxid parameter.
- MAILTRAPTESTINBOXID - Default test inbox ID for sandbox tools when testinboxid is not provided. Enables switching between inboxes per call via the testinboxid parameter. Legacy alias for MAILTRAPSANDBOX_ID, still honored as a fallback.
- MAILTRAPORGANIZATIONID - Required for organization tools (list-sub-accounts, create-sub-account).
- MAILTRAPORGANIZATIONAPITOKEN - Organization-scoped API token. Required for organization tools (separate from MAILTRAPAPI_TOKEN).
Quick Install
Shortened. The full README is on GitHub.
Nothing above is checked by us. What we check is on the safety report.
Install directly
Runs npx -y mcp-mailtrap on your machine. Read the scan report first; the gateway never runs local packages.
claude mcp add mcp -- npx -y mcp-mailtrap
Mailtrap: common questions
- Is Mailtrap MCP server safe?
- Yes, by our scan: it is graded A (86/100). Read the Mailtrap safety report
- How do I install Mailtrap?
- It runs on your machine. Copy the Claude Code, Claude Desktop or Cursor config from the install section.
- Does Mailtrap need an API key?
- Yes. The registry entry asks for
MAILTRAP_API_TOKEN. - Is Mailtrap maintained?
- The last commit was 5 days ago (2026-09-16). The latest release is v0.9.0.