# Mailtrap [Health: Active]

**Category:** 💬 Communication  
**Repository:** https://github.com/mailtrap/mailtrap-mcp  
**GitHub Stars:** 66  
**npm Downloads (last month):** 2143  
**Views:** 0  
**Installs:** 0  
**Upvotes:** 0  
**Directory Page:** https://allmcps.com/mcp/mailtrap

## Description
Official mailtrap.io MCP server

## Tools
Capabilities this server exposes over MCP:

- **send-email** — Send an email to your recipient email address using Mailtrap Email API. You can send emails to multiple recipients at once.
- **batch-send-transactional-email** — Send a batch of transactional emails in one Mailtrap API call. Shared fields go on `base`; per-recipient overrides go in `requests[]`. Each request must include `to`.
- **batch-send-bulk-email** — Send a batch of bulk emails (Mailtrap bulk-stream API) in one call. Shared fields go on `base`; per-recipient overrides go in `requests[]`. Each request must include at least one of `to`/`cc`/`bcc`.
- **create-template** — Create a new email template
- **list-templates** — List the account's email templates with page-token pagination (`token`, `per_page`). Pages are offsets over the newest-first list, so after deleting templates list again from token 1 instead of continuing with the next token.
- **get-template** — Get a single email template by ID, including subject, category, and HTML/text body.
- **update-template** — Update an existing email template
- **delete-template** — Delete an existing email template
- **send-sandbox-email** — Send an email in sandbox mode to a test inbox without delivering to your recipients
- **batch-send-sandbox-email** — Send a batch of emails in sandbox mode to a test inbox in one Mailtrap API call. Shared fields go on `base`; per-recipient overrides go in `requests[]`. Requires `sandbox_id` or the MAILTRAP_SANDBOX_ID env var.
- **get-sandbox-messages** — Get list of messages from the sandbox test inbox
- **show-sandbox-email-message** — Show sandbox email message details and content from the sandbox test inbox. Optionally include spam report (SpamAssassin score) and HTML analysis (client compatibility) for email testing workflows.
- **list-sandbox-projects** — List all sandbox projects and their inboxes in your Mailtrap account
- **create-sandbox-project** — Create a new sandbox project to group test inboxes
- **get-sandbox-project** — Get a sandbox project by ID, including its inboxes and email counts
- **update-sandbox-project** — Rename an existing sandbox project
- **delete-sandbox-project** — Delete a sandbox project and all its inboxes
- **create-sandbox-inbox** — Create a new sandbox test inbox within a project. Returns SMTP credentials for the new inbox.
- **get-sandbox-inbox** — Get sandbox inbox details including SMTP credentials, email counts, and status
- **update-sandbox-inbox** — Update a sandbox inbox name or email username
- **delete-sandbox-inbox** — Delete a sandbox inbox and all its messages
- **clean-sandbox-inbox** — Delete all messages from a sandbox inbox without deleting the inbox itself
- **list-sandboxes** — List all sandboxes accessible to the API token across projects
- **mark-sandbox-as-read** — Mark all messages in a sandbox as read
- **reset-sandbox-credentials** — Reset the SMTP credentials for a sandbox
- **enable-sandbox-email-address** — Enable the receive-by-email address for a sandbox
- **reset-sandbox-email-address** — Generate a new receive-by-email address for a sandbox
- **forward-sandbox-message** — Forward a sandbox message to an email address (counts against your monthly forwarding quota)
- **update-sandbox-message** — Mark a sandbox message as read or unread
- **delete-sandbox-message** — Delete a single sandbox message
- **get-sandbox-message-spam-score** — Get the SpamAssassin spam report for a sandbox message (score, rules, report).
- **get-sandbox-message-html-analysis** — Get HTML analysis for a sandbox message (client compatibility, problematic elements).
- **get-sandbox-message-headers** — Get the parsed mail headers for a sandbox message.
- **get-sandbox-message-html** — Get the rendered HTML body of a sandbox message.
- **get-sandbox-message-text** — Get the plain-text body of a sandbox message.
- **get-sandbox-message-raw** — Get the raw message (MIME-formatted) for a sandbox message.
- **get-sandbox-message-eml** — Get a sandbox message as an EML file payload.
- **get-sandbox-message-html-source** — Get the unrendered HTML source of a sandbox message.
- **list-sandbox-attachments** — List all attachments on a sandbox message.
- **get-sandbox-attachment** — Get the metadata and download URL for a single sandbox attachment.
- **get-sending-stats** — Get email sending statistics (delivery, bounce, open, click, spam rates) for a date range. Optionally break down by domain, category, email service provider, or date.
- **list-email-logs** — List sent email logs (delivery history) with optional pagination and filters; use to debug delivery issues.
- **get-email-log-message** — Get a single email log message by ID (UUID) to inspect delivery status and event history.
- **list-sending-domains** — List sending domains and their DNS verification status
- **get-sending-domain** — Get a sending domain by ID and its verification status. Optionally include DNS setup instructions via include_setup_instructions.
- **create-sending-domain** — Create a new sending domain
- **update-sending-domain** — Update a sending domain's tracking and inbound settings.
- **delete-sending-domain** — Delete a sending domain
- **send-sending-domain-setup-instructions** — Email DNS setup instructions for a sending domain to a given address.
- **get-company-info** — Get the company info of a sending domain, used for domain compliance verification.
- **create-company-info** — Set the company info of a sending domain, required for domain compliance verification.
- **update-company-info** — Update the company info of a sending domain.
- **list-suppressions** — List or search suppressions. Optionally filter by email. Returns up to 1000 suppressions per call.
- **create-suppression** — Add an email address to the account's suppression list, so Mailtrap stops delivering to it.
- **delete-suppression** — Delete a suppression by ID. Mailtrap will resume delivery to this email unless it gets suppressed again.
- **list-tracking-opt-outs** — List email addresses excluded from open and click tracking. Returns up to 1000 records per call.
- **create-tracking-opt-out** — Exclude an email address from open and click tracking for a sending domain.
- **delete-tracking-opt-out** — Remove an email address from the tracking opt-out list, so open and click tracking applies to it again.
- **list-webhooks** — List all webhooks for the account.
- **get-webhook** — Get a single webhook by ID.
- **create-webhook** — Create a webhook. `webhook_type` may be `email_sending`, `audit_log`, or `inbound_receiving`; for `inbound_receiving`, `inbound_inbox_id` is optional (scopes the webhook to one inbox — omit to apply to all inboxes). The response includes a `signing_secret` for verifying webhook payload signatures — this secret is returned only on creation, so store it now.
- **update-webhook** — Update a webhook's mutable fields (`url`, `active`, `payload_format`, `event_types`, `inbound_inbox_id`). `webhook_type`, `sending_stream`, and `domain_id` cannot be changed after creation.
- **delete-webhook** — Permanently delete a webhook by ID. Returns the deleted webhook record.
- **get-contact** — Get a contact by ID or email address. Returns the full contact record including list memberships, status, and custom fields.
- **create-contact** — Create a new contact. Requires `email`; optionally accepts custom `fields`, `list_ids` to subscribe to, and `unsubscribed` to start in unsubscribed status.
- **update-contact** — Update a contact (identified by ID or email). `list_ids` replaces the membership set; `list_ids_included`/`list_ids_excluded` add/remove without disturbing the rest.
- **delete-contact** — Permanently delete a contact by ID or email. Returns the deleted contact record when available.
- **create-contact-event** — Record a contact event (by `name` + arbitrary `params`) against a contact ID or email. Used to trigger automations.
- **list-contact-lists** — List all contact lists for the account. Optionally filter by name with `search` (case-insensitive match).
- **get-contact-list** — Get a contact list by ID.
- **create-contact-list** — Create a new contact list.
- **update-contact-list** — Rename an existing contact list.
- **delete-contact-list** — Permanently delete a contact list by ID.
- **list-contact-fields** — List all contact field definitions for the account.
- **get-contact-field** — Get a contact field definition by ID.
- **create-contact-field** — Create a new contact field definition. `merge_tag` must be unique and is used in template variables.
- **update-contact-field** — Update a contact field definition. Any combination of `name`, `merge_tag`, or `data_type` can be changed.
- **delete-contact-field** — Permanently delete a contact field definition by ID.
- **create-contact-import** — Bulk import contacts. Returns an import job record; poll status via `get-contact-import`.
- **get-contact-import** — Get the status of a contact import job, including created/updated/over-limit counts.
- **create-contact-export** — Export contacts matching a set of AND-combined filters. Returns an export job; poll status with `get-contact-export` to retrieve the download URL.
- **get-contact-export** — Get the status of a contact export job. Once `status` is `finished`, the `url` field holds the download link.
- **list-email-campaigns** — List the account's email campaigns, newest first, with page-token pagination (`token`, `per_page`). Optionally filter by name with `search`.
- **get-email-campaign** — Get an email campaign by ID.
- **create-email-campaign** — Create a new email campaign in the `draft` state; requires `name`, `domain_id`, `from_local_part`, and a `template_attributes.subject`.
- **update-email-campaign** — Update a `draft` email campaign; only the provided fields change, and campaigns in any other state cannot be updated.
- **delete-email-campaign** — Delete an email campaign by ID; only a campaign in the `draft` state can be deleted.
- **start-email-campaign** — Start sending a `draft` email campaign immediately; only `draft` campaigns can be started.
- **schedule-email-campaign** — Schedule a `draft` email campaign to start sending at `datetime` (ISO 8601, must be in the future and no more than 1 month ahead); only `draft` campaigns can be scheduled.
- **cancel-email-campaign** — Cancel a `scheduled` email campaign, returning it to `draft`; only `scheduled` campaigns can be cancelled.
- **terminate-email-campaign** — Terminate an email campaign that is currently sending (`started`, `queued`, or `paused`), aborting the in-flight send.
- **reset-email-campaign** — Reset a `scheduled` email campaign back to `draft`; only `scheduled` campaigns can be reset.
- **get-email-campaign-stats** — Get aggregated performance statistics for an email campaign; optionally narrow the window with `start_date`/`end_date` (`YYYY-MM-DD`).
- **list-accounts** — List Mailtrap accounts accessible to the API token, with each account's access levels.
- **get-billing-usage** — Get the current billing cycle usage for the account (sending and testing plans, limits, and current counts).
- **list-account-accesses** — List account accesses (users, invites, API tokens) for the account. Optionally scope by domain UUIDs, inbox IDs, or project IDs. Requires account admin/owner permissions.
- **remove-account-access** — Remove an account access by ID. For User specifiers this revokes permissions; for Invite or ApiToken specifiers it removes the specifier itself. Requires admin/owner.
- **get-permission-resources** — Get all resources (inboxes, projects, domains, billing, account) to which the API token has admin access, nested by hierarchy.
- **bulk-update-permissions** — Bulk create, update, or destroy permissions for an account access. Existing (resource_type, resource_id) pairs are updated; new ones are created. Set `destroy: true` to remove.
- **list-api-tokens** — List all API tokens for the account.
- **create-api-token** — Create a new API token. The response includes the secret `token` value — this is the **only time** the full token is returned, so store it immediately.
- **get-api-token** — Get an API token by ID. The secret token value is NOT returned here — only the metadata (name, last 4 digits, resources).
- **reset-api-token** — Reset (rotate) an API token by ID. The response includes the **new** secret `token` value — returned only on this call, so store it immediately. The previous token is invalidated.
- **delete-api-token** — Permanently delete an API token by ID. The token can no longer authenticate after deletion.
- **list-sub-accounts** — List sub-accounts in the organization. Requires `MAILTRAP_ORGANIZATION_ID` env var and sub-account management permissions.
- **create-sub-account** — Create a new sub-account under the organization. Requires `MAILTRAP_ORGANIZATION_ID` and sub-account management permissions.
- **list-inbound-folders** — List all inbound folders in the account.
- **get-inbound-folder** — Get a single inbound folder by ID.
- **create-inbound-folder** — Create a new inbound folder.
- **update-inbound-folder** — Rename an inbound folder.
- **delete-inbound-folder** — Permanently delete an inbound folder along with all of its inboxes.
- **list-inbound-inboxes** — List all inboxes in an inbound folder.
- **get-inbound-inbox** — Get a single inbound inbox by ID.
- **create-inbound-inbox** — Create a new inbound inbox in a folder. Omit `domain_id` for a Mailtrap-hosted inbox; pass it for a custom-domain (catch-all) inbox.
- **update-inbound-inbox** — Rename an inbound inbox.
- **delete-inbound-inbox** — Permanently delete an inbound inbox.
- **list-inbound-messages** — List received messages in an inbound inbox (paginated). Pass `last_id` from a previous response to fetch the next page.
- **get-inbound-message** — Get a single inbound message with its full body and attachment download URLs.
- **delete-inbound-message** — Permanently delete an inbound message.
- **reply-to-inbound-message** — Reply to an inbound message (sends to the original sender). Sends a real email.
- **reply-all-to-inbound-message** — Reply to an inbound message and copy the original's other recipients. Sends a real email.
- **forward-inbound-message** — Forward an inbound message to new recipients (at least one `to` is required). Sends a real email.
- **list-inbound-threads** — List conversation threads in an inbound inbox (paginated). Pass `last_id` from a previous response to fetch the next page.
- **get-inbound-thread** — Get a single inbound thread with its messages embedded (oldest first).
- **delete-inbound-thread** — Permanently delete an inbound thread.

## Claude Desktop Quick Installation
Install path detected from listing signals. Uses `npx` (confidence: high):

```json
"mcpServers": {
  "mailtrap": {
    "command": "npx",
    "args": ["-y","mcp-mailtrap"],
    "env": {
      "MAILTRAP_API_TOKEN": "",
      "MAILTRAP_ACCOUNT_ID": "",
      "DEFAULT_FROM_EMAIL": "",
      "MAILTRAP_SANDBOX_ID": "",
      "MAILTRAP_TEST_INBOX_ID": "",
      "MAILTRAP_ORGANIZATION_ID": "",
      "MAILTRAP_ORGANIZATION_API_TOKEN": ""
    }
  }
}
```

**Requires environment variables:** `MAILTRAP_API_TOKEN`, `MAILTRAP_ACCOUNT_ID`, `DEFAULT_FROM_EMAIL`, `MAILTRAP_SANDBOX_ID`, `MAILTRAP_TEST_INBOX_ID`, `MAILTRAP_ORGANIZATION_ID`, `MAILTRAP_ORGANIZATION_API_TOKEN` — the values above are empty placeholders; fill in real credentials before running (see the repository for what each one is for).

## Documentation

## What Mailtrap MCP server does

The Mailtrap MCP server exposes Mailtrap account operations to MCP-compatible AI assistants. It is intended for teams that use Mailtrap for transactional or bulk email and want an agent to work with those operations through natural-language prompts.

Supported areas include sending messages through Mailtrap’s email API and SMTP-related workflows, including batch and template-based email. Agents can also use Email Sandbox for testing and inspect message content, headers, attachments, spam scores, and HTML client compatibility.

The Mailtrap MCP server also covers operational email work. It can search email logs, inspect event history, review delivery and bounce information, and analyze open, click, and spam rates. Other supported areas include templates, contacts and lists, sending domains, DNS verification, webhooks, suppressions, billing usage, permissions, API tokens, and sub-accounts.

## How it works

The server runs as an MCP process and uses a Mailtrap API token to connect an AI client to the account. Once registered in the client configuration, users can ask the assistant to send or test email, locate messages in logs, manage Mailtrap resources, or review account data.

Operations accept fields appropriate to the request. Email-related inputs include sender and recipient addresses, carbon-copy and blind-carbon-copy recipients, subject, plain text or HTML content, templates, template variables, categories, reply-to values, custom variables, and headers. Log searches can use pagination, date ranges, sender and recipient filters, status filters, subject filters, sending-domain filters, and sending streams.

## Setup and configuration

Create a Mailtrap account, verify a sending domain, obtain an API token, and find the Account ID in Mailtrap account management. The server can be installed with `npx -y mcp-mailtrap`, run from Docker, installed through Smithery, or packaged as an MCPB bundle.

`MAILTRAP_API_TOKEN` is required for all functionality. `MAILTRAP_ACCOUNT_ID` is needed for templates, statistics, email logs, sandbox message operations, sending domains, and suppressions, but is optional for the documented send, campaign, company-information, and tracking-opt-out operations.

`DEFAULT_FROM_EMAIL` provides a fallback sender. `MAILTRAP_SANDBOX_ID` provides a default test inbox, while `MAILTRAP_TEST_INBOX_ID` remains available as a legacy fallback. Organization operations additionally use `MAILTRAP_ORGANIZATION_ID` and `MAILTRAP_ORGANIZATION_API_TOKEN`.

## Tools and capabilities

The Mailtrap MCP server supports these practical workflows:

- Send transactional, bulk, batch, and template-based email.
- Test messages in Email Sandbox and inspect their rendered and diagnostic data.
- Manage templates, contacts, lists, custom fields, events, imports, and exports.
- Search email logs and review delivery, bounce, open, click, and spam information.
- Manage sending domains, DNS verification, webhooks, and suppressions.
- Review billing usage and administer account access, permissions, API tokens, and sub-accounts.

## Limitations and notes

The server requires valid Mailtrap credentials and access to the relevant account resources. Not every operation uses the same prerequisites: the Account ID is conditional, and organization functions require separate organization settings and an organization-scoped token. Configuration changes require restarting the MCP server. Sandbox and sender defaults can be overridden through tool parameters, allowing calls to target a different inbox or sender.

_Full upstream README: https://allmcps.com/mcp/mailtrap/readme_

