Official MCP Server for Mailtrap
Copy the AI prompt to install this server into Claude Code, Cursor, or another agent — or use 1-click editor setup below.
💡 Paste the JSON block into your client's configuration file under mcpServers, then restart the application.
An MCP server that provides tools for sending and testing in sandbox via Mailtrap.
Before using this MCP server, you need to:
Required Environment Variables:
MAILTRAP_API_TOKEN - Required for all functionalityMAILTRAP_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 ID for sandbox tools when sandbox_id is not provided. Enables switching between sandboxes per call via the sandbox_id parameter.MAILTRAP_TEST_INBOX_ID - Default test inbox ID for sandbox tools when test_inbox_id is not provided. Enables switching between inboxes per call via the test_inbox_id parameter. Legacy alias for MAILTRAP_SANDBOX_ID, still honored as a fallback.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).Smithery is a registry installer and manager for MCP servers that works with all AI clients.
Smithery automatically handles client configuration and provides an interactive setup process. It's the easiest way to get started with MCP servers locally.
Use MCPB to install the Mailtrap server. You can find those files in Releases.
Download .MCPB file and open it. If you have Claude Desktop - it will open it and suggest to configure.
Add the following configuration:
If you are using asdf for managing Node.js you must use absolute path to executable (example for Mac)
Mac: ~/Library/Application Support/Claude/claude_desktop_config.json
Windows: %APPDATA%\Claude\claude_desktop_config.json
Mac: ~/.cursor/mcp.json
Windows: %USERPROFILE%\.cursor\mcp.json
Run in Command Palette: Preferences: Open User Settings (JSON)
Then, in the settings file, add the following configuration:
[!TIP] Don't forget to restart your MCP server after changing the "env" section.
For easy installation in hosts that support MCP Bundles, you can distribute an .mcpb bundle file.
This creates mailtrap-mcp.mcpb using the repository manifest.json and built artifacts in dist/.
Once configured, you can ask agent to send emails and manage templates, for example:
Email Sending Operations:
b81aabcd-1a1e-41cf-91b6-eca0254b3d96) to new@example.com with variables { name: 'Alex' }"Email Logs (debug delivery):
Sending Statistics:
Sandbox Operations:
Template Operations:
Sending Domains:
Suppressions:
Tracking Opt-outs:
Sends a transactional email through Mailtrap. Supports two mutually exclusive modes — inline content (subject + text/html) or template-based (template_uuid).
Parameters:
No reviews yet — be the first to share how this listing worked for you.
Showcase your server listing on GitHub or your project documentation. Embed this dynamic SVG badge to highlight official listing status and live engagement.
[](https://allmcps.com/mcp/mailtrap)<a href="https://allmcps.com/mcp/mailtrap"><img src="https://allmcps.com/api/badge/mailtrap?style=directory" alt="Mailtrap on AllMCPs" /></a>