Skip to content
appsgit

Mailtrap

Mailtrap is an MCP server that adds messaging tools to AI assistants such as Claude Desktop, Claude Code and Cursor. Official MCP Server for Mailtrap. It has 65 GitHub stars, is released under the MIT license and runs locally with npx -y mcp-mailtrap.

github.com/mailtrap/mailtrap-mcp (opens in a new tab)

Install Mailtrap

Generated from the server's MCP registry entry. Replace your-value with your own values.

Claude Desktop

claude_desktop_config.json
{
  "mcpServers": {
    "mailtrap": {
      "command": "npx",
      "args": [
        "-y",
        "mcp-mailtrap"
      ],
      "env": {
        "MAILTRAP_API_TOKEN": "your-value"
      }
    }
  }
}

Settings > Developer > Edit Config. macOS: ~/Library/Application Support/Claude/, Windows: %APPDATA%\Claude\. Restart Claude Desktop afterwards.

Claude Code

claude mcp add --env MAILTRAP_API_TOKEN=your-value --transport stdio mailtrap -- npx -y mcp-mailtrap

Cursor

.cursor/mcp.json
{
  "mcpServers": {
    "mailtrap": {
      "type": "stdio",
      "command": "npx",
      "args": [
        "-y",
        "mcp-mailtrap"
      ],
      "env": {
        "MAILTRAP_API_TOKEN": "your-value"
      }
    }
  }
}

Project file; use ~/.cursor/mcp.json to enable it in every project.

VS Code

.vscode/mcp.json
{
  "inputs": [
    {
      "type": "promptString",
      "id": "mailtrap_api_token",
      "description": "MAILTRAP_API_TOKEN",
      "password": true
    }
  ],
  "servers": {
    "mailtrap": {
      "type": "stdio",
      "command": "npx",
      "args": [
        "-y",
        "mcp-mailtrap"
      ],
      "env": {
        "MAILTRAP_API_TOKEN": "${input:mailtrap_api_token}"
      }
    }
  }
}

Config formats checked against the official docs on Oct 7, 2026: modelcontextprotocol.io (opens in a new tab), code.claude.com (opens in a new tab), cursor.com (opens in a new tab), code.visualstudio.com (opens in a new tab).

Environment variables

Variables the server reads at startup.

NameRequiredDescription
MAILTRAP_API_TOKENsecretYesMailtrap API token from https://mailtrap.io/api-tokens
MAILTRAP_ACCOUNT_IDNoMailtrap account ID from https://mailtrap.io/account-management

Tools (40)

Parsed from the Tools section of the README; check the repository for the current list.

  • send-email

    Sends a transactional email through Mailtrap. Supports two mutually exclusive modes — inline content (subject +…

  • from

    Sender as { email, name? } (a bare email string is also accepted at runtime). If not provided, DEFAULTFROMEMAIL is used.

  • subject

    Email subject line. Required for inline sends; must be omitted when templateuuid is set.

  • text

    Email body text. Required (alongside or instead of html) for inline sends; must be omitted when templateuuid is set.

  • html

    HTML version of the email body. Required (alongside or instead of text) for inline sends; must be omitted when…

  • category

    Email category for tracking and analytics. Must be omitted when templateuuid is set.

  • template_uuid

    Use a Mailtrap email template instead of inline content. When set, subject / text / html / category must be omitted…

  • template_variables

    Object of variables substituted into the template referenced by templateuuid. Only allowed together with templateuuid.

  • batch-send-transactional-email

    Sends a batch of transactional emails in one Mailtrap API call (default sending stream).

  • base

    Object with fields shared across the batch.

  • reply_to

    Reply-to address.

  • custom_variables

    Default custom variables (string-valued).

  • headers

    Default custom headers.

  • requests

    Non-empty array of per-recipient messages. Each entry has:

  • batch-send-bulk-email

    Sends a batch of bulk emails through Mailtrap's bulk-stream API.

  • list-email-logs

    Lists sent email logs (delivery history) with optional pagination and filters.

  • search_after

    Pagination cursor from the previous response's nextpagecursor

  • sent_after

    ISO 8601 date/time; only logs sent after this time

  • sent_before

    ISO 8601 date/time; only logs sent before this time

  • from_email

    Filter by sender email; use with fromoperator (default: ci_equal)

  • to_email

    Filter by recipient email; use with tooperator (default: ci_equal)

  • status

    Filter by delivery status: delivered, notdelivered, enqueued, optedout; use with statusoperator (default: equal)

  • sending_domain_id

    Filter by sending domain ID (number); use with sendingdomainidoperator (default: equal)

  • sending_stream

    Filter by stream: transactional or bulk; use with sendingstreamoperator (default: equal)

  • events

    Filter by event type(s): delivery, open, click, bounce, spam, unsubscribe, softbounce, reject, suspension; use with…

  • clicks_count

    / openscount (optional): Filter by click/open count; use with operator: equal, greaterthan, lessthan

  • client_ip

    / sendingip (optional): Filter by IP; use with operator: equal, notequal, contain, notcontain

  • email_service_provider_response

    Filter by provider response text; use with operator (ci_contain, etc.)

  • email_service_provider

    Filter by provider (exact); use with operator: equal, not_equal

  • recipient_mx

    Filter by recipient MX; use with recipientmxoperator (ci_contain, etc.)

  • get-email-log-message

    Gets a single email log message by ID (UUID): a readable summary (from, to, subject, sent time, status, category,…

  • message_id

    UUID of the email log message (from send response or list-email-logs). Use list-email-logs to find message IDs.

  • include_content

    When true, fetches the raw EML (if rawmessageurl is available) and appends parsed HTML and plain-text body sections,…

  • get-sending-stats

    Get email sending statistics (delivery, bounce, open, click, spam rates) for a date range.

  • start_date

    Start date for the stats range (YYYY-MM-DD)

  • end_date

    End date for the stats range (YYYY-MM-DD)

  • breakdown

    How to break down the stats: aggregated (default), bydomain, bycategory, byemailserviceprovider, or bydate

  • sending_domain_ids

    Limit results to these sending domain IDs (array of integers)

  • sending_streams

    Limit to transactional and/or bulk (array of strings)

  • categories

    Limit to these email categories (array of strings)

About Mailtrap

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.

  • ai-agents
  • bulk-email
  • claude
  • cursor
  • email
  • email-api
  • email-delivery
  • email-sandbox
  • email-testing
  • mailtrap

FAQ

Mailtrap FAQ

Still curious? Email info@appsgit.com.

What is Mailtrap?

Mailtrap is an MCP server that adds messaging tools to AI assistants such as Claude Desktop, Claude Code and Cursor. Official MCP Server for Mailtrap. It has 65 GitHub stars, is released under the MIT license and runs locally with npx -y mcp-mailtrap. The source code is at github.com/mailtrap/mailtrap-mcp.

How do I install the Mailtrap MCP server?

Add the command npx -y mcp-mailtrap to your MCP client: put it in claude_desktop_config.json for Claude Desktop, run claude mcp add for Claude Code, or add it to .cursor/mcp.json (Cursor) or .vscode/mcp.json (VS Code). The snippets on this page are ready to paste.

Is Mailtrap free?

The server is open source under the MIT license, so running it is free. It needs credentials (MAILTRAP_API_TOKEN) for the service it connects to, which may require a paid account.

Is Mailtrap actively maintained?

The most recent commit was on Oct 2, 2026. The latest release is v0.9.0, published Sep 1, 2026. appsgit only lists MCP servers with a commit in the last six months and re-checks every server daily.