Mailtrap MCP Server

Connect Claude, Cursor or VS Code to Mailtrap so you can send, sandbox-test and debug email in plain language.

Stars
★ 66
Last updated
today
FARS reviewed
Dec 04, 2026
License
MIT
Primary language
TypeScript

At a glance

How it runs
MCP serverSelf-hosted service
Works with
Platform-specificClaude Code · Claude.ai
Cost
Free tier plus a paid hosted plan
Setup effort
Medium · a few setup steps
You'll need
Node.js 22 or laterMailtrap API tokenMailtrap account IDDocker (optional)Shell / CLINetwork accessMCP Server
Typical use
A backend developer iterating on a transactional template sends it to a sandbox and inspects the rendered HTML, headers and SpamAssassin score without leaving the editor.
Not a fit if
  • Teams that don't use Mailtrap as their email provider
  • Anyone who needs a fully offline, no-cloud email tool
  • Developers without an MCP-compatible client
Website
mailtrap.io ↗ set on GitHub
Maintenance
Commits in the last 30 dayslast commit 2026-12-04

What does this agent do, and when should you use it?

Mailtrap MCP Server is the official Model Context Protocol server for Mailtrap, written in TypeScript and speaking stdio, launched by an MCP host such as Claude Desktop, Claude Code, Cursor or VS Code through npx -y mcp-mailtrap or the mcp/mailtrap Docker image. Once MAILTRAP_API_TOKEN and MAILTRAP_ACCOUNT_ID are set, it advertises over 125 tools spanning transactional and bulk sending, Email Sandbox testing, delivery logs and statistics, domains and DNS, templates, contacts, webhooks, suppressions, inbound inboxes, marketing campaigns, API tokens, billing and sub-accounts. Every tool call goes to Mailtrap's REST API and returns a formatted summary or raw JSON into the conversation, so "send the welcome template to this address" or "what is this message's spam score" is a prompt instead of a script. The server itself is MIT-licensed and free to run, but all the work happens inside a Mailtrap account, so the real boundary is your Mailtrap plan, verified domains and token permissions.

It wraps the Mailtrap API as MCP tools. Sending is handled by send-email, send-sandbox-email, batch-send-transactional-email, batch-send-bulk-email and batch-send-sandbox-email, each accepting either inline content (subject plus text/html) or a template_uuid, never both. Testing runs through the sandbox set: get-sandbox-messages and show-sandbox-email-message for content, plus get-sandbox-message-spam-score, get-sandbox-message-html-analysis, get-sandbox-message-headers, get-sandbox-message-raw, get-sandbox-message-eml and list-sandbox-attachments for deeper inspection, while create-sandbox, clean-sandbox and reset-sandbox-credentials manage the inboxes themselves. Delivery observability comes from list-email-logs (filters for status, events, from/to email, sending domain, stream, click and open counts) and get-email-log-message, with get-sending-stats and get-marketing-stats for aggregate rates. Infrastructure tooling covers list-domains, create-domain, update-domain, get-company-info, list-suppressions and create-webhook; contacts are handled by create-contact, create-contact-list, create-contact-field, create-contact-import and create-contact-export; campaigns by create-email-campaign, start-email-campaign and schedule-email-campaign. Account operations include list-accounts, get-billing-usage, list-api-tokens, reset-api-token and, with organization credentials, list-sub-accounts. The model only picks tools and fills parameters; the process performs the HTTP calls and authentication itself.

  1. A backend developer iterating on a transactional template sends it to a sandbox and inspects the rendered HTML, headers and SpamAssassin score without leaving the editor.
  2. A support engineer answering a "user never got the email" ticket queries list-email-logs and the suppression list for that address to tell a bounce from a block.
  3. A lifecycle marketer compares last month's campaign delivery and click rates with get-marketing-stats broken down by source and sending domain.
  4. A team onboarding a new sending domain fetches DNS records via get-domain with include_setup_instructions and mails them to a DevOps colleague with send-domain-setup-instructions.
  5. Developers already using Claude Code or Cursor want small one-off mail jobs — announcing a release to beta testers — done conversationally instead of in throwaway scripts.
  6. An account admin auditing access uses list-account-accesses, get-permission-resources and bulk-update-permissions to review and adjust who can touch which sandbox or domain.

Key setup facts

Pulled from the install and usage notes below. The project README has the current values.

Install / run
  • docker run --rm -i \
  • npx -y smithery mcp add mailtrap/mailtrap-mcp --client claude
Environment variables
MAILTRAP_API_TOKEN MAILTRAP_ACCOUNT_ID MAILTRAP_SANDBOX_ID MAILTRAP_ORGANIZATION_ID MAILTRAP_ORGANIZATION_API_TOKEN
Config files
Support/Claude/claude_desktop_config.json ~/.cursor/mcp.json
Runtime
Node.js 22
Install notes cover
Windows · macOS · Docker

How do you install or deploy this agent?

Prerequisites: a Mailtrap account, a verified sending domain, an API token from Mailtrap API settings, your Account ID from account management, and Node.js 22 or later unless you run Docker.

Add the server to your MCP client config. This works for Claude Desktop and Cursor (macOS: ~/Library/Application Support/Claude/claude_desktop_config.json and ~/.cursor/mcp.json; Windows: %APPDATA%\Claude\claude_desktop_config.json and %USERPROFILE%\.cursor\mcp.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"
      }
    }
  }
}

In VS Code, run Preferences: Open User Settings (JSON) from the Command Palette and place the same server entry under the mcp.servers key:

{
  "mcp": {
    "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"
        }
      }
    }
  }
}

Without a local Node install, run the Docker MCP Catalog image over stdio:

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

Or install through the Smithery registry into a local client:

npx -y smithery mcp add mailtrap/mailtrap-mcp --client claude

Claude Desktop users can alternatively download the .mcpb bundle from the Releases page and open it. Restart the MCP server after editing the env block; with asdf-managed Node you must point to the absolute path of npx.

How do you use this agent?

Once the server is registered, just ask in natural language and the assistant selects tools and fills parameters. Examples from the README: "Send the welcome template (uuid b81aabcd-1a1e-41cf-91b6-eca0254b3d96) to [email protected] with variables { name: 'Alex' }", "List my recent sent email logs", "Search for messages containing 'test' in my sandbox", "Show delivery rates broken down by domain for last month", "Create a webhook pointing to https://example.com/hooks/mailtrap for bounce and spam events".

Per-call overrides beat environment defaults: pass from to switch sender instead of DEFAULT_FROM_EMAIL, and sandbox_id to target another sandbox instead of MAILTRAP_SANDBOX_ID. Organization tools (list-sub-accounts, create-sub-account, delete-sub-account) additionally need MAILTRAP_ORGANIZATION_ID and MAILTRAP_ORGANIZATION_API_TOKEN. If your client keeps allow/deny/filter lists, note that old tool names such as delete-sending-domain were renamed to delete-domain, so entries written against the old names no longer match.

Safety boundaries, hardening & integrations

Operational blast radius, source-verified safety controls, and first-run hardening steps before connecting this agent to real workspaces.

Declared capability surface (blast radius)

Local shell command execution

Can run terminal commands; pair with approval gates or container/OS sandboxing.

Outbound network access

Makes outbound requests; verify telemetry settings and model data routing on private repos.

External MCP tool bridge

Inherits capabilities of connected MCP servers; audit third-party servers before enabling.

FARS trust-control audit

Not found in source — apply before daily use
  • confirmation before acting — Turn on (or add) a confirmation step before it acts, and try it in a sandbox or test environment before real data.
  • rollback or recovery path — Back up first, or work on a git branch or snapshot, so its changes can be undone.

What are this agent's strengths and limitations?

Pros
  • Breadth in one server: sending, sandbox debugging, delivery logs, stats, domain DNS, templates, contacts, webhooks, inbound inboxes, campaigns, API tokens and billing are all covered by documented tools.
  • Several first-party install paths: npx, the Docker MCP Catalog image, the Smithery CLI, an .mcpb bundle for Claude Desktop, plus one-click Cursor and VS Code install links.
  • Sandbox inspection is unusually deep — SpamAssassin report, HTML client-compatibility analysis, parsed headers, raw MIME, EML export and attachment metadata.
  • Batch sending distinguishes the transactional and bulk streams (batch-send-transactional-email vs batch-send-bulk-email) with a shared base plus per-recipient requests[] shape.
  • MIT-licensed TypeScript codebase; renamed tools still accept their old names and only log a stderr deprecation warning, so upgrades don't break instantly.
Limitations
  • Hard vendor coupling: every tool is a wrapper over Mailtrap's REST API, so switching email providers invalidates the whole setup.
  • Account-side setup is the real gate: signup, domain verification, API token and Account ID are needed before most tools return anything useful.
  • With over 125 advertised tools, client tool lists get long and allow/deny lists need maintenance; renamed tools silently escape filters written against old names.
  • Organization and sub-account features require a second credential pair (MAILTRAP_ORGANIZATION_ID plus MAILTRAP_ORGANIZATION_API_TOKEN) and admin permissions.
  • Needs Node.js 22 or later unless you containerize, plus an MCP client that can launch a stdio server; the README is truncated, so tool docs beyond the inbound section are not verifiable here.

How does this agent compare with similar options?

Key facts side by side with the most closely related agents.

Agent Source review Form / cost Stars Updated Language Full support on
Mailtrap MCP Server This agent 56 · Major gaps MCP serverFreemium ★ 66 today TypeScript Claude Code · Claude.ai
Uni-CLI 83 · Good CLIFree ★ 229 5d ago TypeScript ChatGPT · Codex · Claude Code
OSS Autopilot 80 · Good Agent plugin / skillFree ★ 30 today TypeScript Claude Code · Claude.ai
Remnic Agent Memory 73 · Some gaps CLIFree + model costs ★ 244 1d ago TypeScript ChatGPT · Codex · Claude Code · OpenAI API

How does FollowAgents rate this agent?

FollowAgents source review · FARS-2.1
Major gaps
56/ 100 5-point scale 2.8 / 5
Trust 8/29
Reliability 8/14
Adaptability 14/18
Convention 13/18
Effectiveness 9/13
Verifiability 4/8
Why each dimension lost points
Trust8 / 29 · 1.4/5

Evidence shows the server runs on a single MAILTRAP_API_TOKEN plus optional org token, and its tool set includes destructive operations (delete domain/template/token, reset API token, delete sub-account) with no per-operation confirmation, dry-run, or least-privilege scoping described in README or CLAUDE.md, so least_privilege and user_confirmation score low; data flow is only described as env-var token passing with no account of how email content/logs reach the Mailtrap API, data_flow_transparency 1; sensitive handling includes reading raw message bodies via include_content with no redaction guidance, sensitive_data_handling 1; dependencies are pinned with overrides/resolutions mitigating known issues, dependency_security 2; external_effects include real sending and deletion with no rollback, rollback 0; source attribution has LICENSE and package.json author but publisher is unverified, source_attribution 1.

Reliability8 / 14 · 2.9/5

README, CLAUDE.md, smithery.yaml and package.json agree on tool names, env vars and Node >=22, self_consistency 2; dependencies are public npm packages and CI uses npm ci, dependency_availability 2; failure messages are limited to deprecation warnings on stderr with no unified error format, failure_messages 1.

Adaptability14 / 18 · 3.9/5

README covers Claude Desktop, Cursor, VS Code, Docker, Smithery and MCPB with scenarios and examples, audience_and_scenarios 3; capability boundaries are fairly clear via tool list and mutual-exclusion rules but not all 125+ tools are shown, capability_boundaries 2; trigger precision relies on natural-language examples without explicit trigger/deny rules, trigger_precision 2; environment fit covers asdf, Docker and Node versions, environment_fit 2.

Convention13 / 18 · 3.6/5

README is well structured with detailed install notes including config file paths, install_notes and examples_and_faq 3; information architecture is reasonable but README is truncated, information_architecture 2; naming stability has a rename mapping table and deprecation aliases but includes breaking renames, naming_stability 2; known limitations only mention deprecation and pagination caveats, known_limitations 1; LICENSE is full MIT, license 3; draft-release workflow and CHANGELOG generation exist, versioning_changelog 2; maintenance responsibility only points to GitHub issues with unverified publisher, maintenance_responsibility 1.

Effectiveness9 / 13 · 3.5/5

Tool outputs are structured summaries and stats, output_usability 2; clear marginal value for email platform users, marginal_value 2; cost includes a Mailtrap account and token, and many tools may add context overhead, cost_benefit 2.

Verifiability4 / 8 · 2.5/5

README claims partially map to code structure but most capability claims lack per-item traceable evidence, claim_traceability 1; README, CLAUDE.md, smithery.yaml and package.json corroborate each other, cross_source_corroboration 2; docs mix facts with inference (e.g. 'official'), fact_inference_separation 1.

Risks and how to mitigate them
  • Not found in source: confirmation before actingTurn on (or add) a confirmation step before it acts, and try it in a sandbox or test environment before real data.
  • Not found in source: rollback or recovery pathBack up first, or work on a git branch or snapshot, so its changes can be undone.
  • The server exposes destructive tools (delete domain/template, reset/delete API tokens, delete sub-account) with no per-operation confirmation or rollback; scope tokens narrowly and use client deny lists before use.
  • Publisher identity is not verified by the FollowAgents registry; the 'official' claim comes only from the repository itself and needs independent confirmation.
  • README is truncated and not all 125+ tools are shown; actual capability boundaries and parameter behavior must be confirmed against full source.
  • Email content and logs flow to the Mailtrap API, and sensitive-data handling and data-flow transparency are under-documented.
Evidence confidence: Low Reviewed Dec 04, 2026 Reviewed revision db773b1d1f7c
See the full review method →
Maintain this project? Add the FARS badge to your README

The badge shows the current review score and verdict and links back to this page. It refreshes about once an hour after a re-review.

FARS

[![FARS review](https://followagents.com/badge/mailtrap-mcp.svg)](https://followagents.com/en/agents/mailtrap-mcp)
<a href="https://followagents.com/en/agents/mailtrap-mcp"><img src="https://followagents.com/badge/mailtrap-mcp.svg" alt="FARS review"></a>

FAQ

Do I need a paid Mailtrap plan?
The README only states that you must create a Mailtrap account, verify a domain and obtain an API token; it does not document plans or prices. Real limits come from your Mailtrap account, and get-billing-usage reports the current cycle's sending and testing plan usage.
Which environment variables are actually required?
MAILTRAP_API_TOKEN is required for all functionality. MAILTRAP_ACCOUNT_ID is required for templates, sending stats, email logs, sandbox list/show, domains and suppressions, but optional for the send tools, campaign tools, marketing stats, company info, tracking opt-out and list-accounts. DEFAULT_FROM_EMAIL, MAILTRAP_SANDBOX_ID, MAILTRAP_ORGANIZATION_ID and MAILTRAP_ORGANIZATION_API_TOKEN are optional (the last two are required for organization tools).
Will it actually deliver mail to real people?
Only with the sending tools: send-email, the batch-send-* family and reply-to-inbound-message hit the live API. send-sandbox-email and batch-send-sandbox-email deliver only into a Mailtrap Email Sandbox, which is the safe path for template and content testing.
What breaks when tools get renamed?
Calls to old names still work and print a deprecation warning to stderr, but MCP clients and agent frameworks match allow/deny/filter lists against the advertised tool name. A deny entry for delete-sending-domain no longer blocks delete-domain, so those lists must be migrated.
Which AI clients can use it?
The README documents Claude Desktop, Claude Code, Cursor, VS Code and any other MCP-compatible client, and shows Smithery installation into clients such as claude, cursor and windsurf. It does not document non-MCP chat products or direct model-API adapters.
Was this page helpful?
View on GitHub ↗ Install ↓

Compare agents like this one

The same FARS review applied across the shortlist this agent qualifies for.

Related concepts