Skip to main content
Watch: I Built an AI App Without Leaving Databricks

Communication - official Mailgun server

Mailgun MCP server

Open-source local MCP server (npm @mailgun/mcp-server, stdio) that exposes 50+ Mailgun API operations so agents can send email, check delivery stats and logs, verify domain DNS, and manage templates, webhooks, routes, mailing lists, suppressions and IP pools. It also covers Validate, Optimize (inbox placement) and Inspect (email preview) products. It runs locally from @mailgun/mcp-server (npm) with API key auth.

Last verified 4 sources

Install

Terminal
claude mcp add mailgun -e MAILGUN_API_KEY=YOUR-mailgun-api-key -- npx -y @mailgun/mcp-server
Terminal
codex mcp add mailgun \
  --env MAILGUN_API_KEY=YOUR-mailgun-api-key \
  -- npx -y @mailgun/mcp-server
JSON
{
  "mcpServers": {
    "mailgun": {
      "command": "npx",
      "args": ["-y", "@mailgun/mcp-server"],
      "env": {
        "MAILGUN_API_KEY": "YOUR-mailgun-api-key"
      }
    }
  }
}

VS Code

JSON
{
  "mcp": {
    "servers": {
      "mailgun": {
        "command": "npx",
        "args": ["-y", "@mailgun/mcp-server"],
        "env": {
          "MAILGUN_API_KEY": "YOUR-mailgun-api-key"
        }
      }
    }
  }
}

Generic

JSON
{
  "mcpServers": {
    "mailgun": {
      "command": "npx",
      "args": ["-y", "@mailgun/mcp-server"],
      "env": {
        "MAILGUN_API_KEY": "YOUR-mailgun-api-key",
        "MAILGUN_API_REGION": "us"
      }
    }
  }
}

Notes and caveats

  • Runs locally only; Mailgun says it does not offer a hosted version.
  • Requires Node.js (README says v20.12+, docs page says v18+) and MAILGUN_API_KEY; set MAILGUN_API_REGION=eu for EU accounts.
  • Read and update operations only, with no delete operations.
  • Tools are generated from a curated OpenAPI allowlist and can be scoped with --tags send,validate,optimize,inspect; no per-tool list is documented.
  • Skills using Validate, Optimize or Inspect need those products on the account.
  • Install snippets come from the official GitHub README; the docs page Claude Code snippet puts -e after the npx command.
  • Also offered as a Cursor Marketplace plugin with 15 skills, and for Claude via the mailgun/mailgun-plugins marketplace repo.

FAQ

What does the Mailgun MCP server do?

Open-source local MCP server (npm @mailgun/mcp-server, stdio) that exposes 50+ Mailgun API operations so agents can send email, check delivery stats and logs, verify domain DNS, and manage templates, webhooks, routes, mailing lists, suppressions and IP pools. It also covers Validate, Optimize (inbox placement) and Inspect (email preview) products.

How do I add the Mailgun MCP server to Claude Code?

Run claude mcp add mailgun -e MAILGUN_API_KEY=YOUR-mailgun-api-key -- npx -y @mailgun/mcp-server, copied from Mailgun's docs. This page also has snippets for Codex, Cursor, VS Code and Generic.

Does the Mailgun MCP server need authentication?

Yes, API key. Transport: stdio. Status: GA, last checked October 17, 2026.

Sources

Last verified against 4 Mailgun pages, then re-checked independently.

Newsletter

New MCP servers, the week they ship

One email per week. New official MCP servers, the coding tools that support them and how developers wire them up.