Mailtrap MCP Server

Source profile for Mailtrap. Its purpose and connection details need verification against the maintainer’s documentation.

Local serverstdioMIT

What is the Mailtrap MCP Server?

This Mailtrap source profile is awaiting review. The previous overview contained a logo or badge fragment rather than a usable description. Check the linked maintainer documentation for the server’s purpose and connection details.

Installation

The documented npm package is mcp-mailtrap. The configuration below comes from the maintainer’s example; adapt its paths and account values to your environment.

Configuration values

The example declares MAILTRAP_API_TOKEN, DEFAULT_FROM_EMAIL, MAILTRAP_ACCOUNT_ID, MAILTRAP_SANDBOX_ID. Secret-looking values have been replaced with placeholders. Required and optional labels are shown only when the documentation states them.

Source

Project documentation · Repository · Discovery listing. This profile records the public documentation checked on 2026-10-08.

Recorded tools

Check the linked publisher documentation and your connected client's tool list. Names and availability can vary with the server version and account permissions.

ToolWhat it does
fromoptional): Sender. Rejected for Mailtrap-hosted inboxes; required for custom-domain inboxes
torequired): At least one recipient (bare email string or { email, name? }, or an array)
ccoptional): Array of CC recipients as { email, name? } objects (bare email strings also accepted at runtime).
bccoptional): Array of BCC recipients as { email, name? } objects (bare email strings also accepted at runtime).
subjectrequired): Email subject line (max 255 chars). Supports merge tags, e.g. Hi {{first_name}}
textconditional): Email body text. Required (alongside or instead of html) for inline sends; must be omitted when template_uuid is set.
htmlconditional): HTML version of the email body. Required (alongside or instead of text) for inline sends; must be omitted when template_uuid is set.
categoryoptional): Message category
template_uuidoptional): Use a Mailtrap email template instead of inline content. When set, subject / text / html / category must be omitted.
template_variablesoptional): Object of variables substituted into the template referenced by template_uuid. Only allowed together with template_uuid.
baseoptional), requests (required): See batch-send-transactional-email above.
reply_tooptional): Reply-To address parts (display_name, local_part, domain)
custom_variablesoptional): Default custom variables (string-valued).
headersoptional): Default custom headers.
requestsrequired): Non-empty array of per-recipient messages. Each entry has:
Inlinesubject/text/html/category) or template (template_uuid/template_variables) overrides; any field omitted falls back to the matching base value.
search_afteroptional): Pagination cursor from the previous response's next_page_cursor
sent_afteroptional): ISO 8601 date/time; only logs sent after this time
sent_beforeoptional): ISO 8601 date/time; only logs sent before this time
from_emailoptional): Filter by sender email; use with from_operator (default: ci_equal)
to_emailoptional): Filter by recipient email; use with to_operator (default: ci_equal)
statusoptional): Filter by delivery status: delivered, not_delivered, enqueued, opted_out; use with status_operator (default: equal)
sending_domain_idrequired): Sending domain ID
sending_streamoptional, email_sending only): "transactional" or "bulk"
eventsoptional): Filter by event type(s): delivery, open, click, bounce, spam, unsubscribe, soft_bounce, reject, suspension; use with events_operator…
email_service_provider_responseoptional): Filter by provider response text; use with _operator (ci_contain, etc.)
email_service_provideroptional): Filter by provider (exact); use with _operator: equal, not_equal
recipient_mxoptional): Filter by recipient MX; use with recipient_mx_operator (ci_contain, etc.)
message_idrequired): ID of the message to forward
include_contentoptional): When true, fetches the raw EML (if raw_message_url is available) and appends parsed HTML and plain-text body sections, similar to…
start_dateoptional): Start of the aggregation window (inclusive), YYYY-MM-DD. Defaults to the day the campaign was last started
end_dateoptional): End of the aggregation window (inclusive), YYYY-MM-DD. Defaults to the current date
breakdownoptional): How to break down the stats: aggregated (default), by_domain, by_category, by_email_service_provider, or by_date
sending_domain_idsoptional): Limit results to these sending domain IDs (array of integers)
sending_streamsoptional): Limit to transactional and/or bulk (array of strings)
categoriesoptional): Limit to these email categories (array of strings)
email_service_providersoptional): Limit to these providers, e.g. Google, Yahoo, Outlook (array of strings)
template_idrequired): ID of the template to delete
sandbox_idoptional): Sandbox ID. Falls back to MAILTRAP_SANDBOX_ID.
test_inbox_idoptional): Legacy alias for sandbox_id.
pageoptional): Page number for pagination (minimum: 1)
last_idoptional): Pagination cursor from a previous response's last_id
searchoptional): Filter campaigns by name (case-insensitive partial match)
project_idrequired): ID of the project to update
emailrequired): Contact email address
is_readrequired): true marks as read, false marks as unread
attachment_idrequired): ID of the attachment to fetch
include_setup_instructionsoptional): If true, append DNS setup instructions to the response. Default: false
domain_namerequired): Domain name (e.g. example.com)
open_tracking_enabledoptional): Track opens on emails sent from this domain
click_tracking_enabledoptional): Track clicks on links in emails sent from this domain
tracking_opt_out_enabledoptional): Add the tracking opt-out link to tracked emails. Requires open or click tracking
auto_unsubscribe_link_enabledoptional): Automatically add an unsubscribe link to emails
inbound_enabledoptional): Allow the domain to be attached to an inbound inbox as a catch-all
addressrequired): Street address
cityrequired): City
countryrequired): Country
zip_coderequired): ZIP or postal code
website_urlrequired): Company website URL
phoneoptional): Phone number
privacy_policy_urloptional): URL of the privacy policy page
terms_of_service_urloptional): URL of the terms of service page
info_leveloptional): business or individual
domain_idoptional): Attach to a custom sending domain (catch-all inbox). Omit for a Mailtrap-hosted inbox
suppression_idrequired): ID of the suppression to delete
start_timeoptional): Only opt-outs created at or after this time (ISO 8601)
end_timeoptional): Only opt-outs created at or before this time (ISO 8601)
tracking_opt_out_idrequired): ID of the tracking opt-out to delete
webhook_idrequired): ID of the webhook to delete
urloptional): New webhook URL
webhook_typerequired): "email_sending", "audit_log", or "inbound_receiving"
activeoptional, boolean): Enable or disable the webhook
payload_formatoptional): "json" or "jsonlines"
event_typesoptional, email_sending only): array of delivery, soft_bounce, bounce, suspension, unsubscribe, open, spam_complaint, click, reject
inbound_inbox_idoptional, inbound_receiving only): ID of the inbound inbox the webhook is linked to
contact_identifierrequired): Contact ID or email
fieldsoptional): Custom field values keyed by merge tag (string or number values)
list_idsoptional): Replace membership set with this exact list
unsubscribedoptional, boolean): Set to unsubscribed (true) or subscribed (false)
list_ids_includedoptional): List IDs to add the contact to
list_ids_excludedoptional): List IDs to remove the contact from
paramsrequired): Object of arbitrary key/value pairs. Values may be string, number, boolean, or null
list_idrequired): ID of the contact list to delete
field_idrequired): ID of the contact field to delete
merge_tagoptional): New merge tag (must remain unique)
data_typeoptional): One of text, number, boolean, date
contactsrequired): Array of contact entries. Each entry needs:
import_idrequired): ID of the contact import job
filtersrequired): Array of filter objects. Each has:
operatorrequired): One of equal, not_equal, contains, not_contains, is_empty, is_not_empty
valuerequired): Comparison value (string, number, boolean, or array)
export_idrequired): ID of the contact export job
tokenoptional): Page number to retrieve (page-token pagination). Defaults to 1
per_pageoptional): Number of campaigns per page. Defaults to 50, maximum 100
email_campaign_idrequired): ID of the email campaign
from_local_partrequired): Local part (before the @) of the From address
template_attributesrequired): Inline email template. Has:
body_htmloptional): HTML body (the design). Required before the campaign can be scheduled or started. Include an unsubscribe link via an anchor whose href contains…
body_textoptional): Plain-text alternative of the email body
merge_tagsoptional): Bare names of the merge tags referenced in the subject/body, e.g. ["first_name"]
from_display_nameoptional): Display name shown in the From header
delivery_modeoptional): rapid (send as fast as possible) or gradual (throttle to delivery_options.emails_per_hour)
delivery_optionsoptional): Delivery throttling options (emails_per_hour)
contact_list_idsoptional): IDs of contact lists to send to (treated as the full set of included lists)
contact_segment_idsoptional): IDs of contact segments to send to (treated as the full set of included segments)
datetimerequired): When to send the campaign (ISO 8601). Must be in the future and no more than 1 month ahead
domain_uuidsoptional): Filter by sending domain UUIDs (array of strings)
inbox_idsoptional): Filter by sandbox inbox IDs (array of strings)
project_idsoptional): Filter by sandbox project IDs (array of strings)
account_access_idrequired): Target account access ID
permissionsrequired): Array of permission entries. Each has:
resource_idrequired): ID of the resource
resource_typerequired): One of account, project, inbox, domain, billing
access_levelrequired): 100 (admin) or 10 (viewer)
destroyoptional, boolean): When true, removes this permission instead of creating/updating it
expires_atoptional): Expiration for the new token as an ISO 8601 date-time. Omit for the server default (1 year); pass an explicit null for a token that never expires.…
resourcesoptional): Array of resource permissions to scope the token to. Each entry has:
api_token_idrequired): ID of the API token to delete
folder_idrequired): ID of the inbound folder
inbox_idrequired): ID of the inbox
attachmentsoptional): Array of { content (base64), filename, type?, disposition?, content_id? }
thread_idrequired): ID of the thread

How to install the Mailtrap MCP Server

{
  "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_SANDBOX_ID": "your_sandbox_id"
      }
    }
  }
}

From the project documentation. Replace placeholders and example paths before connecting.

Configuration

VariableDescriptionRequired
MAILTRAP_API_TOKENDeclared in the maintainer’s client configuration.Yes
DEFAULT_FROM_EMAILDeclared in the maintainer’s client configuration.Check documentation
MAILTRAP_ACCOUNT_IDDeclared in the maintainer’s client configuration.Yes
MAILTRAP_SANDBOX_IDDeclared in the maintainer’s client configuration.Yes