# Mailgun

Email delivery service with a REST API and SMTP that sends, receives and tracks transactional and bulk email.

- Provider: Sinch (https://www.mailgun.com)
- Category: Send email
- Type: Hosted API
- Pricing model: Monthly plans by email volume, with overage per 1,000 emails [25]
- Free tier: Free plan: 100 emails a day, 1 custom sending domain [25]
- Authentication: API key over HTTP basic auth, username `api` [8]
- Connect via: REST API, SMTP, SDKs, local MCP server [19]
- Read from the provider's pages on 2026-11-04
- Page: https://supermarket.dev/tools/send-email/mailgun

## Pricing

### Billing
- Pricing model: Monthly plans by email volume, with overage per 1,000 emails [25]
- Free tier: $0 a month, 100 emails a day, 1 custom sending domain, 1 day of logs [25]
- Card required for free tier: Not published
- Minimum spend: None on the free plan; paid plans start at $15 a month [25]
- Billing period: Monthly [25]
- Free trial: 1 month free on Foundation and Scale [25]

### Prices
From Mailgun's machine-readable pricing page, in USD. Per 1,000 is the monthly price divided by included emails in thousands, for example $35 / 50 = $0.70. Overage is the lowest published rate.
| Plan | Price per month | Emails included | Included, $ per 1,000 | Overage, $ per 1,000 |
|---|---|---|---|---|
| Free | $0 | 100 a day | — | Not available |
| Basic | $15 | 10,000 a month | $1.50 | from $1.80 |
| Foundation | $35 | 50,000 a month | $0.70 | from $1.30 |
| Foundation | $75 | 100,000 a month | $0.75 | from $1.30 |
| Scale | $90 | 100,000 a month | $0.90 | from $1.00 |
| Scale | $400 | 500,000 a month | $0.80 | from $1.00 |
| Scale | $1,250 | 2,500,000 a month | $0.50 | from $1.00 |
| Enterprise | On request | Custom | — | — |
Source [25]

### Other charges
- Unverified-domain sending cap: 300 emails per day (domains that are not verified) [17]

## Tools

### MCP server
- Official MCP server: Yes, local [4]
- Address or package: `@mailgun/mcp-server` (npm), source at `github.com/mailgun/mailgun-mcp-server`, Apache 2.0 [4]
- Transport: stdio [5]

### MCP tools
Tools are generated from the Mailgun OpenAPI spec using an allowlist of 74 endpoints (70 plain plus 4 named). The README says no delete operations are exposed. The server sets no tool annotations, so read-only status is not stated; GET endpoints are read operations by HTTP method.
| Tool | What it does | Read-only |
|---|---|---|
| Send message (`POST /v3/{domain_name}/messages`) | Sends an email | Not stated |
| Stored message (`GET /v3/domains/{domain_name}/messages/{storage_key}`) | Retrieves a stored message | Not stated |
| Resend message (`POST /v3/domains/{domain_name}/messages/{storage_key}`) | Resends a stored message | Not stated |
| Domains (`GET /v4/domains`, `PUT /v4/domains/{name}/verify`) | Lists domains and verifies DNS | Not stated |
| Webhooks (`GET`/`POST`/`PUT` under `/v3/domains/{domain}/webhooks`) | Lists, creates and updates event webhooks | Not stated |
| Templates (`/v3/{domain_name}/templates`) | Lists, creates and updates templates and versions | Not stated |
| Analytics (`POST /v1/analytics/metrics`, `/v1/analytics/logs`) | Queries sending metrics and logs | Not stated |
| `validate_email` (`GET /v4/address/validate`) | Checks an address for validity and deliverability | Not stated |
Source [7]

### API
| Endpoint | What it does |
|---|---|
| `POST /v3/{domain_name}/messages` | Send a message from parts (text, html, attachments, template) |
| `POST /v3/{domain_name}/messages.mime` | Send a prebuilt MIME message |
| `GET /v3/{domain_name}/events` | Query message events |
| `GET /v3/routes` | List inbound routes |
| `GET /v3/lists` | List mailing lists |
| `GET /v3/ips` | List IPs |
| `GET /v3/ip_pools` | List dedicated IP pools |
| `GET /v4/domains/{name}` | Get a sending domain and its DNS records |
Source [12]

### Features
- Sending domains: Own domains in US or EU region; sandbox domain for testing [19]
- Receiving email: Yes, via routes (forward, store, stop) [19]
- Webhooks: Yes, account or domain level; events accepted, delivered, temporary_fail, permanent_fail, opened, clicked, unsubscribed, complained [14]
- Batch sending: Yes, up to 1,000 recipients per call with recipient variables [13]
- Scheduled sending: Yes, `o:deliverytime`, 3 or 7 days ahead depending on plan [11]
- Attachment size limit: Not published [11]
- Dedicated IP: Yes, dedicated IPs and IP pools; price not found [12]

## Authentication

### Methods
| Method | Used for | How |
|---|---|---|
| Primary account API key | All API operations on any sending domain | HTTP basic auth, username `api`, password is the key |
| Domain sending key | Sending only, for one domain (`POST /messages`, `/messages.mime`) | HTTP basic auth, username `api` |
| Role-based API key | Operations limited to a chosen role (most plans) | Created by an admin in the dashboard |
| SMTP credentials | Sending over SMTP | Per-domain SMTP login |
Source [8]

### Getting access
- Who creates the account: A person signs up and activates the account in the dashboard; agent self sign-up not stated [20]
- Where to get a key: Dashboard, Account Settings, API Keys [8]
- Other requirements: Sandbox domain sends only to authorized recipients who verify their address; own-domain sending needs DNS records [20]
- MCP server credentials: `MAILGUN_API_KEY` environment variable; optional `MAILGUN_API_REGION` (`us` or `eu`) [6]

## Setup

### Addresses
- REST API: `https://api.mailgun.net/` (US), `https://api.eu.mailgun.net/` (EU) [10]
- MCP server: None hosted; run locally with `npx -y @mailgun/mcp-server` [4]
- OpenAPI spec: Published in the docs (OpenAPI 3.1.0) [22]
- Docs for agents: `https://documentation.mailgun.com/llms.txt` [22]
- Status page: `https://status.mailgun.com/` [24]
- SMTP: `smtp.mailgun.org` (US), `smtp.eu.mailgun.org` (EU); ports 25, 465, 587, 2525 [21]

### Install
| What | Command |
|---|---|
| MCP server, Claude Code | `claude mcp add mailgun -e MAILGUN_API_KEY=YOUR-mailgun-api-key -- npx -y @mailgun/mcp-server` |
| MCP server, other clients | Run `npx -y @mailgun/mcp-server` with `MAILGUN_API_KEY` in env |
| Node.js SDK | `npm install mailgun.js` |
| Python SDK | `pip install mailgun` |
| Ruby SDK | `gem install mailgun-ruby` |
| Go SDK | `go get github.com/mailgun/mailgun-go/v5` |
| Java SDK | `implementation 'com.mailgun:mailgun-java:1.1.3'` |
Source [23]

## Limits

### Rate limits
- Metrics API: 500 requests per 10 seconds [18]
- Rate limit headers: `X-RateLimit-Limit`, `X-RateLimit-Remaining`, `X-RateLimit-Reset`; HTTP 429 when exceeded [10]
- Send API rate limit: Not published [10]

### Other limits
- Recipients per batch call: 1,000 [13]
- Send options size: 16 KB total for parameters starting with `o:`, `h:`, `v:` or `t:` [11]
- Scheduling window: 3 or 7 days depending on plan [11]
- Delivery window (`o:deliver-within`): 5 minutes to 24 hours [11]
- Suppression import file: 25 MB per CSV [12]
- Mailing list members per bulk add: 1,000 [12]
- Route filter or action length: 4k characters [16]

## Privacy

### Your data
- Data location: US or EU region; message data stays in the region where it is processed [10]
- Retention: Events kept at least 3 days; metrics hourly 60 days, daily 1 year, monthly indefinitely [12]
- Used for training: Not published [2]
- Zero data retention: Not published [2]

### Compliance
- Certifications: Listed on the Sinch trust portal (list not read) [19]
- HIPAA: Not published [2]

## Sources

1. Pricing (blocked, HTTP 403): https://www.mailgun.com/pricing/
2. Privacy policy (blocked, HTTP 403): https://www.mailgun.com/legal/privacy-policy/
3. Sinch trust portal for Mailgun (not read): https://trust.sinch.com/?product=mailgun
4. Mailgun MCP Server docs: https://documentation.mailgun.com/docs/mailgun/mcp.md
5. MCP server README: https://github.com/mailgun/mailgun-mcp-server/blob/main/README.md
6. MCP server SECURITY.md: https://github.com/mailgun/mailgun-mcp-server/blob/main/SECURITY.md
7. MCP server endpoint allowlist: https://github.com/mailgun/mailgun-mcp-server/blob/main/src/endpoints.ts
8. API authentication: https://documentation.mailgun.com/docs/mailgun/api-reference/mg-auth.md
9. API key management: https://documentation.mailgun.com/docs/mailgun/user-manual/api-key-mgmt/rbac-mgmt.md
10. API overview: https://documentation.mailgun.com/docs/mailgun/api-reference/api-overview.md
11. Send message API: https://documentation.mailgun.com/docs/mailgun/api-reference/send/mailgun/messages/post-v3--domain-name--messages.md
12. Mailgun API index: https://documentation.mailgun.com/docs/mailgun/api-reference/send/mailgun.md
13. Batch sending: https://documentation.mailgun.com/docs/mailgun/user-manual/sending-messages/batch-sending.md
14. Webhooks: https://documentation.mailgun.com/docs/mailgun/user-manual/webhooks/webhooks.md
15. Sending with attachments: https://documentation.mailgun.com/docs/mailgun/user-manual/sending-messages/send-attachments.md
16. Routes: https://documentation.mailgun.com/docs/mailgun/user-manual/receive-forward-store/routes.md
17. Domain verification: https://documentation.mailgun.com/docs/mailgun/user-manual/domains/domains-verify.md
18. Rate limits and quotas: https://documentation.mailgun.com/docs/mailgun/api-reference/send/mailgun/metrics/rate-limits-and-quotas.md
19. Welcome to Mailgun: https://documentation.mailgun.com/docs/mailgun/get-started.md
20. Quickstart: https://documentation.mailgun.com/docs/mailgun/quickstart.md
21. Sending via SMTP: https://documentation.mailgun.com/docs/mailgun/user-manual/sending-messages/send-smtp.md
22. Mailgun docs llms.txt: https://documentation.mailgun.com/llms.txt
23. Node.js SDK: https://documentation.mailgun.com/docs/mailgun/sdk/nodejs_sdk.md
24. Checked by supermarket.dev
25. Pricing (machine-readable): https://www.mailgun.com/pricing.md
