← Back to directory
M

Mailtrap MCP Server

Official
Manage Mailtrap sending, testing, and monitoring from AI assistants.
Category
Other #288 of 678
Stars
★ 66 Popular
Transport
stdio (local process)
Runtime
Node.js 22+
Credentials
API key / credential required
License
MIT
Last commit
Tools
100
53FMRS · D

The source identifies this as Mailtrap's official MCP server and documents stdio transport, an npm launch configuration, and tools for email sending, testing, monitoring, and account management. Some calls send real email or change account data, so configure credentials and permissions for the intended workflow.

Strongest · Documentation 14/20 Weakest · Security and permissions 8/20

Reliability
10/20
Security and permissions
8/20
Maintenance
8/20
Documentation
14/20
Setup experience
13/20
Why each score
Reliability 10/20
The README documents a broad tool set, parameter constraints, renamed-tool compatibility, and some failure prerequisites, supporting the plausibility of the main usage paths. The supplied material contains no verifiable CI workflow, committed tests, or evidence of an actual initialization and tool-list handshake; tool count and behavior cannot be statically verified, so points are deducted.
Security and permissions 8/20
The README identifies environment variables for API credentials and notes account or organization requirements for some tools. The tools can also send real email, read message bodies and attachments, create or delete resources, manage permissions, and reset tokens; the material does not show call-time confirmation, how fine-grained permissions are enforced, or full data-flow disclosure, so points are deducted. No evidence of a stated red line appears in the supplied material.
Maintenance 8/20
The material identifies an MIT license, an npm version and installation source, and repository metadata says the project is not archived. It provides no commit history, release history, dependency update evidence, security response channel, or issue-handling evidence, so sustained maintenance cannot be established and points are deducted.
Documentation 14/20
The README provides parameter descriptions, examples, client configuration, credential requirements, limits, and some deprecation guidance across many tools. It does not adequately establish costs, general troubleshooting, data-handling boundaries, or complete security guidance, so full marks are not justified.
Setup experience 13/20
The README gives a Node.js 22+ prerequisite, an npx installation path, configuration examples for Claude, Cursor, and VS Code, and mentions Docker and MCPB. Users still need to obtain and configure Mailtrap credentials, and the supplied material contains no real execution or cross-platform verification evidence, so points are deducted.

Static review · not runReviewed 2026-11-29

Read the FMRS scoring method →

Fit and risk

What it can accessUses the networkChanges third-party account data

Best for

  • Teams already using Mailtrap that want to manage email workflows from an MCP client.
  • Developers who need email sending, Sandbox testing, and delivery monitoring in one assistant.
  • Users who need to manage Mailtrap contacts, campaigns, domains, or account resources.

Not for

  • Users who do not use the Mailtrap email platform.
  • People seeking only a personal email client rather than Mailtrap API and account management.
  • Users without authorization to manage the target Mailtrap account, domains, or contact data.

Required permissions

  • Requires a Mailtrap API token; the server manifest marks MAILTRAP_API_TOKEN as required and secret.
  • Many template, stats, log, Sandbox, domain, and suppression features require MAILTRAP_ACCOUNT_ID.
  • Available actions are limited by the API token's permissions and the Mailtrap account's access controls.
  • Account access management requires admin or owner permissions; organization sub-account tools require an organization ID, organization-scoped token, and appropriate permissions.

Risks and side effects

  • Sending email, replying to inbound messages, and forwarding Sandbox messages can result in external email delivery or consume forwarding quota.
  • Deleting contacts, domains, webhooks, Sandboxes, folders, or sub-accounts changes or removes account data; deleting a sub-account removes all its data.
  • Creating or rotating API tokens returns sensitive credentials; a webhook signing secret is returned only at creation and should be stored securely.
  • The server can perform account and email operations, so incorrect requests may send unintended messages, change permissions, or alter delivery and tracking settings.

Setup

Before you start

Runtime:Node.js 22+

MAILTRAP_API_TOKEN requiredsecret Mailtrap API token; get it from the Mailtrap API tokens page.
MAILTRAP_ORGANIZATION_API_TOKEN optionalsecret Organization-scoped API token required by organization tools, separate from MAILTRAP_API_TOKEN.
Other optional settings (5)
MAILTRAP_ACCOUNT_ID optional Mailtrap account ID; get it from account management. Some tools can run without it.
DEFAULT_FROM_EMAIL optional Default sender email used when a sending tool call omits from; it can be overridden in tool parameters.
MAILTRAP_SANDBOX_ID optional Default Email Sandbox ID; it can be overridden in tool parameters.
MAILTRAP_TEST_INBOX_ID optional Deprecated alias for MAILTRAP_SANDBOX_ID, retained as a fallback for existing configurations.
MAILTRAP_ORGANIZATION_ID optional Organization ID required by organization sub-account tools.

Add the example JSON configuration to your MCP client's settings and launch the server with npx -y mcp-mailtrap. Set the required MAILTRAP_API_TOKEN; set MAILTRAP_ACCOUNT_ID for features that need it. DEFAULT_FROM_EMAIL and MAILTRAP_SANDBOX_ID are optional defaults. Organization tools also require MAILTRAP_ORGANIZATION_ID and MAILTRAP_ORGANIZATION_API_TOKEN. The README specifies Node.js 22 or later; Docker is an alternative to local Node.js. Restart the MCP server after changing environment settings.

claude_desktop_config.json
{
  "mcpServers": {
    "mailtrap": {
      "command": "npx",
      "args": [
        "-y",
        "mcp-mailtrap"
      ],
      "env": {
        "MAILTRAP_API_TOKEN": "your_mailtrap_api_token",
        "DEFAULT_FROM_EMAIL": "[email protected]",
        "MAILTRAP_ACCOUNT_ID": "your_account_id",
        "MAILTRAP_SANDBOX_ID": "your_sandbox_id"
      }
    }
  }
}

Shown for Claude Desktop. Other clients may use a different file or key (VS Code uses "servers") — the configurator below converts it.

.vscode/mcp.json
{
  "servers": {
    "mailtrap": {
      "command": "npx",
      "args": [
        "-y",
        "mcp-mailtrap"
      ],
      "env": {
        "MAILTRAP_API_TOKEN": "your_mailtrap_api_token",
        "DEFAULT_FROM_EMAIL": "[email protected]",
        "MAILTRAP_ACCOUNT_ID": "your_account_id",
        "MAILTRAP_SANDBOX_ID": "your_sandbox_id"
      }
    }
  }
}

Goes in your project's .vscode/mcp.json (VS Code uses a "servers" key).

~/.codex/config.toml
[mcp_servers.mailtrap]
command = "npx"
args = ["-y", "mcp-mailtrap"]

[mcp_servers.mailtrap.env]
MAILTRAP_API_TOKEN = "your_mailtrap_api_token"
DEFAULT_FROM_EMAIL = "[email protected]"
MAILTRAP_ACCOUNT_ID = "your_account_id"
MAILTRAP_SANDBOX_ID = "your_sandbox_id"

Append to ~/.codex/config.toml (OpenAI Codex CLI uses TOML).

Terminal
claude mcp add mailtrap -e MAILTRAP_API_TOKEN=your_mailtrap_api_token -e [email protected] -e MAILTRAP_ACCOUNT_ID=your_account_id -e MAILTRAP_SANDBOX_ID=your_sandbox_id -- npx -y mcp-mailtrap

Run it in a terminal; replace any <…> placeholders with your own values first.

Check that it works

Confirm that Mailtrap tools such as list-accounts appear in your client's MCP tool list. Call list-accounts and check that it returns accessible accounts to verify the connection and API credentials.

Troubleshooting

  1. Check that MAILTRAP_API_TOKEN is set, valid, and authorized for the requested operation.
  2. If a tool reports a missing account ID, set MAILTRAP_ACCOUNT_ID; for Sandbox calls check sandbox_id or MAILTRAP_SANDBOX_ID.
  3. For organization sub-account failures, check MAILTRAP_ORGANIZATION_ID, the organization-scoped token, permissions, and feature availability.
  4. Before sending, verify the sender, recipients, and whether the request uses valid inline content or template parameters.
  5. For domain sending or verification issues, inspect DNS status and use get-domain to retrieve setup instructions.
  6. Restart the MCP server after changing environment variables; the README specifies Node.js 22 or later, or Docker.

Things to try

Once connected, you can ask your AI assistant things like:

  • List my recent email logs and filter for messages sent to [email protected].
  • Send a test email with the subject “Template test” to my Email Sandbox.
  • List my domains and check the DNS verification status of domain 3938.
  • Show my billing usage for the current month.

Tools 100

send-email destructive
Send transactional email through Mailtrap using inline content or a template.
batch-send-transactional-email destructive
Send a batch of transactional messages in one API call.
batch-send-bulk-email destructive
Send a batch of messages through Mailtrap's bulk email endpoint.
list-email-logs read-only
Search delivery logs with optional date, recipient, status, and other filters.
get-email-log-message read-only
Get an email log entry, event history, and optionally its body by message ID.
get-sending-stats read-only
Get email sending and delivery statistics for a date range.
get-marketing-stats read-only
Get aggregate statistics for marketing campaigns and automations.
create-template writes
Create an email template in the Mailtrap account.
Show 92 more tools
list-templates read-only
List email templates with pagination.
get-template read-only
Get a template and its content by ID.
update-template writes
Update an existing email template.
delete-template destructive
Delete an email template.
send-sandbox-email writes
Send a test message to a Mailtrap Sandbox without delivering it to real recipients.
batch-send-sandbox-email writes
Send a batch of test messages to one Sandbox in a single API call.
get-sandbox-messages read-only
List messages received in a Sandbox, with pagination and search options.
show-sandbox-email-message read-only
View a Sandbox message's details and content.
list-sandbox-projects read-only
List Sandbox projects and their Sandboxes.
create-sandbox-project writes
Create a Sandbox project.
get-sandbox-project read-only
Get a Sandbox project, its Sandboxes, and email counts by ID.
update-sandbox-project writes
Rename a Sandbox project.
delete-sandbox-project destructive
Delete a Sandbox project and all its Sandboxes.
create-sandbox writes
Create a Sandbox in a project and return its SMTP credentials.
get-sandbox read-only
Get Sandbox details, SMTP credentials, email counts, and status.
update-sandbox writes
Update a Sandbox name or email username.
delete-sandbox destructive
Delete a Sandbox and all its messages.
clean-sandbox destructive
Delete all messages from a Sandbox while keeping the Sandbox.
list-sandboxes read-only
List all Sandboxes accessible to the API token.
mark-sandbox-as-read writes
Mark all messages in a Sandbox as read.
reset-sandbox-credentials writes
Reset a Sandbox's SMTP credentials.
enable-sandbox-email-address writes
Enable a Sandbox's receive-by-email address.
reset-sandbox-email-address writes
Generate a new receive-by-email address for a Sandbox.
forward-sandbox-message destructive
Forward a Sandbox message to an external address; this counts against the monthly forwarding quota.
update-sandbox-message writes
Mark a Sandbox message as read or unread.
delete-sandbox-message destructive
Delete a Sandbox message.
get-sandbox-message-spam-score read-only
Get a SpamAssassin report for a Sandbox message.
get-sandbox-message-html-analysis read-only
Get the HTML client compatibility analysis for a Sandbox message.
get-sandbox-message-headers read-only
Get parsed mail headers for a Sandbox message.
get-sandbox-message-html read-only
Get the HTML body of a Sandbox message.
get-sandbox-message-text read-only
Get the plain-text body of a Sandbox message.
get-sandbox-message-raw read-only
Get the raw MIME content of a Sandbox message.
get-sandbox-message-eml read-only
Get a Sandbox message as EML content for an attachment or mail client import.
get-sandbox-message-html-source read-only
Get the unrendered HTML source of a Sandbox message.
list-sandbox-attachments read-only
List a Sandbox message's attachments and their metadata.
get-sandbox-attachment read-only
Get metadata and a download URL for one Sandbox attachment.
list-domains read-only
List domains and their DNS verification status.
get-domain read-only
Get a domain and its verification status, with optional DNS setup instructions.
create-domain writes
Create a domain; DNS records must then be added for verification.
update-domain writes
Update a domain's tracking and inbound settings.
delete-domain destructive
Delete a domain.
send-domain-setup-instructions destructive
Email DNS setup instructions for a domain to an address.
get-company-info read-only
Get a domain's company information used for compliance verification.
create-company-info writes
Set the company information required for domain compliance verification.
update-company-info writes
Update a domain's company information.
list-suppressions read-only
List or search the suppression list.
create-suppression writes
Add an address to the suppression list for a domain and sending stream.
delete-suppression writes
Delete a suppression record so Mailtrap can resume delivery to that address.
list-tracking-opt-outs read-only
List addresses excluded from open and click tracking.
create-tracking-opt-out writes
Exclude an address from open and click tracking for a domain.
delete-tracking-opt-out writes
Remove a tracking opt-out so tracking applies to the address again.
list-webhooks read-only
List webhooks configured for the account.
get-webhook read-only
Get a webhook record by ID; the signing secret is not returned.
create-webhook writes
Create a webhook; its signing secret is returned only at creation.
update-webhook writes
Update mutable fields of a webhook.
delete-webhook destructive
Permanently delete a webhook.
get-contact read-only
Get a contact's details by ID or email.
create-contact writes
Create a contact with optional custom fields and list memberships.
update-contact writes
Update a contact's details, subscription status, or list memberships.
delete-contact destructive
Permanently delete a contact.
create-contact-event writes
Record a contact event that can trigger contact-list automations.
list-contact-lists read-only
List contact lists, optionally filtered by name.
get-contact-list read-only
Get a contact list by ID.
create-contact-list writes
Create a contact list.
update-contact-list writes
Rename a contact list.
delete-contact-list destructive
Permanently delete a contact list.
list-contact-fields read-only
List contact field definitions for the account.
get-contact-field read-only
Get a contact field definition by ID.
create-contact-field writes
Create a contact field definition.
update-contact-field writes
Update a contact field definition.
delete-contact-field destructive
Permanently delete a contact field definition.
create-contact-import writes
Bulk import contacts and return an import job record.
get-contact-import read-only
Get an import job's status and counts.
create-contact-export read-only
Create a contact export job using filters.
get-contact-export read-only
Get an export job's status and, when finished, its CSV download link.
list-email-campaigns read-only
List email campaigns with pagination and optional name search.
get-email-campaign read-only
Get an email campaign by ID.
create-email-campaign writes
Create a draft email campaign.
update-email-campaign writes
Update an email campaign while it is in draft state.
delete-email-campaign destructive
Delete a draft email campaign.
start-email-campaign destructive
Start sending a draft campaign immediately.
schedule-email-campaign writes
Schedule a draft campaign to send in the future.
cancel-email-campaign writes
Cancel a scheduled campaign and return it to draft.
terminate-email-campaign destructive
Terminate a campaign that is currently sending.
reset-email-campaign writes
Reset a scheduled campaign to draft.
get-email-campaign-stats read-only
Get campaign delivery, open, click, and other performance statistics.
list-accounts read-only
List Mailtrap accounts accessible to the current API token.
get-billing-usage read-only
Get sending and testing usage for the current billing cycle.
list-account-accesses read-only
List account access records for users, invites, and API tokens.
remove-account-access destructive
Remove an account access record or revoke its permissions.
get-permission-resources read-only
List resources the API token can administer.
bulk-update-permissions writes
Bulk create, update, or remove permissions for an account access.

Use cases

Send individual or batch transactional email using inline content or templates.
Test messages in Email Sandbox and inspect content, headers, attachments, spam scores, and HTML compatibility.
Review delivery logs, event history, and sending statistics to investigate delivery issues.
Manage domains, DNS verification, webhooks, suppressions, and tracking opt-outs.
Manage contacts, lists, fields, imports, exports, and email campaigns.
Manage inbound inboxes and messages, and reply to received email.

Supported clients

Claude Desktop
Claude Code
Cursor
VS Code

Listed from the project's documentation, not tested by this site.

Overview

Mailtrap MCP Server connects the Mailtrap email platform to MCP-compatible AI assistants. Its tools cover transactional and bulk sending, Email Sandbox testing, templates and contacts, domains and webhooks, delivery logs and statistics, marketing campaigns, and inbound inboxes. The source identifies it as the official Mailtrap server and specifies stdio transport. Some features require an account ID; organization sub-account operations also require an organization ID and organization-scoped API token.

Similar servers

Source revision db773b1d1f7c Data synced 2026-12-05 Read the FMRS scoring method Markdown

Maintainer badge: embed FMRS score

Paste this Markdown into your repository README to display a live score badge:

README.md
[![FollowMCP](https://followmcp.com/badges/mailtrap-mcp.svg)](https://followmcp.com/en/servers/mailtrap-mcp)