Mailgun MCP Server

Interact with Mailgun API.

Remote serverstreamable-httpTypeScript

What is the Mailgun MCP server?

Mailgun MCP server exists for a simple reason — assistants are far more useful when they can act on Mailgun directly instead of describing what you should do. Interact with Mailgun API.

What you get

The parenthetical labels above (validate, optimize, inspect) are the product tags used by tag filtering. Every other capability is registered under the send tag.

  • Messaging — — Send emails, retrieve stored messages, resend messages
  • Domains — — View domain details, verify DNS configuration, manage tracking settings (click, open, unsubscribe)
  • Webhooks — — List, create, and update event webhooks
  • Routes — — View and update inbound email routing rules
  • Mailing Lists — — Create, view, and update mailing lists and their members
  • Templates — — Create, view, and update email templates with versioning

What the assistant can call

Once Mailgun is connected, these are the calls the assistant has available:

  • Capabilities — The parenthetical labels above (validate, optimize, inspect) are the product tags used by tag filtering. Every other capability is
  • Cursor — Open the command palette and choose Cursor Settings → MCP → Add new global MCP server, then add:
  • Codex — The Codex tool exposed by this server
  • Windsurf — The Windsurf tool exposed by this server

Setting it up

Being a remote server, there is no local install. You register the endpoint with your client, authorise it once, and the tools appear.

Configuration and credentials

You will need 3 environment variables: MAILGUN_API_REGION, MAILGUN_API_KEY, MAILGUN_MCP_TAGS. The server will not start without them, which is usually why the tools fail to appear on a first run. Keep credentials in your client's env block or a secrets manager rather than in a file you might commit.

  • Node.js (v20.12 or higher) - Mailgun account and API key

Choosing this one

This sits in the team communication group, where several servers overlap in what they claim to do but differ sharply once you actually set them up. Mailgun's toolset — Capabilities, Cursor, Codex and 1 more — is a fair guide to whether it matches your workflow.

SyncDev reviews every entry in this directory against the project's own documentation before publishing, and revisits them as servers change.

Before you rely on it

  • Your data travels to the provider's service, so the usual questions apply about what you send and what they retain.
  • Missing credentials fail quietly in some clients — if no tools show up, check the environment block first.
  • MCP clients confirm each tool call by default. Leave that on until you have watched what the mailgun mcp server does with a few real requests.

Available tools

ToolWhat it does
CapabilitiesThe parenthetical labels above (validate, optimize, inspect) are the product tags used by [tag filtering](#tag-filtering). Every other capability is registered under the send tag.
CursorOpen the command palette and choose **Cursor Settings → MCP → Add new global MCP server**, then add:
CodexThe Codex tool exposed by this server.
WindsurfThe Windsurf tool exposed by this server.

How to install the Mailgun MCP server

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

Configuration as documented by the project. Restart the client after saving.

Configuration

  • Node.js (v20.12 or higher) - Mailgun account and API key
VariableDescriptionRequired
MAILGUN_API_REGIONConfiguration value read at startup.Optional
MAILGUN_API_KEYCredential the server authenticates with.Yes
MAILGUN_MCP_TAGSConfiguration value read at startup.Optional

Example prompts to try

  • Use Mailgun to Capabilities.
  • Use Mailgun to Cursor.
  • Use Mailgun to Codex.

Frequently asked questions

It connects Mailgun to MCP-compatible AI assistants such as Claude and Cursor, exposing 4 tools (Capabilities, Cursor, Codex, and more) that the assistant can call on your behalf. Instead of copying data back and forth by hand, the assistant works with Mailgun directly.