Official Mailgun MCP server for email
## Mailgun MCP Server: Email API Platform The **Mailgun MCP Server** integrates Mailgun's email delivery platform into Google Antigravity. This enables reliable transactional email delivery with powerful APIs for sending, tracking, and managing email at scale. ### Why Mailgun MCP? Mailgun excels at developer email: - **High Deliverability**: Industry-leading inbox rates - **Powerful APIs**: RESTful and SMTP access - **Email Validation**: Catch bad addresses - **Analytics**: Detailed delivery metrics - **Templates**: Flexible templating system ### Key Features #### 1. Send Email ```python import requests response = requests.post( "https://api.mailgun.net/v3/YOUR_DOMAIN/messages", auth=("api", "key-xxx"), data={ "from": "App <noreply@yourdomain.com>", "to": ["user@example.com"], "subject": "Welcome!", "html": "<h1>Welcome to our platform!</h1>" } ) ``` #### 2. Email Templates ```python # Create template requests.post( f"https://api.mailgun.net/v3/{domain}/templates", auth=("api", api_key), data={ "name": "welcome", "template": "<h1>Hello {{name}}</h1><p>Welcome to {{company}}!</p>" } ) # Send with template requests.post( f"https://api.mailgun.net/v3/{domain}/messages", auth=("api", api_key), data={ "from": "noreply@yourdomain.com", "to": "user@example.com", "template": "welcome", "h:X-Mailgun-Variables": json.dumps({"name": "John", "company": "Acme"}) } ) ``` #### 3. Email Validation ```python # Validate email address response = requests.get( "https://api.mailgun.net/v4/address/validate", auth=("api", api_key), params={"address": "user@example.com"} ) result = response.json() if result["result"] == "deliverable": print("Valid email!") ``` ### Configuration ```json { "mcpServers": { "mailgun": { "command": "npx", "args": ["-y", "@anthropic/mcp-mailgun"], "env": { "MAILGUN_API_KEY": "key-xxx", "MAILGUN_DOMAIN": "mg.yourdomain.com" } } } } ``` ### Use Cases **Transactional Email**: Password resets, receipts, notifications. **Email Validation**: Clean email lists before sending. **Bulk Sending**: Marketing campaigns at scale. The Mailgun MCP Server brings developer-friendly email to Antigravity.
{
"mcpServers": {
"mailgun": {
"mcpServers": {
"mailgun": {
"env": {
"MAILGUN_DOMAIN": "YOUR_DOMAIN",
"MAILGUN_API_KEY": "YOUR_MAILGUN_API_KEY"
},
"args": [
"-y",
"@mailgun/mcp-server"
],
"command": "npx"
}
}
}
}
}