Mailgun

Email API and SMTP relay for sending, receiving and tracking email.

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

  1. Sign up at https://signup.mailgun.com/new/signup.
  2. Activate the account by verifying your email address and a mobile phone number (SMS code).
  3. Create an API key at https://app.mailgun.com/settings/api_security.
  4. 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

Something out of date?