Mailgun MCP server

OfficialMailgun (Sinch)57Config last verified Jun 1, 2026

Mailgun's official open-source MCP server lets agents send email and inspect deliverability, domains, suppressions, analytics, and more.

Mailgun MCP is the official server from Mailgun that gives AI agents a workflow-oriented interface to the Mailgun email API. Its tools are generated from Mailgun's OpenAPI spec and cover sending and resending messages, managing domains and DNS verification, tracking settings, webhooks, dedicated IPs and IP pools, tags and per-tag stats, account and domain totals, provider/device/country aggregates, analytics metrics and logs, suppression lists (bounces, unsubscribes, complaints, and allowlists), inbound routes, mailing lists and members, templates and versions, bounce classification, account limits, plus address validation, inbox placement, and email preview. That makes it a fit for deliverability copilots and ops agents that send transactional mail and diagnose why it is or isn't landing.

The canonical install is the published npm package, run with npx -y @mailgun/mcp-server over stdio. Authenticate with a MAILGUN_API_KEY and an optional MAILGUN_API_REGION (us or eu). By design the server is read-only with one exception, sending email, so an agent can freely explore account data without risking production. A MAILGUN_MCP_TAGS setting filters tools by product area (send, validate, optimize, inspect).

Quick install

Copy-paste configs are provided for all 8 supported clients. Pick your client below.

Add to ~/.claude.json

~/.claude.json
json
{
  "mcpServers": {
    "mailgun": {
      "command": "npx",
      "args": [
        "-y",
        "@mailgun/mcp-server"
      ],
      "env": {
        "MAILGUN_API_KEY": "<MAILGUN_API_KEY>",
        "MAILGUN_API_REGION": "<MAILGUN_API_REGION>",
        "MAILGUN_MCP_TAGS": "<MAILGUN_MCP_TAGS>"
      }
    }
  }
}
Or via CLI
bash
claude mcp add mailgun -- npx -y @mailgun/mcp-server

Available tools

ToolDescription
post-v3-domain-name-messagesSend an email.
get-v3-domains-domain-name-messages-storage-keyRetrieve a stored email.
post-v3-domains-domain-name-messages-storage-keyResend an email.
get-v4-domainsGet domains.
get-v4-domains-nameGet domain details.
put-v4-domains-name-verifyVerify Domain.
get-v3-domains-name-sending-queuesGet messages queue status.
get-v3-domains-name-trackingGet tracking settings.
put-v3-domains-name-tracking-clickUpdate click tracking settings.
put-v3-domains-name-tracking-openUpdate open tracking settings.
put-v3-domains-name-tracking-unsubscribeUpdate unsubscribe tracking settings.
get-v3-domains-domain-webhooksGet domain webhooks.
post-v3-domains-domain-webhooksCreate a domain webhook.
get-v3-domains-domain-name-webhooks-webhook-nameGet domain webhooks by type.
put-v3-domains-domain-name-webhooks-webhook-nameUpdate domain webhook.
get-v5-accounts-subaccounts-ip-pools-allList DIPPs delegated to subaccounts.
get-v3-ipsList account IPs.
get-v3-ips-ipGet details about account IP.
get-v3-ips-ip-domainsGet all domains of an account where a specific IP is assigned.
get-v3-ip-poolsList dedicated IP pools of the account.
get-v3-ip-pools-pool-idGet DIPP details.
get-v3-ip-pools-pool-id-domainsGet domains linked to DIPP.
get-v3-domain-tagsList all tags.
get-v3-domain-tagGet a tag.
get-v3-domain-tag-stats-aggregatesGet aggregate stat types by tag.
get-v3-domain-tag-statsGet stats by tag.
get-v3-domains-domain-tag-devicesList of supported devices.
get-v3-domains-domain-tag-providersList of supported providers.
get-v3-domains-domain-tag-countriesList of supported country codes.
get-v3-domains-domain-limits-tagGet tag limits.
get-v3-stats-totalTotals for entire account.
get-v3-domain-stats-totalTotals for entire domain.
get-v3-stats-total-domainsTotals for account domains for a single time resolution.
get-v3-stats-filterFiltered/grouped totals for entire account.
get-v3-domain-aggregates-providersAggregate counts by ESP.
get-v3-domain-aggregates-devicesAggregate counts by devices triggering events.
get-v3-domain-aggregates-countriesAggregate counts by country.
post-v1-analytics-metricsQuery account metrics.
post-v1-analytics-usage-metricsQuery account usage metrics.
post-v1-analytics-logsList logs.
get-v3-domainid-bounces-addressLookup bounce record.
get-v3-domainid-bouncesList all bounces.
get-v3-domainid-unsubscribes-addressLookup unsubscribe record.
get-v3-domainid-unsubscribesList all unsubscribes.
get-v3-domainid-complaints-addressLookup complaint record.
get-v3-domainid-complaintsList all complaints.
get-v3-domainid-whitelists-valueLookup allowlist record.
get-v3-domainid-whitelistsList allowlist records for domain.
get-v3-routesGet all routes.
get-v3-routes-idGet a route.
put-v3-routes-idUpdate a route.
get-v3-listsGet mailing lists.
post-v3-listsCreate a mailing list.
get-v3-lists-addressGet a mailing list by address.
put-v3-lists-addressUpdate a mailing list.
get-lists-string-list_address-membersGet mailing lists members.
post-lists-string-list_address-membersCreate a mailing list member.
get-lists-list_address-members-member_addressGet a member.
put-lists-list_address-members-member_addressUpdate a mailing list member.
get-v3-domain-name-templatesGet templates.
post-v3-domain-name-templatesCreate a template.
get-v3-domain-name-templates-template-nameGet template.
put-v3-domain-name-templates-template-nameUpdate template.
get-v3-domain-name-templates-template-name-versionsGet all template versions.
post-v3-domain-name-templates-template-name-versionsCreate a template version.
get-v3-domain-name-templates-template-name-versions-vGet a version.
put-v3-domain-name-templates-template-name-versions-vUpdate a version.
get-v1-bounce-classification-statsList statistics, ordered by total bounces.
post-v2-bounce-classification-metricsList statistic v2.
get-v5-accounts-limit-custom-monthlyGet current custom sending limit.
validate_emailValidate Address V4.
get_inbox_placement_resultGet Result Details.
get_preview_resultGet Test Results.

Required configuration

  • MAILGUN_API_KEYRequired

    Your Mailgun API key.

  • MAILGUN_API_REGIONOptional

    API region: 'us' (default) or 'eu'.

  • MAILGUN_MCP_TAGSOptional

    Optional comma-separated tag filter: send, validate, optimize, inspect.

What you can do with it

Send and verify transactional email

An agent sends a message through a verified domain and confirms tracking and DNS settings are configured, so transactional mail goes out correctly the first time.

Diagnose deliverability

A deliverability copilot reads bounces, complaints, and unsubscribes, checks provider and device aggregates, and queries analytics logs to explain why a campaign underperformed.

FAQ

Is it free?
The MCP server is free and open source under Mailgun. You use it within your existing Mailgun plan and its API limits.
Does it support remote/OAuth?
No. Mailgun MCP runs locally over stdio via npx -y @mailgun/mcp-server and authenticates with a Mailgun API key plus an optional region. There is no hosted OAuth endpoint.
Can it accidentally change my account?
By design the server is read-only with a single exception: it can send (create) email. This lets agents explore account data freely without risking production changes.
Why do the tool names look like API paths?
Most tools are generated from Mailgun's OpenAPI spec, so their names are derived from the HTTP method and route (for example, post-v3-domain-name-messages sends an email). A few curated tools have friendly names like validate_email.
← Browse all email servers