Mcp Mailtrap

io.github.pijuszPublished by GitHub account pijuszv0.1.4Updated Oct 27, 2026

MCP server for the Mailtrap email platform — analytics, sending, contacts, sandbox

Overview

AI-generated overview

MCP server for the Mailtrap email platform, letting an assistant send email, read logs and analytics, manage contacts, templates, domains and sandbox inboxes.

What you can do
  • Send transactional, bulk or sandbox test email, including batches of up to 500
  • Read sending statistics and email logs, inspect delivery events, list and delete suppressions, check list hygiene
  • Create, read, update and delete email templates, and render react-email component files to HTML and text
  • Manage contacts, contact lists, custom fields, bulk imports and exports, and trigger contact automations
  • Work with sandbox projects and inboxes: list messages, read bodies in HTML/text/raw/EML, analyze spam and headers, forward messages
  • Inspect sending domains and DNS records, view accounts and billing usage, and manage API tokens and account access
When to use it
Useful when you work with Mailtrap for transactional or marketing email and want an assistant to draft and send messages, debug delivery problems, clean up contact lists, or test emails in a sandbox before going live.
Requirements
Runs locally via npx (Node 18+) or a prebuilt binary. Requires a Mailtrap API token in MAILTRAP_API_TOKEN; optional MAILTRAP_SENDING_TOKEN, MAILTRAP_ACCOUNT_ID, MAILTRAP_DEFAULT_FROM_EMAIL, MAILTRAP_TEST_INBOX_ID and DEBUG. Network access to the Mailtrap API.
Before you install
The token grants broad access to a Mailtrap account, including sending real email and managing API tokens and account access. Many tools write or delete data: sending, batch sends, template and contact deletion, suppression deletion, inbox cleanup and credential resets. Sending consumes plan quota, and billing usage is visible. Keep the token scoped and review send or delete actions before approving them.

Installation

In SourceWeft

  1. Open Mcp Mailtrap in the dashboard and add it to a workspace.
  2. Enable the server for the chats that should use its tools.

Desktop only via STDIO. STDIO servers start a local process, so they need the SourceWeft desktop host.

Other MCP clients

Follow the launch instructions in the repository.

README

[mcpj-mailtrap]

mcpj-mailtrap

Mailtrap MCP server — analytics, email logs, contacts, sandbox testing & more via natural language.
Built with Bun + TypeScript. Works with Claude, Cursor, and any MCP client.


Quick Start

1. Get Your API Token

Get an API token from Mailtrap API Tokens.

2. Add to Claude Code

Minimal

bash
claude mcp add mailtrap -e MAILTRAP_API_TOKEN=your_token -- npx mcpj-mailtrap

Full

bash
claude mcp add mailtrap \  -e MAILTRAP_API_TOKEN=your_token \  -e MAILTRAP_SENDING_TOKEN=your_sending_token \  -e MAILTRAP_ACCOUNT_ID=12345 \  -e [email protected] \  -e MAILTRAP_TEST_INBOX_ID=12345 \  -- npx mcpj-mailtrap

That's it. Restart Claude Code and the tools are available.

Also works with bunx mcpj-mailtrap@latest if you have Bun. Requires Node 18+ when running via npx.

Claude Desktop / Cursor

Minimal

json
{  "mcpServers": {    "mailtrap": {      "command": "npx",      "args": ["-y", "mcpj-mailtrap@latest"],      "env": {        "MAILTRAP_API_TOKEN": "your_token"      }    }  }}

Full

json
{  "mcpServers": {    "mailtrap": {      "command": "npx",      "args": ["-y", "mcpj-mailtrap@latest"],      "env": {        "MAILTRAP_API_TOKEN": "your_token",        "MAILTRAP_SENDING_TOKEN": "your_sending_token",        "MAILTRAP_ACCOUNT_ID": "12345",        "MAILTRAP_DEFAULT_FROM_EMAIL": "[email protected]",        "MAILTRAP_TEST_INBOX_ID": "12345"      }    }  }}
Alternative: standalone binary

Download a pre-built binary from Releases:

PlatformFile
macOS (Apple Silicon)mcpj-mailtrap-darwin-arm64
macOS (Intel)mcpj-mailtrap-darwin-x64
Linuxmcpj-mailtrap-linux-x64
Windowsmcpj-mailtrap-windows-x64.exe

macOS / Linux:

bash
curl -Lo mcpj-mailtrap https://github.com/pijusz/mcp-mailtrap/releases/latest/download/mcpj-mailtrap-darwin-arm64chmod +x mcpj-mailtrapsudo mv mcpj-mailtrap /usr/local/bin/claude mcp add mailtrap -e MAILTRAP_API_TOKEN=your_token -- /usr/local/bin/mcpj-mailtrap

Windows (PowerShell):

powershell
Invoke-WebRequest -Uri "https://github.com/pijusz/mcp-mailtrap/releases/latest/download/mcpj-mailtrap-windows-x64.exe" -OutFile "$env:LOCALAPPDATA\mcpj-mailtrap.exe"claude mcp add mailtrap -e MAILTRAP_API_TOKEN=your_token -- "%LOCALAPPDATA%\mcpj-mailtrap.exe"

Tools (46)

Analytics

ToolDescription
get_statsSending statistics — delivery, bounce, open, click, spam rates. Group by domain, category, ESP, or date

Email Logs

ToolDescription
get_email_logsList sent emails filtered by status, stream, date range, recipient, sender, subject, or category. Cursor-based pagination
get_email_logSingle message detail with delivery events timeline
get_suppressionsList suppressed emails (bounces, spam complaints, unsubscribes) with the IDs delete_suppression needs
delete_suppressionRe-enable sending to a suppressed address
check_list_hygieneFind suppressed emails that still exist in contact lists and suggest exact cleanup actions

Sending

ToolDescription
send_emailSend via transactional or bulk stream. Supports HTML, text, or templates
batch_sendSend up to 500 emails in one request
send_test_emailSend to a sandbox inbox for testing, with optional env defaults for inbox and sender

Templates

ToolDescription
list_templatesList all email templates
get_templateGet template details including HTML/text body
create_templateCreate a new template
update_templateUpdate an existing template
delete_templateDelete a template
render_react_emailRender a react-email component file (.tsx, .jsx, .js, .mjs) to HTML + plain text

Contacts

ToolDescription
create_contactCreate a contact with email, custom fields, list membership
get_contactGet contact by UUID or email
update_contactUpdate contact fields, list membership, subscription status
delete_contactDelete a contact
trigger_contact_eventTrigger automations for a contact
list_contact_listsList all contact lists
get_contact_listGet a single contact list
create_contact_listCreate a new contact list
update_contact_listRename a contact list
delete_contact_listDelete a contact list
manage_contact_fieldList, get, create, update, or delete custom contact fields
import_contactsBulk import up to 50k contacts, or check import status
export_contactsStart contact export or check export status

Email Sandbox

ToolDescription
list_projectsList sandbox projects with inboxes
get_projectGet a single project
manage_projectCreate, update, or delete a project
list_inboxesList all sandbox inboxes
get_inboxGet inbox details (credentials redacted by default)
manage_inboxCreate, update, clean, mark read, reset credentials, or delete
get_messagesList messages in a sandbox inbox
get_messageGet message body in HTML/text/raw/EML format, with optional attachments
analyze_messageCombined spam score + HTML analysis + headers report
forward_messageForward a test message to an email

Domains

ToolDescription
list_domainsList sending domains with DNS status
get_domainGet domain details including DNS records
manage_domainCreate or delete a sending domain
send_domain_setup_instructionsEmail DNS setup instructions to a colleague

Accounts

ToolDescription
list_accountsList accounts or get one by ID
get_billing_usagePlan limits and current usage
manage_account_accessList, remove, update permissions, view resources
manage_api_tokenList, get, create, delete, or reset API tokens

Configuration

VariableRequiredDefaultDescription
MAILTRAP_API_TOKENYes—General API token from mailtrap.io/api-tokens
MAILTRAP_SENDING_TOKENNoMAILTRAP_API_TOKENSeparate token for transactional and bulk send.api requests
MAILTRAP_ACCOUNT_IDNoauto-discoveredDefault account ID
MAILTRAP_DEFAULT_FROM_EMAILNo—Default sender email for send_email / send_test_email
MAILTRAP_TEST_INBOX_IDNo—Default sandbox inbox ID for send_test_email
DEBUGNo—Enable debug logging

Updates

Using npx @latest (recommended): You always get the latest version — no manual updates needed.

Using a binary: The server checks for new releases on startup and logs to stderr if outdated:

[mcpj-mailtrap] Update available: v0.2.0 (current: v0.1.0)

Check your installed version:

bash
mcpj-mailtrap --version

Development

Requires Bun.

bash
git clone https://github.com/pijusz/mcp-mailtrap.gitcd mcp-mailtrapbun installbun test           # testsbun run typecheck  # tscbun run build      # standalone binarybun run inspect    # MCP Inspectorbun run check      # biome format + lint

License

MIT

Source: README.md at commit 37aa2c0

Tools

0
SourceWeft has not started this package in its sandbox yet, so its tools are not known.

Version history

1
  1. v0.1.4LatestSep 16, 2026

Score

50% of the applicable checks met

How complete this listing is, computed from the registry entry, the endpoint and public sources. Not a rating of the server and not a statement that it is safe or working today: reachability is a dated check, and no installs or reviews go into the score.

  • Reached in the last 30 days25 pts

    Keep the endpoint answering the MCP handshake; SourceWeft probes it every 30 days.

  • Auth declared10 pts

    Declare the credential headers in the registry entry, or keep the endpoint answering the probe so its auth can be classified.

  • Tools listed15 pts

    Answer tools/list without a credential, or ship a package that starts in a sandbox without one.

  • DescriptionRequired15 pts
  • Logo10 pts
  • Documentation15 pts
  • License10 pts