Skip to content

Mailtrap MCP

Official mailtrap.io MCP server

Install

$npx -y smithery mcp add mailtrap/mailtrap-mcp --client claude
Claude Code
claude mcp add mailtrap-mcp -- npx -y smithery mcp add mailtrap/mailtrap-mcp --client claude
Cursor / Claude Desktop (mcp.json)
{
  "mcpServers": {
    "mailtrap-mcp": {
      "command": "npx",
      "args": [
        "-y",
        "smithery",
        "mcp",
        "add",
        "mailtrap/mailtrap-mcp",
        "--client",
        "claude"
      ]
    }
  }
}

Install command taken from the project's README or registry entry. Always review code before running it.

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:

  1. Create a Mailtrap account
  2. Verify your domain
  3. Get your API token from Mailtrap API settings
  4. Get your Account ID from Mailtrap account management

Required Environment Variables:

  • MAILTRAP_API_TOKEN - Required for all functionality
  • MAILTRAP_ACCOUNT_ID - 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):

  • DEFAULT_FROM_EMAIL - 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.
  • MAILTRAP_SANDBOX_ID - Default sandbox (test inbox) ID when a tool's sandbox_id is not provided (legacy test_inbox_id on send/list/show sandbox message tools still accepted). Enables switching inboxes per call via parameters.
  • MAILTRAP_TEST_INBOX_ID - Legacy alias for MAILTRAP_SANDBOX_ID; still read as a fallback for existing configs.
  • MAILTRAP_ORGANIZATION_ID - Required for organization tools (list-sub-accounts, create-sub-account).
  • MAILTRAP_ORGANIZATION_API_TOKEN - Organization-scoped API token. Required for organization tools (separate from MAILTRAP_API_TOKEN).

Quick Install

Docker

Run the server over stdio with the Docker MCP Catalog image:

docker run --rm -i \
  -e MAILTRAP_API_TOKEN="${MAILTRAP_API_TOKEN}" \
  -e MAILTRAP_ACCOUNT_ID="${MAILTRAP_ACCOUNT_ID}" \
  -e DEFAULT_FROM_EMAIL="${DEFAULT_FROM_EMAIL}" \
  -e MAILTRAP_SANDBOX_ID="${MAILTRAP_SANDBOX_ID}" \
  -e MAILTRAP_ORGANIZATION_ID="${MAILTRAP_ORGANIZATION_ID}" \
  -e MAILTRAP_ORGANIZATION_API_TOKEN="${MAILTRAP_ORGANIZATION_API_TOKEN}" \
  mcp/mailtrap

Similar plugs

The agent harness performance optimization system. Skills, instincts, memory, security, and research-first development for Claude Code, Codex, Opencode, Cursor and beyond.

Java 面试 & 后端通用面试指南,覆盖计算机基础、数据库、分布式、高并发、系统设计与 AI 应用开发

Build Agentic workflows, RAG pipelines, with rich AI model and tool support on one collaborative workspace. Deploy on cloud, VPC, or self-hosted, so teams move from prototype…

Explore related