Deploy MCP Server
Email API Key

Mailgun REST API

Powerful email API for developers

Mailgun is a transactional email API service built for developers. It provides powerful sending infrastructure, advanced analytics, and email validation to ensure reliable email delivery at scale. Developers use Mailgun for transactional emails, marketing campaigns, email validation, and comprehensive tracking of email performance.

Base URL https://api.mailgun.net/v3

API Endpoints

MethodEndpointDescription
POST/messagesSend an email message with HTML content, attachments, and custom headers
GET/eventsRetrieve email events including delivered, opened, clicked, bounced, and failed
POST/messages.mimeSend a MIME-formatted email message for full control over email structure
GET/domainsList all domains configured in your Mailgun account
POST/domainsAdd a new domain to your Mailgun account for sending emails
GET/domains/{domain}/credentialsGet SMTP credentials for a specific domain
POST/address/validateValidate email addresses to check syntax and deliverability
GET/stats/totalGet aggregate statistics for emails sent, delivered, opened, and clicked
POST/listsCreate a mailing list for managing email recipients
GET/lists/{list}/membersRetrieve all members of a specific mailing list
POST/lists/{list}/membersAdd a new member to a mailing list with optional custom variables
GET/bouncesRetrieve the list of bounced email addresses
DELETE/bounces/{address}Remove an email address from the bounce list
POST/routesCreate a route to forward or store incoming emails based on patterns
GET/webhooksList all configured webhooks for email event notifications

Code Examples

curl -s --user 'api:YOUR_API_KEY' \
  https://api.mailgun.net/v3/YOUR_DOMAIN/messages \
  -F from='Sender <sender@YOUR_DOMAIN>' \
  -F to='recipient@example.com' \
  -F subject='Hello from Mailgun' \
  -F text='This is a test email sent via Mailgun API' \
  -F html='<html><body><h1>Hello!</h1><p>This is a test email.</p></body></html>'

Connect Mailgun to AI

Deploy a Mailgun MCP server on IOX Cloud and connect it to Claude, ChatGPT, Cursor, or any AI client. Your AI assistant gets direct access to Mailgun through these tools:

send_email Send transactional emails with custom content, recipients, and attachments via Mailgun API
validate_email Validate email addresses for syntax and deliverability before sending messages
get_email_events Retrieve email delivery events including opens, clicks, bounces, and failures for tracking
manage_mailing_list Create and manage mailing lists, add/remove members, and retrieve subscriber information
check_email_stats Fetch aggregate email statistics including delivery rates, open rates, and click rates

Deploy in 60 seconds

Describe what you need, AI generates the code, and IOX deploys it globally.

Deploy Mailgun MCP Server →

Related APIs