// may the 4th be with you⚔️
communication

Mailtrap Email API

by railsware

Send transactional emails easily using Mailtrap Email API. Reliable email delivery, flexible features, and secure integr

Enables sending transactional emails through the Mailtrap Email API.

github stars

56

0 commentsdiscussion

Both formats append explainx.ai attribution and the canonical URL for this MCP server listing.

Supports both production and sandbox modesTemplate management includedDomain verification required

best for

  • / Developers building email functionality
  • / Testing email workflows before production
  • / Automating transactional email sending
  • / Managing email templates programmatically

capabilities

  • / Send transactional emails
  • / Manage email templates
  • / Send test emails to sandbox inbox
  • / Configure email recipients and content
  • / Verify domain-based sending

what it does

Sends transactional emails through the Mailtrap Email API. Manage email templates and send both production and sandbox test emails.

about

Mailtrap Email API is an official MCP server published by railsware that provides AI assistants with tools and capabilities via the Model Context Protocol. Send transactional emails easily using Mailtrap Email API. Reliable email delivery, flexible features, and secure integr It is categorized under communication.

how to install

You can install Mailtrap Email API in your AI client of choice. Use the install panel on this page to get one-click setup for Cursor, Claude Desktop, VS Code, and other MCP-compatible clients. This server runs locally on your machine via the stdio transport.

license

MIT

Mailtrap Email API is released under the MIT license. This is a permissive open-source license, meaning you can freely use, modify, and distribute the software.

readme

TypeScript test NPM

MCP Mailtrap Server

An MCP server that provides tools for sending transactional emails and managing email templates via Mailtrap

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
  • DEFAULT_FROM_EMAIL - Required for all email sending operations
  • MAILTRAP_ACCOUNT_ID - Required for template management operations
  • MAILTRAP_TEST_INBOX_ID - Only required for sandbox email functionality

Quick Install

Install in Cursor

Install with Node in VS Code

Smithery CLI

Smithery is a registry installer and manager for MCP servers that works with all AI clients.

npx @smithery/cli install mailtrap

Smithery automatically handles client configuration and provides an interactive setup process. It's the easiest way to get started with MCP servers locally.

Setup

Claude Desktop

Use MCPB to install the Mailtrap server. You can find those files in Releases. <br>Download .MCPB file and open it. If you have Claude Desktop - it will open it and suggest to configure.

Claude Desktop or Cursor

Add the following configuration:

{
  "mcpServers": {
    "mailtrap": {
      "command": "npx",
      "args": ["-y", "mcp-mailtrap"],
      "env": {
        "MAILTRAP_API_TOKEN": "your_mailtrap_api_token",
        "DEFAULT_FROM_EMAIL": "your_sender@example.com",
        "MAILTRAP_ACCOUNT_ID": "your_account_id",
        "MAILTRAP_TEST_INBOX_ID": "your_test_inbox_id"
      }
    }
  }
}

If you are using asdf for managing Node.js you must use absolute path to executable (example for Mac)

{
  "mcpServers": {
    "mailtrap": {
      "command": "/Users/<username>/.asdf/shims/npx",
      "args": ["-y", "mcp-mailtrap"],
      "env": {
        "PATH": "/Users/<username>/.asdf/shims:/usr/bin:/bin",
        "ASDF_DIR": "/opt/homebrew/opt/asdf/libexec",
        "ASDF_DATA_DIR": "/Users/<username>/.asdf",
        "ASDF_NODEJS_VERSION": "20.6.1",
        "MAILTRAP_API_TOKEN": "your_mailtrap_api_token",
        "DEFAULT_FROM_EMAIL": "your_sender@example.com",
        "MAILTRAP_ACCOUNT_ID": "your_account_id",
        "MAILTRAP_TEST_INBOX_ID": "your_test_inbox_id"
      }
    }
  }
}

Claude Desktop config file location

Mac: ~/Library/Application Support/Claude/claude_desktop_config.json

Windows: %APPDATA%\Claude\claude_desktop_config.json

Cursor config file location

Mac: ~/.cursor/mcp.json

Windows: %USERPROFILE%\.cursor\mcp.json

VS Code

Manually changing config

Run in Command Palette: Preferences: Open User Settings (JSON)

Then, in the settings file, add the following configuration:

{
  "mcp": {
    "servers": {
      "mailtrap": {
        "command": "npx",
        "args": ["-y", "mcp-mailtrap"],
        "env": {
          "MAILTRAP_API_TOKEN": "your_mailtrap_api_token",
          "DEFAULT_FROM_EMAIL": "your_sender@example.com",
          "MAILTRAP_ACCOUNT_ID": "your_account_id",
          "MAILTRAP_TEST_INBOX_ID": "your_test_inbox_id"
        }
      }
    }
  }
}

[!TIP] Don't forget to restart your MCP server after changing the "env" section.

MCP Bundle (MCPB)

For easy installation in hosts that support MCP Bundles, you can distribute an .mcpb bundle file.

# Build TypeScript and pack the MCPB bundle
npm run mcpb:pack

# Inspect bundle metadata
npm run mcpb:info

# Sign the bundle for distribution (optional)
npm run mcpb:sign

This creates mailtrap-mcp.mcpb using the repository manifest.json and built artifacts in dist/.

Usage

Once configured, you can ask agent to send emails and manage templates, for example:

Email Operations:

Sandbox Operations:

  • "Get all messages from my sandbox inbox"
  • "Show me the first page of sandbox messages"
  • "Search for messages containing 'test' in my sandbox inbox"
  • "Show me the details of sandbox message with ID 5159037506"

Template Operations:

  • "List all email templates in my Mailtrap account"
  • "Create a new email template called 'Welcome Email' with subject 'Welcome to our platform!'"
  • "Update the template with ID 12345 to change the subject to 'Updated Welcome Message'"
  • "Delete the template with ID 67890"

Available Tools

send-email

Sends a transactional email through Mailtrap.

Parameters:

  • to (required): Email address(es) of the recipient(s) - can be a single email or array of emails
  • subject (required): Email subject line
  • from (optional): Email address of the sender, if not provided "DEFAULT_FROM_EMAIL" will be used
  • text (optional): Email body text, required if "html" is empty
  • html (optional): HTML version of the email body, required if "text" is empty
  • cc (optional): Array of CC recipient email addresses
  • bcc (optional): Array of BCC recipient email addresses
  • category (required): Email category for tracking and analytics

send-sandbox-email

Sends an email to your Mailtrap test inbox for development and testing purposes. This is perfect for testing email templates without sending emails to real recipients.

Parameters:

  • to (required): Email address(es) of the recipient(s) - can be a single email or array of emails (will be delivered to your test inbox)
  • subject (required): Email subject line
  • from (optional): Email address of the sender, if not provided "DEFAULT_FROM_EMAIL" will be used
  • text (optional): Email body text, required if "html" is empty
  • html (optional): HTML version of the email body, required if "text" is empty
  • cc (optional): Array of CC recipient email addresses
  • bcc (optional): Array of BCC recipient email addresses
  • category (optional): Email category for tracking

[!NOTE] The MAILTRAP_TEST_INBOX_ID environment variable must be configured for sandbox emails to work. This variable is only required for sandbox functionality and is not needed for regular transactional emails or template management.

get-sandbox-messages

Retrieves a list of messages from your Mailtrap test inbox. Useful for checking what emails have been received in your sandbox during testing.

Parameters:

  • page (optional): Page number for pagination (minimum: 1)
  • last_id (optional): Pagination using last message ID. Returns messages after the specified message ID (minimum: 1)
  • search (optional): Search query to filter messages

[!NOTE] All parameters are optional. If none are provided, the first page of messages from the inbox will be returned. Use page for traditional pagination, last_id for cursor-based pagination, or search to filter messages by content.

show-sandbox-email-message

Shows detailed information and content of a specific email message from your Mailtrap test inbox, including HTML and text body content.

Parameters:

  • message_id (required): ID of the sandbox email message to retrieve

[!NOTE] Use get-sandbox-messages first to get the list of messages and their IDs, then use this tool to view the full content of a specific message.

create-template

Creates a new email template in your Mailtrap account.

Parameters:

  • name (required): Name of the template
  • subject (required): Email subject line
  • html (or text is required): HTML content of the template
  • text (or html is required): Plain text version

FAQ

What is the Mailtrap Email API MCP server?
Mailtrap Email API is a Model Context Protocol (MCP) server profile on explainx.ai. MCP lets AI hosts (e.g. Claude Desktop, Cursor) call tools and resources through a standard interface; this page summarizes categories, install hints, and community ratings.
How do MCP servers relate to agent skills?
Skills are reusable instruction packages (often SKILL.md); MCP servers expose live capabilities. Teams frequently combine both—skills for workflows, MCP for APIs and data. See explainx.ai/skills and explainx.ai/mcp-servers for parallel directories.
How are reviews shown for Mailtrap Email API?
This profile displays 74 aggregated ratings (sample rows for discoverability plus signed-in user reviews). Average score is about 4.8 out of 5—verify behavior in your own environment before production use.

Discussion

Product Hunt–style comments (not star reviews)
  • No comments yet — start the thread.
MCP server reviews

Ratings

4.874 reviews
  • Hassan Abebe· Dec 28, 2024

    Mailtrap Email API is among the better-indexed MCP projects we tried; the explainx.ai summary tracks the official description.

  • Isabella Huang· Dec 24, 2024

    I recommend Mailtrap Email API for teams standardizing on MCP; the explainx.ai page compares cleanly with sibling servers.

  • Chaitanya Patil· Dec 20, 2024

    We evaluated Mailtrap Email API against two servers with overlapping tools; this profile had the clearer scope statement.

  • Luis Rahman· Dec 8, 2024

    We evaluated Mailtrap Email API against two servers with overlapping tools; this profile had the clearer scope statement.

  • Olivia Iyer· Dec 8, 2024

    Useful MCP listing: Mailtrap Email API is the kind of server we cite when onboarding engineers to host + tool permissions.

  • Olivia Sharma· Dec 4, 2024

    We wired Mailtrap Email API into a staging workspace; the listing’s GitHub and npm pointers saved time versus hunting across READMEs.

  • Naina Abbas· Dec 4, 2024

    Strong directory entry: Mailtrap Email API surfaces stars and publisher context so we could sanity-check maintenance before adopting.

  • Chen Diallo· Nov 27, 2024

    Useful MCP listing: Mailtrap Email API is the kind of server we cite when onboarding engineers to host + tool permissions.

  • Olivia Taylor· Nov 27, 2024

    We evaluated Mailtrap Email API against two servers with overlapping tools; this profile had the clearer scope statement.

  • Isabella Chen· Nov 23, 2024

    Mailtrap Email API has been reliable for tool-calling workflows; the MCP profile page is a good permalink for internal docs.

showing 1-10 of 74

1 / 8