# Mailtrap (MCP server)

> 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 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.

## Key facts

| Fact | Value |
|---|---|
| Repository | https://github.com/mailtrap/mailtrap-mcp |
| GitHub stars | 65 |
| License | MIT |
| Language | TypeScript |
| Transport | stdio |
| Packages | npm: mcp-mailtrap |
| Remote URL | none |
| Needs API key | yes |
| Official | yes |
| Works with | Claude Desktop, Claude Code, Cursor, VS Code |
| Category | Communication |
| Latest release | v0.9.0 (Sep 1, 2026) |
| Last commit | Oct 2, 2026 |
| MCP registry name | io.mailtrap/mcp |

## Install

### Claude Desktop (claude_desktop_config.json)

```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

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

### Cursor (.cursor/mcp.json)

```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)

```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 2026-10-07.

## Environment variables

- `MAILTRAP_API_TOKEN` (secret) (required): Mailtrap API token from https://mailtrap.io/api-tokens
- `MAILTRAP_ACCOUNT_ID`: Mailtrap account ID from https://mailtrap.io/account-management

## Tools

- `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)

## Similar MCP servers

- [Strata](https://appsgit.com/mcp-servers/strata): MCP server for progressive tool usage at any scale (see https://klavis.ai). (5,807 stars, Apache-2.0, official)
- [Vexa](https://appsgit.com/mcp-servers/vexa): Meeting bot and transcripts for Google Meet, Teams and Zoom. (2,856 stars, Apache-2.0, official, needs API key)
- [MCP Server for WinDbg Crash Analysis](https://appsgit.com/mcp-servers/mcp-server-for-windbg-crash-analysis): A Model Context Protocol server for Windows crash dump analysis using WinDbg/CDB. (1,607 stars, MIT)
- [Rocketmq Rust](https://appsgit.com/mcp-servers/rocketmq-rust): 🚀 Apache RocketMQ built in Rust 🦀 — faster, safer, and more memory-efficient. (1,524 stars, Apache-2.0)
- [Wassette](https://appsgit.com/mcp-servers/wassette): Wassette: A security-oriented runtime that runs WebAssembly Components via MCP. (957 stars, MIT, official)
- [Line Bot MCP Server](https://appsgit.com/mcp-servers/line-bot-mcp-server): MCP server that integrates the LINE Messaging API to connect an AI Agent to the LINE Official Account. (783 stars, Apache-2.0, official, needs API key)

---

Canonical page: https://appsgit.com/mcp-servers/mailtrap
Source: appsgit (https://appsgit.com), the app store for github. Data from the GitHub API, refreshed nightly.
Machine access: JSON API https://appsgit.com/api/v1/apps (OpenAPI: https://appsgit.com/openapi.json), MCP server https://mcp.appsgit.com/mcp, full index https://appsgit.com/llms-full.txt.
