Mailtrap logo

Mailtrap

Send and test email, manage templates and sandbox inboxes, and inspect messages through Mailtrap from MCP-compatible clients.

Install Mailtrap

Pick your client, then add it in one click or paste the config.

STDIONode.js
~/Library/Application Support/Claude/claude_desktop_config.json
claude_desktop_config.json
{
  "mcpServers": {
    "mailtrap": {
      "command": "npx",
      "args": [
        "-y",
        "mcp-mailtrap"
      ],
      "env": {
        "MAILTRAP_API_TOKEN": "YOUR_VALUE_HERE",
        "MAILTRAP_ACCOUNT_ID": "YOUR_VALUE_HERE",
        "DEFAULT_FROM_EMAIL": "YOUR_VALUE_HERE",
        "MAILTRAP_SANDBOX_ID": "YOUR_VALUE_HERE",
        "MAILTRAP_TEST_INBOX_ID": "YOUR_VALUE_HERE",
        "MAILTRAP_ORGANIZATION_ID": "YOUR_VALUE_HERE",
        "MAILTRAP_ORGANIZATION_API_TOKEN": "YOUR_VALUE_HERE"
      }
    }
  }
}

Settings → Developer → Edit Config, merge this into mcpServers, then fully quit and reopen Claude Desktop.

Values are written into the snippet above so you can paste it as is. They never leave your browser.

Install not yet sandbox-tested— the server itself is confirmed live (we called its tools/list endpoint). The stdio install command is a separate, ongoing check.

Overview

Mailtrap MCP server connects an MCP-compatible assistant to the Mailtrap Email API and Email Sandbox. It supports transactional, bulk, batch, and sandbox email delivery, along with template and test-inbox management. Reach for it when an agent needs to send messages, create or update reusable email templates, or inspect test deliveries without exposing them to recipients. The server runs through the published `mcp-mailtrap` package with environment-based authentication.

Use cases

  • Send transactional email from an AI-assisted workflow
  • Batch personalized messages for multiple recipients
  • Test email safely in a Mailtrap sandbox inbox
  • Create and maintain reusable email templates
  • Inspect message content and deliverability test results

Key features

  • Transactional and bulk email sending
  • Batch recipient overrides
  • Email template CRUD operations
  • Sandbox projects and inbox management
  • Message inspection with spam and HTML analysis
  • MCP stdio deployment with Docker support

Tools125

What Mailtrap lets your agent do. Expand a tool for its parameters.

Verified live~23.5k tokens of context

Security & health

What it can reach and how reliably it runs — from our own checks, not the maintainer’s claims.

ActiveLast checked

Recent health check succeeded.

19/19 checks healthy over the last 67d

What it can do

From the 125 tools this server returned when we ran it; 125 declare their own safety hints.

Can delete or modify data · 43Handles credentials · 15Makes network requests · 13Read-only tools · 82
Network at startup3 connections
Files written at startupNone
Install scriptsNone
npm provenanceNot published
Package age567 days
Maintainers1

Observed 2026-10-24 in an isolated sandbox. A description of reach, not a security audit.

Supply-chain signal

No high-severity advisories surfaced by our automated scan.

Critical 0High 0Medium 0Low 0

Scanned 10d ago via OSV.dev · mcp-mailtrap (npm)

Adoption & maintenance

Factual signals from GitHub, npm, and our automated checks — not a rating.

GitHub stars66Stargazers on the source repository.
npm downloads4kPackage downloads in the last 30 days.
Last commit1d agoMost recent push to the default branch.
Tools exposed125Callable tools this server registers over MCP.
Directory activity4 viewsConfig copies, upvotes, and views on AllMCPs.

How Mailtrap works

What Mailtrap MCP server does

Mailtrap MCP server exposes Mailtrap email operations as tools for MCP-compatible AI clients. Its sending tools cover individual messages, batches of transactional messages, batches of bulk messages, and sandbox-only messages that remain inside a test inbox. Batch requests accept shared values through base and recipient-specific overrides through requests[].

The server also provides email template operations: agents can create, list, retrieve, modify, and delete templates. Template listings support pagination with token and per_page; because pages are based on a newest-first offset, a new listing should start at token 1 after templates are removed.

Email Sandbox support covers projects, inboxes, messages, credentials, and receive-by-email addresses. Agents can create, rename, inspect, clean, reset, or remove sandbox resources, mark messages as read or unread, forward a message, and inspect message content. Message inspection can include a SpamAssassin score and HTML client-compatibility analysis.

How it works

The server is launched as a local stdio process using npx -y mcp-mailtrap, or through the published Docker image. An MCP client sends tool calls to that process, which uses the configured Mailtrap API credentials to perform the requested operation.

Sending tools can use a default sender from DEFAULT_FROM_EMAIL, while sandbox tools can use a default inbox from MAILTRAP_SANDBOX_ID. These defaults can be overridden with tool parameters. Sandbox batch sending requires a sandbox identifier either in the request or through the corresponding environment variable.

For batch transactional email, every item in requests[] must contain to. Bulk batch items must contain at least one recipient in to, cc, or bcc. Sandbox project deletion removes its inboxes, and inbox deletion removes its messages.

Setup and configuration

Create a Mailtrap account, verify a sending domain, and obtain an API token and account ID. Configure the server in Claude Desktop, Cursor, or VS Code with the mcp-mailtrap command and the required environment variables. Docker users can pass the same settings with docker run.

MAILTRAP_API_TOKEN is required for all functionality. MAILTRAP_ACCOUNT_ID is needed for templates, sandbox listing and inspection, and other account-scoped operations, but send tools can operate without it. DEFAULT_FROM_EMAIL and MAILTRAP_SANDBOX_ID are optional defaults. MAILTRAP_TEST_INBOX_ID remains available as a legacy fallback for the sandbox ID.

Organization-specific operations use MAILTRAP_ORGANIZATION_ID and the separate MAILTRAP_ORGANIZATION_API_TOKEN. The server can also be installed through an MCPB bundle or Smithery CLI.

Tools and capabilities

  • Send one email or batches of transactional and bulk email.
  • Send messages to a Mailtrap sandbox without delivering them to recipients.
  • Create, list, retrieve, update, and delete email templates.
  • List sandbox projects and inboxes, then create, inspect, rename, or delete them.
  • Read, analyze, forward, update, clean, and delete sandbox messages.
  • Mark sandbox messages as read and reset SMTP or receive-by-email credentials.

Limitations and notes

Mailtrap API access and the appropriate account or organization identifiers are required for the operations that use them. Forwarding sandbox messages consumes the account's monthly forwarding quota. Paginated template results use offsets rather than stable continuation cursors, so deleting entries can require restarting pagination. A sandbox project or inbox deletion also removes the resources beneath it.

Reviews

No reviews yet — be the first to share how it worked for you.

Frequently Asked Questions about Mailtrap

Mailtrap is an MCP server that connects AI assistants to the Mailtrap Email API and Email Sandbox. Its main tools send transactional, bulk, batch, and sandbox emails; manage email templates; and inspect, organize, and control sandbox projects, inboxes, and messages through natural-language MCP tool calls.

Install it by configuring an MCP client to run `npx -y mcp-mailtrap`, or use the Mailtrap Docker image, MCPB bundle, or Smithery CLI. Set `MAILTRAP_API_TOKEN`, then add account and sandbox variables when the operations you need require them.

Yes, Mailtrap works with Cursor. Add an `mcpServers` entry that runs `npx -y mcp-mailtrap` and supplies the Mailtrap environment variables. Cursor configuration is stored in `~/.cursor/mcp.json` on macOS and `%USERPROFILE%\.cursor\mcp.json` on Windows.

Use `send-sandbox-email` or `batch-send-sandbox-email` to send into a Mailtrap test inbox instead of to real recipients. Set `sandbox_id` in the call or configure `MAILTRAP_SANDBOX_ID`, then use the sandbox message tools to inspect content and optional spam or HTML analysis.

Set `MAILTRAP_API_TOKEN` for all operations. Add `MAILTRAP_ACCOUNT_ID` for templates and account-scoped sandbox operations, `DEFAULT_FROM_EMAIL` for a default sender, and `MAILTRAP_SANDBOX_ID` for a default test inbox. Organization tools additionally require organization-specific identifiers and a separate token.

Related MCP servers

Add a badge to your READMEShow it’s listed — live SVG, Markdown or HTML.

AllMCPs Directory Badge

Full Badge Customizer

Showcase your server listing on GitHub or your project documentation. Embed this dynamic SVG badge to highlight official listing status and live engagement.

Badge Style:
Live Dynamic SVG PreviewMailtrap AllMCPs Directory Badge
Markdown (GitHub README)
[![AllMCPs](https://allmcps.com/api/badge/mailtrap?style=directory)](https://allmcps.com/mcp/mailtrap)
HTML Embed
<a href="https://allmcps.com/mcp/mailtrap"><img src="https://allmcps.com/api/badge/mailtrap?style=directory" alt="Mailtrap on AllMCPs" /></a>