← Back to directory
M

Mailgun MCP Server

Official
Send email, investigate deliverability, and manage Mailgun accounts through MCP.
Category
Other #162 of 678
Stars
★ 66 Popular
Transport
stdio (local process)
Runtime
Node.js 20.12+
Credentials
API key / credential required
License
Apache-2.0
Last commit
57FMRS · C

The source identifies this as a Mailgun-provided MCP server that uses stdio and a Mailgun API key. It covers email sending, account management, analytics, and deliverability checks. Some operations change data, and email preview tests consume quota.

Strongest · Documentation 14/20 Weakest · Reliability 10/20

Reliability
10/20
Security and permissions
10/20
Maintenance
10/20
Documentation
14/20
Setup experience
13/20
Why each score
Reliability 10/20
The README describes stdio operation, tool generation from a bundled OpenAPI specification, dynamic loading, error handling, and preview-test timeout behavior, which documents the intended main paths. This review has only the README and manifest, with no CI, committed test evidence, or verifiable execution results; the initialization handshake, correspondence between declared tools and behavior, and dependency failure handling therefore remain unverified. The score is moderate under the static calibration.
Security and permissions 10/20
The documentation says the API key is used only by the server process, requests to Mailgun use HTTPS, and keys or request data are not logged. It also discloses account-changing operations, preview-test creation that consumes quota, webhook URLs without additional validation, prompt-injection exposure, and the lack of client-side rate limiting. The README says tools carry read-only hints, but does not show confirmation mechanisms or enforced permissions. Key security claims cannot be verified from source here, so points are deducted. No evidence of a listed red line was provided.
Maintenance 10/20
An Apache-2.0 license, npm release path, contribution entry point, and the supplied non-archived status support basic maintenance discoverability. There is no evidence here about commit cadence, release history, dependency updates, issue response, or a security-response channel, so maintenance activity and governance maturity remain uncertain.
Documentation 14/20
The README covers capabilities, configuration, toolsets, setup examples for several clients, preview-test input limits and quota effects, security boundaries, and development guidance. Points are deducted because there is no complete per-tool parameter reference, troubleshooting coverage is limited, and implementation and security claims are not backed by source or test material in the provided evidence.
Setup experience 13/20
The documentation gives a Node.js version requirement, npm/npx launch instructions, the required key, examples for several mainstream clients, and the EU region setting. The connection path is clear. Points are deducted because users must prepare a Mailgun account and API key, and there is no verifiable cross-platform execution or CI evidence; the static calibration caps this score at 15.

Static review · not runReviewed 2026-12-04

Read the FMRS scoring method →

Fit and risk

What it can accessUses the networkChanges third-party account data

Best for

  • Teams managing Mailgun email workflows through an MCP client.
  • Users investigating deliverability, reviewing sending analytics, or checking email rendering.

Not for

  • Users who need a hosted Mailgun MCP service; the source says this server runs locally and Mailgun does not currently offer a hosted version.
  • Users who do not want AI workflows to access or modify Mailgun account data.

Required permissions

  • A Mailgun API key is required. The server process uses it for API authentication; it is not exposed to the AI model.
  • Depending on enabled tools, the key may need permission to send email, update account settings, create preview tests, or read account data. Preview tests consume quota.

Risks and side effects

  • Tools can send email, update some account settings, and read data such as mailing list members; the server exposes no delete operations.
  • run_email_preview_qa creates a remote preview test and consumes preview quota, but does not send email.
  • Each tool call makes a direct Mailgun API request; the server has no client-side rate limiting.
  • Preview details may include sensitive content such as rendered HTML snippets; run the server in a trusted environment and review what is surfaced to the model.

Setup

Before you start

Runtime:Node.js 20.12+

MAILGUN_API_KEY requiredsecret Required Mailgun API key, available from Mailgun API security settings.
Other optional settings (5)
MAILGUN_API_REGION optional Mailgun API region, either us or eu; defaults to us.
MAILGUN_MCP_TAGS optional Tags or toolsets to load; can be set to dynamic. Defaults to all tools.
MAILGUN_API_HOSTNAME optional Optional API hostname override; takes precedence over the region setting.
PORT optional HTTP entrypoint listening port; defaults to 3000.
HOST optional Network interface for the HTTP entrypoint; defaults to 0.0.0.0.

Configure your MCP client to run command npx with arguments ["-y", "@mailgun/mcp-server"], and set the required MAILGUN_API_KEY. For an EU-region account, set MAILGUN_API_REGION to eu; it defaults to us.

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

Shown for Claude Desktop. Other clients may use a different file or key (VS Code uses "servers") — the configurator below converts it.

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

Goes in your project's .vscode/mcp.json (VS Code uses a "servers" key).

~/.codex/config.toml
[mcp_servers.mailgun]
command = "npx"
args = ["-y", "@mailgun/mcp-server"]

[mcp_servers.mailgun.env]
MAILGUN_API_KEY = "YOUR-mailgun-api-key"
MAILGUN_API_REGION = "us"

Append to ~/.codex/config.toml (OpenAI Codex CLI uses TOML).

Terminal
claude mcp add mailgun -e MAILGUN_API_KEY=YOUR-mailgun-api-key -e MAILGUN_API_REGION=us -- npx -y @mailgun/mcp-server

Run it in a terminal; replace any <…> placeholders with your own values first.

Check that it works

Confirm Mailgun tools appear in your client's MCP tool list. You can also ask it to list your domains to verify the server is connected and can reach Mailgun.

Troubleshooting

  1. Confirm Node.js is version 20.12 or higher and that the MCP client can launch npx.
  2. Check that MAILGUN_API_KEY is valid and has permission for the requested operation.
  3. For an EU account, set MAILGUN_API_REGION to eu; the default region is us.
  4. With dynamic tool loading, confirm the client refreshes its tool list after a list-changed notification; otherwise use the default tool set or fixed tag filtering.
  5. Check Mailgun API errors and rate limits; use --list-tags to see valid tags.

Things to try

Once connected, you can ask your AI assistant things like:

  • List my domains and check their DNS verification status.
  • Show email sending statistics for the past week.
  • Validate an email address for deliverability.
  • Check how an existing preview test renders across email clients.

Use cases

Send email and retrieve or resend stored messages.
Check domain DNS and tracking settings, sending metrics, logs, and bounce classifications.
Manage webhooks, inbound routes, mailing lists, templates, and suppression records.
Validate email addresses, query inbox placement results, or run email preview QA.

Supported clients

Claude Desktop
Claude Code
Cursor
Codex
GitHub Copilot
Windsurf
Gemini CLI

Listed from the project's documentation, not tested by this site.

Overview

Mailgun MCP Server is a local MCP server provided by Mailgun. It communicates with clients over stdio and connects to the Mailgun API. Capabilities include sending and retrieving messages, domain and DNS checks, analytics, suppressions, templates, email validation, inbox placement results, and email preview QA. It loads all tools by default, with options to filter by tags or load toolsets on demand.

Similar servers

Source revision d2981857a6bf Data synced 2026-12-05 Read the FMRS scoring method Markdown

Maintainer badge: embed FMRS score

Paste this Markdown into your repository README to display a live score badge:

README.md
[![FollowMCP](https://followmcp.com/badges/mailgun-mcp-server.svg)](https://followmcp.com/en/servers/mailgun-mcp-server)