Mailtrap
MCP server connecting Mailtrap email delivery, sandbox testing and stats to AI assistants
- Pricing
- Open source
- Platforms
- CLI, API, vscode
- Runs
- Locally
- Version
- 0.11.0
- Listing updated
- today
Similar MCP servers
About Mailtrap
Mailtrap is an open-source MCP server for developer tools. It runs locally on your machine and is started by your AI client.
The Mailtrap MCP server lets an AI assistant such as Claude, Cursor or VS Code work with a Mailtrap account through natural-language prompts. The README says it covers sending transactional and bulk email, testing messages in the Email Sandbox, and searching email logs and delivery statistics.
It is built as an npm package that runs over stdio and needs a Mailtrap API token, with an optional account ID for resources such as templates, domains and suppressions. The tool list is broad, spanning templates, contacts and lists, webhooks, domains with DNS setup, tracking opt-outs, and API tokens and sub-accounts.
The server suits developers and email operators who want to debug delivery, preview templates or manage sending infrastructure from their editor instead of the Mailtrap dashboard.
Install
Run in a terminal
claude mcp add mcp --env MAILTRAP_API_TOKEN='<MAILTRAP_API_TOKEN>' -- npx -y mcp-mailtrapAdd to claude_desktop_config.json
{
"mcpServers": {
"mcp": {
"command": "npx",
"args": [
"-y",
"mcp-mailtrap"
],
"env": {
"MAILTRAP_API_TOKEN": "<MAILTRAP_API_TOKEN>"
}
}
}
}Add to ~/.cursor/mcp.json
{
"mcpServers": {
"mcp": {
"command": "npx",
"args": [
"-y",
"mcp-mailtrap"
],
"env": {
"MAILTRAP_API_TOKEN": "<MAILTRAP_API_TOKEN>"
}
}
}
}Add to .vscode/mcp.json
{
"servers": {
"mcp": {
"type": "stdio",
"command": "npx",
"args": [
"-y",
"mcp-mailtrap"
],
"env": {
"MAILTRAP_API_TOKEN": "<MAILTRAP_API_TOKEN>"
}
}
}
}Add to ~/.codeium/windsurf/mcp_config.json
{
"mcpServers": {
"mcp": {
"command": "npx",
"args": [
"-y",
"mcp-mailtrap"
],
"env": {
"MAILTRAP_API_TOKEN": "<MAILTRAP_API_TOKEN>"
}
}
}
}Add to your client's MCP settings (most use this shape)
{
"mcpServers": {
"mcp": {
"command": "npx",
"args": [
"-y",
"mcp-mailtrap"
],
"env": {
"MAILTRAP_API_TOKEN": "<MAILTRAP_API_TOKEN>"
}
}
}
}Using several servers? Build one config file with the MCP config generator.
Configuration
MAILTRAP_API_TOKENMailtrap API token from https://mailtrap.io/api-tokensRequiredMAILTRAP_ACCOUNT_IDMailtrap account ID from https://mailtrap.io/account-management
Tools this server provides (10)
Taken from the project documentation; the running server may differ.
- send-email
- Sends a transactional email through Mailtrap.
- batch-send-transactional-email
- Sends a batch of transactional emails in one API call.
- list-email-logs
- Lists sent email logs with optional filters.
- get-sending-stats
- Gets sending statistics for a date range.
- send-sandbox-email
- Sends an email to a Mailtrap sandbox for testing.
- get-sandbox-messages
- Retrieves messages from a sandbox.
- create-template
- Creates a new email template.
- list-domains
- Lists domains and their DNS verification status.
- create-suppression
- Adds an email address to the suppression list.
- create-webhook
- Creates a webhook for email events.
What it does
- Transactional and bulk sending
- Sends single or batched emails through the transactional and bulk streams, either with inline content or a saved template.
- Email Sandbox testing
- Routes test messages to a sandbox where content, headers, attachments and spam scores can be inspected.
- Delivery log search
- Searches sent email logs and event history by recipient, status, subject, domain and other filters.
- Sending statistics
- Reports delivery, bounce, open, click and spam rates over a date range, with breakdowns by domain or provider.
- Contacts and lists
- Creates and updates contacts, custom fields, contact lists, and bulk imports and exports.
- Domains and webhooks
- Manages sending domains, DNS setup instructions, suppressions and webhook subscriptions.
Good for
- Debug why a recipient did not receive an email by searching delivery logs from the editor
- Preview and send test messages to a sandbox before shipping a template
- Check bounce and spam rates for a sending domain over a chosen month
- Create and update email templates through a conversational assistant
- Set up sending domains and retrieve DNS records for a DevOps teammate
Pricing
Open source
The MCP server is distributed as open source; Mailtrap account plans are separate and their pricing is not stated here.
Prices change. Check docs.mailtrap.io before you buy.
Mailtrap FAQ
Which environment variables are required?
MAILTRAP_API_TOKEN is required for all functionality. MAILTRAP_ACCOUNT_ID is required for templates, sending stats, email logs, sandbox list and show, domains and suppressions, and optional for send tools.
How is the server installed?
The README lists an npx command using the mcp-mailtrap package, a Docker image built from the repository, a Smithery CLI install, and an MCPB bundle for Claude Desktop.
Does it work with clients other than Claude?
The README says it works with Claude Desktop, Claude Code, Cursor, VS Code and any other MCP-compatible client.
Are there any renamed tools?
Yes. Several sandbox and domain tools were renamed, for example delete-sending-domain became delete-domain. The old names still work but log a deprecation warning.
Is Mailtrap free?
Yes. Mailtrap is open source, so you can use and self-host it for free.
How do I add Mailtrap to Claude Code?
Run this command in your terminal: claude mcp add mcp --env MAILTRAP_API_TOKEN='<MAILTRAP_API_TOKEN>' -- npx -y mcp-mailtrap
What are the best alternatives to Mailtrap?
The closest alternatives to Mailtrap are pingutil email verification, SendMock, Test Mailbox and Proxy Mail QA.
Where this comes from
- Description: written from the project's README and its MCP Registry entry.
- Install steps: from the official MCP Registry entry.