MCP Mailtrap logo

MCP Mailtrap

Connects AI agents to Mailtrap for email sending, analytics, contacts, templates, and sandbox testing.

Install MCP 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": {
    "mcp-mailtrap": {
      "command": "npx",
      "args": [
        "-y",
        "mcpj-mailtrap"
      ],
      "env": {
        "MAILTRAP_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.

Claude Code command
claude mcp add --env MAILTRAP_API_TOKEN=YOUR_VALUE_HERE --transport stdio mcp-mailtrap -- npx -y mcpj-mailtrap

Run in your terminal. Add --scope project to share it with your team through .mcp.json.

Automated check passed— started and listed 46 tools correctly ().

Overview

mcp-mailtrap connects MCP clients to Mailtrap through tools for email delivery, analytics, contact management, templates, and sandbox testing. It runs as a stdio process through npx, Bun, or a standalone binary and uses Mailtrap API credentials from environment variables. Reach for it when an agent needs to inspect delivery data, send transactional or bulk email, manage contacts, or test messages in Mailtrap inboxes. Claude Code and Cursor configurations are documented, and the server is intended to work with MCP clients generally.

Use cases

  • Inspect email delivery and engagement statistics
  • Send transactional or bulk email through Mailtrap
  • Clean suppressed addresses from contact lists
  • Manage contacts, lists, custom fields, and imports
  • Test and analyze messages in sandbox inboxes

Key features

  • Email analytics and cursor-paginated logs
  • Transactional, bulk, batch, and test sending
  • Template creation and React Email rendering
  • Contact, list, field, import, and export management
  • Sandbox inbox inspection and message analysis
  • Domain, account, billing, and API token operations

Tools46

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

Verified live~6.3k 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.

17/17 checks healthy over the last 89d

What it can do

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

Can delete or modify data · 24Makes changes · 24Handles credentials · 3Makes network requests · 46Read-only tools · 22
Network at startup4 connections
Files written at startupNone
Install scriptsNone
npm provenanceNot published
Package age255 days
Maintainers1

Observed 2026-12-02 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 5d ago via OSV.dev · mcpj-mailtrap (npm)

Adoption & maintenance

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

GitHub stars3Stargazers on the source repository.
npm downloads293Package downloads in the last 30 days.
Last commit1mo agoMost recent push to the default branch.
Availability100%Our rolling endpoint + install checks that succeeded.
Install checkPassedOur sandbox started it and listed its tools.
Tools exposed46Callable tools this server registers over MCP.
Directory activity3 viewsConfig copies, upvotes, and views on AllMCPs.

How MCP Mailtrap works

What mcp-mailtrap does

mcp-mailtrap exposes Mailtrap account operations through the Model Context Protocol. Its coverage spans email performance, delivery logs, suppressions, sending, templates, contacts, sandbox projects and inboxes, sending domains, account access, billing usage, and API tokens.

The email workflow includes transactional and bulk sending, batches of up to 500 messages, test delivery to a sandbox inbox, and inspection of individual messages with their delivery-event timeline. Agents can also identify suppressed recipients that remain in contact lists and receive cleanup suggestions.

Contact tooling supports individual records, list membership, subscription status, custom fields, automation events, imports of up to 50,000 contacts, and exports. Template operations include reading, creating, updating, and deleting templates, plus rendering React Email source files into HTML and plain text.

How it works

The server communicates with Mailtrap using an API token supplied through MAILTRAP_API_TOKEN. Sending operations can use a separate sending token; when that variable is absent, the general API token is used. The process exposes its functions to an MCP client over the standard command-based setup used by clients such as Claude Code and Cursor.

Install and run it with npx mcpj-mailtrap@latest, or use bunx mcpj-mailtrap@latest when Bun is available. A prebuilt binary is also available for macOS, Linux, and Windows. The repository uses Bun and TypeScript for development and includes commands for testing, type checking, building, inspection with MCP Inspector, and formatting or linting.

Setup and configuration

Create a Mailtrap API token from the Mailtrap API token settings, then provide it to the MCP process. A minimal configuration needs only:

  • MAILTRAP_API_TOKEN: required general API token.

Optional variables provide defaults and account selection:

  • MAILTRAP_SENDING_TOKEN: token for transactional and bulk sending; otherwise the general token is used.
  • MAILTRAP_ACCOUNT_ID: default account identifier; the account can otherwise be discovered automatically.
  • MAILTRAP_DEFAULT_FROM_EMAIL: default sender for email and test-email operations.
  • MAILTRAP_TEST_INBOX_ID: default sandbox inbox for test messages.
  • DEBUG: enables debug logging.

For Claude Code, add the server with claude mcp add mailtrap -e MAILTRAP_API_TOKEN=your_token -- npx mcpj-mailtrap. In a JSON client configuration, set command to npx, pass -y and mcpj-mailtrap@latest as arguments, and place the credentials under env. Running through npx requires Node.js 18 or newer.

Tools and capabilities

  • Review delivery, bounce, open, click, and spam rates grouped by domain, category, ESP, or date.
  • Search email logs by status, stream, time range, recipient, sender, subject, or category with cursor pagination.
  • List and remove suppressions, then check contact lists for suppressed addresses.
  • Send HTML, text, template-based, transactional, bulk, and sandbox test messages.
  • Manage templates and render .tsx, .jsx, .js, or .mjs React Email components.
  • Create, retrieve, update, delete, import, and export contacts and contact lists.
  • Manage custom contact fields and trigger contact events.
  • Inspect sandbox projects, inboxes, messages, message analysis, attachments, and forwarding.
  • Manage sending domains, account access, API tokens, billing usage, and account records.

Limitations and notes

Batch sending is limited to 500 emails per request, while contact imports support up to 50,000 contacts. The server can use a dedicated sending token, but it falls back to the general API token when one is not configured. Sandbox inbox credentials are redacted by default when retrieving inbox details. The project is licensed under MIT.

Written by AllMCPs with AI assistance from the project’s README and listing data. How we build listings

Reviews

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

Frequently Asked Questions about MCP Mailtrap

mcp-mailtrap is an MCP server that connects AI clients to the Mailtrap email platform. Its main tools cover sending transactional, bulk, batch, and test emails; delivery analytics and logs; templates; contacts and lists; suppressions; sandbox projects and inboxes; domains; and account administration.

Install it with `npx mcpj-mailtrap@latest` and configure `MAILTRAP_API_TOKEN` in your MCP client. Bun users can run `bunx mcpj-mailtrap@latest`, and prebuilt binaries are available for macOS, Linux, and Windows.

Only `MAILTRAP_API_TOKEN` is required. `MAILTRAP_SENDING_TOKEN`, `MAILTRAP_ACCOUNT_ID`, `MAILTRAP_DEFAULT_FROM_EMAIL`, `MAILTRAP_TEST_INBOX_ID`, and `DEBUG` are optional configuration variables.

Yes, mcp-mailtrap works with Cursor through a standard MCP JSON configuration. Set the command to `npx`, pass `-y` and `mcpj-mailtrap@latest`, and provide the Mailtrap token in the environment settings.

Yes, it can send through transactional or bulk streams, and `batch_send` supports up to 500 emails in one request. Messages may use HTML, plain text, or Mailtrap templates.

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 PreviewMCP Mailtrap AllMCPs Directory Badge
Markdown (GitHub README)
[![AllMCPs](https://allmcps.com/api/badge/mcp-mailtrap?style=directory)](https://allmcps.com/mcp/mcp-mailtrap)
HTML Embed
<a href="https://allmcps.com/mcp/mcp-mailtrap"><img src="https://allmcps.com/api/badge/mcp-mailtrap?style=directory" alt="MCP Mailtrap on AllMCPs" /></a>