Key Takeaways
Mailgun API access: Yes, all Mailgun plans, starting with Free.
Mailgun MCP server: Official, local, Mailgun API key in the MAILGUN_API_KEY environment variable.
Mailgun pricing and limits: Each MCP tool call makes a Mailgun API request. The server has no client-side rate limiting; Mailgun's server-side API rate limits apply.
Mailgun connects with
Claude, Claude Code,
Gemini,
Cursor,
VS Code.
You want an AI agent to send or analyse email without building every API call.
Mailgun provides API access on all plans from Free, and its official local MCP server uses an API key while Mailgun bills email volume by plan and overage.
For full seat pricing, plan limits and team workflows beyond developer endpoints, read our Mailgun review or compare category peers in Email Deliverability & Cold Email Infrastructure tools with an API.
What does the Mailgun API include?
Mailgun provides API access on All Mailgun plans, starting with Free using HTTP Basic Auth with username api and an API key.
| What you need to know | Detail |
|---|---|
| Plan that includes it | All |
| What it costs | Free: $0/month with 100 emails/day. Basic: from $15/month with 10,000 emails/month, then from $1.80 per 1,000 extra emails. |
| Sign-in | HTTP Basic Auth with username api and an API key |
| Rate limits | Default rate limits, all per account: Messages: 80,000 API calls per 10 seconds. Logs: 200,000 recipients per second. Domains: 10 domains per second. All other endpoints, unless otherwise noted: 300 requests per second. |
| OpenAPI file | Yes |
| Official SDKs | Python, Ruby, PHP, Java, C#, Node.js, Go |
| Webhooks | Yes |
| Docs | API documentation |
What you can do with it
- Send email as MIME content or as separate message parts
- Retrieve stored messages and resend them
- Query delivery metrics, statistics and event logs
- Manage sending domains, tracking, templates and inbound routes
- Receive
Mailgun events through account-level or domain-level webhooks
Sources:Mailgun API integrationMailgun API overviewMailgun authenticationMailgun developer toolsMailgun messages APIMailgun webhooks
How does the Mailgun MCP server work?
Mailgun supports an official local MCP server authenticated with Mailgun API key in the MAILGUN_API_KEY environment variable.
| What you need to know | Detail |
|---|---|
| Who makes it | Official, run by |
| Where it runs | Runs on your computer |
| Address or package | @mailgun/mcp-server, run locally over stdio with npx |
| Sign-in | |
| Usage | Each MCP tool call makes a |
| Works with |
Before you connect it
- Use a dedicated API key scoped to the operations the agent needs.
- The server runs on your machine, communicates only with
Mailgun HTTPS APIs, and does not read local files or databases for tool execution. - It exposes read and update actions but no delete actions, so review tool-call confirmations because prompts can still cause unwanted updates.
See how sibling tools handle programmatic connections in MCP servers for email deliverability & cold email infrastructure tools.
Sources:Mailgun MCP server documentationMailgun MCP server repositoryMailgun MCP server README
Which MCP tools does Mailgun expose?
The
Mailgun MCP server exposes 6 documented MCP tools for connected AI clients.
| Tool | What it does | Access |
|---|---|---|
post-v3-domain-messages | Send an email | Changes data |
get-v4-domains | List sending domains | Read only |
put-v4-domains-name-verify | Request another DNS-record check for a domain | Changes data |
get_metrics_summary | Read key sending metrics | Read only |
post-v1-analytics-logs | Query event logs | Read only |
validate_email | Validate an email address | Read only |
How do you connect Mailgun to your AI app?
Mailgun documents direct connection steps for
Claude, Claude Code,
Cursor,
VS Code,
Gemini.
Claude
- Install Node.js 20.12 or newer and create a
Mailgun API key. - In
Claude settings, add @mailgun/mcp-server with npx and set MAILGUN_API_KEY in its environment.
Claude Code
- Run claude mcp add mailgun -e MAILGUN_API_KEY=YOUR-mailgun-api-key -- npx -y @mailgun/mcp-server.
- Run /mcp in
Claude Code to confirm the
Mailgun server is connected.
Cursor
- Open
Cursor Settings, MCP, then Add new global MCP server. - Add @mailgun/mcp-server with npx and set MAILGUN_API_KEY in its environment.
VS Code
- Add a mailgun server entry to settings.json under mcp.servers.
- Set its command to npx, its arguments to -y and @mailgun/mcp-server, and MAILGUN_API_KEY in its environment.
Gemini
- Add a mailgun mcpServers entry to ~/.gemini/settings.json.
- Set its command to npx, its arguments to -y and @mailgun/mcp-server, and MAILGUN_API_KEY in its environment.
How did we check Mailgun API and MCP access?
Mailgun verification summary: Every fact comes from the vendor's own pricing, documentation and help pages, read on the date shown. Last checked 27 Nov 2026 following how we check figures and our AI agent readiness study.
Sources:Mailgun API integrationMailgun API overviewMailgun authenticationMailgun developer toolsMailgun messages APIMailgun webhooksMailgun MCP server documentationMailgun MCP server repositoryMailgun MCP server README
What are common questions about Mailgun API and MCP?
Does Mailgun offer both an API and an MCP server?
Yes.
Mailgun documents a REST API and an official MCP server that runs locally through the @mailgun/mcp-server package.
What does Mailgun API access cost?
API access is available on all
Mailgun plans. The Free plan includes 100 emails per day, while Basic starts at $15 per month for 10,000 emails and has email overages from $1.80 per 1,000 emails.
What can the Mailgun MCP server change?
It can send email and perform update actions such as domain DNS checks.
Mailgun says the MCP server does not expose delete operations.