Mailtrap MCP Server
Connect Claude, Cursor or VS Code to Mailtrap so you can send, sandbox-test and debug email in plain language.
- Source repo
- mailtrap/mailtrap-mcp
- Stars
- ★ 66
- Last updated
- today
- FARS reviewed
- Dec 04, 2026
- License
- MIT
- Primary language
- TypeScript
- FA score
- 56/100 · Major gaps
At a glance
- How it runs
- 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
- 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
- Source review
- 56/100 · Major gaps 2 safety controls not found
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.
- 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.
- 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.
- A lifecycle marketer compares last month's campaign delivery and click rates with get-marketing-stats broken down by source and sending domain.
- 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.
- 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.
- 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_TOKENMAILTRAP_ACCOUNT_IDMAILTRAP_SANDBOX_IDMAILTRAP_ORGANIZATION_IDMAILTRAP_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/mailtrapOr install through the Smithery registry into a local client:
npx -y smithery mcp add mailtrap/mailtrap-mcp --client claudeClaude 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)
Can run terminal commands; pair with approval gates or container/OS sandboxing.
Makes outbound requests; verify telemetry settings and model data routing on private repos.
Inherits capabilities of connected MCP servers; audit third-party servers before enabling.
FARS trust-control audit
- 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?
- 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.
- 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?
Why each dimension lost points
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.
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.
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.
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.
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.
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.
- 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.
FAQ
Do I need a paid Mailtrap plan?
Which environment variables are actually required?
Will it actually deliver mail to real people?
What breaks when tools get renamed?
delete-sending-domain no longer blocks delete-domain, so those lists must be migrated.Which AI clients can use it?
Thanks — we use this to improve the page.
Subscribe to the FollowAgents RSS feed, or save this agent to your browser shortlist to compare on your next visit.