Mailgun MCP Server logo

Mailgun MCP Server

Connects AI assistants to Mailgun for email delivery, account operations, analytics, validation, and deliverability workflows.

Install Mailgun MCP Server

Pick your client, then add it in one click or paste the config.

STDIONode.js
~/Library/Application Support/Claude/claude_desktop_config.json
claude_desktop_config.json
{
  "mcpServers": {
    "mailgun-mcp-server": {
      "command": "npx",
      "args": [
        "-y",
        "@mailgun/mcp-server"
      ],
      "env": {
        "MAILGUN_API_KEY": "YOUR_VALUE_HERE",
        "MAILGUN_API_REGION": "YOUR_VALUE_HERE",
        "MAILGUN_API_HOSTNAME": "YOUR_VALUE_HERE",
        "MAILGUN_MCP_TAGS": "YOUR_VALUE_HERE"
      }
    }
  }
}

Settings → Developer → Edit Config, merge this into mcpServers, then fully quit and reopen Claude Desktop.

Values are written into the snippet above so you can paste it as is. They never leave your browser.

We couldn’t confirm it starts correctly

We ran the install command but it didn't respond within our test window — this can mean a slow first-time install rather than a real problem.

npx -y @mailgun/mcp-server

No response to initialize.

This is an experimental automated check and can have false negatives — missing environment variables, a slow cold install, etc. It doesn’t necessarily mean something’s wrong. Last checked .

Overview

Mailgun MCP Server is Mailgun’s official local MCP server for sending email and managing Mailgun account operations through stdio. It exposes curated Mailgun API endpoints for domains, events, logs, statistics, suppressions, templates, webhooks, routes, mailing lists, validation, inbox placement, and email previews. Tools are generated from a bundled OpenAPI specification and can be loaded all at once, filtered by tag, or added through dynamic toolsets. Use it when an AI assistant needs to inspect or update Mailgun resources without exposing delete operations.

Use cases

  • Send transactional email through Mailgun
  • Inspect delivery logs and bounce classifications
  • Verify domains and review DNS configuration
  • Validate recipient addresses before sending
  • Review inbox placement and email rendering results

Key features

  • Mailgun email sending and message retrieval
  • Domain, DNS, webhook, route, and mailing-list management
  • Metrics, logs, statistics, and suppression inspection
  • Email validation, inbox-placement, and rendering tools
  • Tag-based and dynamic tool loading
  • Read and update operations without delete tools

Security & health

What it can reach and how reliably it runs — from our own checks, not the maintainer’s claims.

ActiveLast checked

Recent health check succeeded.

Supply-chain signal

No high-severity advisories surfaced by our automated scan.

Critical 0High 0Medium 0Low 0

Scanned 3d ago via OSV.dev · @mailgun/mcp-server (npm)

Adoption & maintenance

Factual signals from GitHub, npm, and our automated checks — not a rating.

GitHub stars65Stargazers on the source repository.
npm downloads11kPackage downloads in the last 30 days.
Last commit2d agoMost recent push to the default branch.
Install checkInconclusiveDidn't respond in our test window — often a slow first install.

How Mailgun MCP Server works

What Mailgun MCP Server does

Mailgun MCP Server connects MCP-compatible AI clients to the Mailgun API. Its tools cover both email operations and account administration, including sending, retrieving, and resending messages; inspecting domains and DNS verification; managing tracking settings; and working with event webhooks, inbound routes, mailing lists, and email templates.

The server also supports operational and deliverability workflows. Agents can query sending and usage metrics, inspect event logs, review aggregate statistics by domain or other dimensions, examine bounces, unsubscribes, complaints, and allowlist entries, and analyze bounce classifications. Additional tools validate email addresses, retrieve inbox-placement test results, and inspect email rendering results across clients. IP assignments, dedicated IP pools, and account sending limits are also available.

Delete operations are not exposed. The available operations are limited to reads and updates, along with actions such as sending messages and validating addresses.

How it works

At startup, the server reads a bundled Mailgun OpenAPI specification and turns an allowlisted set of endpoints into MCP tools. Zod schemas generated from that specification describe each tool’s inputs. Tools carry product tags such as send, validate, optimize, and inspect, as well as toolset and read-only metadata.

The default mode loads the full tool collection. Tag filtering can restrict startup to selected products or send.<group> toolsets. Dynamic mode loads a smaller core collection and provides tools that let the model request additional toolsets when needed, reducing the number of definitions initially sent to the model.

Setup and configuration

Node.js 20.12 or newer, a Mailgun account, and a Mailgun API key are required. The npm package runs over stdio and can generally be launched on demand with:

Terminal
npx -y @mailgun/mcp-server

Set MAILGUN_API_KEY to the key from Mailgun’s API security settings. MAILGUN_API_REGION selects the us or eu API region and defaults to us. MAILGUN_API_HOSTNAME can override the hostname derived from the region. For tool loading, set MAILGUN_MCP_TAGS to a comma-separated list, a supported tag or toolset, or dynamic; a --tags command-line argument takes precedence.

The server can be configured in Claude Desktop, Claude Code, Cursor, Codex, VS Code with GitHub Copilot, Windsurf, and Gemini CLI. EU-hosted Mailgun accounts should use MAILGUN_API_REGION=eu unless an explicit API hostname is configured.

Tools and capabilities

Representative capability groups include:

  • Send, retrieve, and resend Mailgun messages.
  • List domains, inspect DNS records, recheck verification, and manage tracking options.
  • Query metrics, usage data, event logs, aggregate statistics, and bounce classifications.
  • Manage webhooks, inbound routes, mailing lists, templates, and template versions.
  • Review suppressions, IP assignments, IP pools, and monthly account limits.
  • Validate addresses and retrieve Optimize inbox-placement or Inspect rendering results.

Limitations and notes

The server runs locally on the user’s machine and communicates through stdio; Mailgun does not provide a hosted version of it. Access depends on the permissions and validity of the configured Mailgun API key. Tool loading can be narrowed with tags, which is useful when an assistant only needs a specific Mailgun workflow. No delete endpoint is exposed through the MCP interface.

Reviews

No reviews yet — be the first to share how it worked for you.

Frequently Asked Questions about Mailgun MCP Server

Mailgun MCP Server is an MCP server that connects AI assistants to the Mailgun API over local stdio. Its main tools send, retrieve, and resend email; manage domains, templates, webhooks, routes, and lists; query metrics and logs; inspect suppressions; validate addresses; and review inbox placement and rendering results.

Run it with npx using `npx -y @mailgun/mcp-server` and set `MAILGUN_API_KEY` in the client configuration. Node.js 20.12 or newer is required. The package can be added to Claude Desktop, Claude Code, Cursor, Codex, VS Code, Windsurf, or Gemini CLI.

Only `MAILGUN_API_KEY` is required. Set `MAILGUN_API_REGION` to `eu` for the EU API region when needed; it defaults to `us`. `MAILGUN_API_HOSTNAME` overrides the derived API hostname, and `MAILGUN_MCP_TAGS` controls which tools or toolsets load.

No. The exposed operations are limited to reads and updates, along with actions such as sending messages and validating email addresses. Delete operations are not available through the MCP tools.

Yes. Add it as a global MCP server in Cursor Settings, using `npx` with `@mailgun/mcp-server` and an environment entry for `MAILGUN_API_KEY`. The server runs locally over stdio.

Related MCP servers

Add a badge to your READMEShow it’s listed — live SVG, Markdown or HTML.

AllMCPs Directory Badge

Full Badge Customizer

Showcase your server listing on GitHub or your project documentation. Embed this dynamic SVG badge to highlight official listing status and live engagement.

Badge Style:
Live Dynamic SVG PreviewMailgun MCP Server AllMCPs Directory Badge
Markdown (GitHub README)
[![AllMCPs](https://allmcps.com/api/badge/mailgun-mcp-server?style=directory)](https://allmcps.com/mcp/mailgun-mcp-server)
HTML Embed
<a href="https://allmcps.com/mcp/mailgun-mcp-server"><img src="https://allmcps.com/api/badge/mailgun-mcp-server?style=directory" alt="Mailgun MCP Server on AllMCPs" /></a>