Mailgun
Email API and SMTP relay for sending, receiving and tracking email.
- Always free
- Commercial use not stated
- No card required
Free tier
100 emails per day with 1 custom sending domain and 1-day log retention.
- 100 emails per day
- 1 custom sending domain
- 2 API keys
- 1-day log retention
- 1 inbound route
- 1 user per account
Gotchas
- Account activation requires verifying your email and a mobile number by SMS; VoIP, virtual and landline numbers are not accepted.
- The built-in sandbox domain only delivers to up to 5 authorized recipients, who must each confirm by email; verify a custom domain to send to anyone.
- Domains created in the EU region must use https://api.eu.mailgun.net instead of https://api.mailgun.net.
- Domain sending keys can only send messages; listing or managing domains needs an account API key.
Setup
What you do
- Sign up at https://signup.mailgun.com/new/signup.
- Activate the account by verifying your email address and a mobile phone number (SMS code).
- Create an API key at https://app.mailgun.com/settings/api_security.
- Add your sending domain's DNS records at your DNS provider, or add yourself as an authorized recipient to test with the sandbox domain.
How your agent gets access
API key
- Get it at
- app.mailgun.com/settings/api_security
- Env var
MAILGUN_API_KEY
HTTP Basic auth with username api; the official MCP server reads MAILGUN_API_KEY (and MAILGUN_API_REGION=eu for EU accounts).
Check it worked
curl -s --user "api:$MAILGUN_API_KEY" https://api.mailgun.net/v4/domains
Sources
- www.mailgun.com/pricing
- www.mailgun.com/features/email-api
- help.mailgun.com/hc/en-us/articles/203068914-What-does-the-Free-plan-offer
- help.mailgun.com/hc/en-us/articles/37182933150491-Account-Activation
- help.mailgun.com/hc/en-us/articles/217531258-Authorized-Recipients
- documentation.mailgun.com/docs/mailgun/quickstart
- documentation.mailgun.com/docs/mailgun/user-manual/domains/domains-sandbox
- documentation.mailgun.com/docs/mailgun/api-reference/api-overview
- documentation.mailgun.com/docs/mailgun/api-reference/mg-auth
- documentation.mailgun.com/docs/mailgun/user-manual/api-key-mgmt/rbac-mgmt
- documentation.mailgun.com/docs/mailgun/api-reference/send/mailgun/domains/get-v4-domains
- documentation.mailgun.com/docs/mailgun/mcp
- documentation.mailgun.com/docs/mailgun/sdk/nodejs_sdk
- www.mailgun.com/legal/terms
- documentation.mailgun.com/llms.txt