Integration

Mailgun integration

Powerful email sending API for transactional and marketing emails. Send, receive, and track emails at scale with high deliverability. Features include email validation, templates, analytics, and routing. Perfect for transactional notifications, marketing campaigns, and email automation. NOTE: Mailgun is region-scoped - US domains use base URL https://api.mailgun.net (default), EU domains use https://api.eu.mailgun.net. Use the host that matches the region your domain was created in.

Ask it in chat

Say what should happen.
The workflow builds itself.

When this happens, do that in Mailgun.Built from the 22 Mailgun tools below, on the connection you add once.

Common Mailgun use cases

  • List management
  • Compliance
  • List hygiene
  • Template management
  • Deliverability
  • DNS setup
  • Domain setup
  • Domain cleanup
  • Manual opt-out
  • Email migration

What you can do with Mailgun

Each of these is one operation on one endpoint, available both as a workflow step and as a tool an AI agent can call on its own. Nothing bundles several operations into one action, so what a run did stays readable afterwards.

Most endpoints run on the free plan. A few, mainly the ones that publish on your behalf, need a paid plan.

Domain, 5 operations

  • create_domainCreate domainPOSTCreates a new sending domain in Mailgun.
  • delete_domainDelete domainDELETERemoves a sending domain from Mailgun.
  • get_domainGet domainGETRetrieves configuration details for a specific domain.
  • get_domainsGet domainsGETRetrieves all sending domains in your account.
  • verify_domainVerify domainPUTTriggers DNS verification for a domain.

Template, 4 operations

  • create_templateCreate templatePOSTCreates a reusable email template.
  • delete_templateDelete templateDELETEDeletes an email template.
  • get_templateGet templateGETRetrieves a specific email template.
  • get_templatesGet templatesGETRetrieves all email templates for a domain.

Bounce, 2 operations

  • delete_bounceDelete bounceDELETERemoves an email address from the bounce list.
  • get_bouncesGet bouncesGETRetrieves the list of bounced email addresses.

Message, 2 operations

  • send_messageSend messagePOSTSends an email message through Mailgun's API.
  • send_mimeSend mimePOSTSends a raw MIME-formatted email message.

Route, 2 operations

  • create_routeCreate routePOSTCreates a rule for handling incoming emails.
  • get_routesGet routesGETRetrieves all configured email routes.

Unsubscribe, 2 operations

  • add_unsubscribeAdd unsubscribePOSTAdds an email address to the unsubscribe list.
  • get_unsubscribesGet unsubscribesGETRetrieves the list of unsubscribed email addresses.

Complaint, 1 operation

  • get_complaintsGet complaintsGETRetrieves spam complaints for a domain.

Event, 1 operation

  • get_eventsGet eventsGETRetrieves email event logs for tracking and analytics.

Statistic, 1 operation

  • get_statsGet statsGETRetrieves aggregated email statistics.

Stored message, 1 operation

  • get_stored_messageGet stored messageGETRetrieves a single stored message by its storage key.

Validation, 1 operation

  • validate_emailValidate emailGETValidates an email address for deliverability.

Use Mailgun from Claude Code, Cursor or Codex

Connect Mailgun in LiveContext, create an API key in Settings, then add the LiveContext MCP server to your client. Its Mailgun operations become tools the client can call, next to every other integration you connected.

Claude Code
claude mcp add --transport http livecontext https://livecontext.ai/mcp --header "X-API-Key: YOUR_API_KEY"
Codex (~/.codex/config.toml)
[mcp_servers.livecontext]
url = "https://livecontext.ai/mcp"

[mcp_servers.livecontext.http_headers]
"X-API-Key" = "YOUR_API_KEY"
Cursor, Claude Desktop and other JSON configs
{
  "mcpServers": {
    "livecontext": {
      "type": "http",
      "url": "https://livecontext.ai/mcp",
      "headers": {
        "X-API-Key": "YOUR_API_KEY"
      }
    }
  }
}

Set up the MCP server step by step

How to connect Mailgun

  1. Create your workspace

    Sign up free. Nothing to install.

  2. Connect Mailgun once

    Add your Mailgun connection in Settings. Every tool from this integration reuses it, and secrets are encrypted at rest and visible only to you.

  3. Describe the job in chat

    The workflow builds itself in front of you and picks the endpoints it needs. Drag the steps yourself on the canvas whenever you would rather be explicit.

Mailgun integration FAQ

What can you do with the Mailgun integration?

LiveContext exposes 22 operations on Mailgun, covering domain, template, bounce and message. Common uses include List management, Compliance and List hygiene.

Popular integrations

Browse the whole catalog