Connect Mailgun to AI agents

Connect Mailgun to Claude, Codex, Cursor, or other AI agents for your entire team. Metorial security, governance, observability, and gives your team a unified Magic MCP url to connect.

Supported Tools

add_suppression

Add Suppression

Add an email address to a suppression list (bounce, complaint, or unsubscribe). Once suppressed, Mailgun will stop delivering emails to that address for the specified domain.

get_events

Get Events

Query Mailgun's legacy Events API for a domain. Returns delivery, open, click, bounce, complaint, and other email events. Filter by event type, recipient, sender, subject, date range, and more. Prefer the Query Logs tool for current delivery/debug logging unless you specifically need the legacy Events API.

update_mailing_list

Update Mailing List

Update an existing mailing list's properties including name, description, access level, and reply preference.

delete_domain

Delete Domain

Delete a sending domain from Mailgun. This permanently removes the domain and all associated data.

list_mailing_lists

List Mailing Lists

List all mailing lists in the account. Returns list addresses, names, member counts, and access levels.

list_mailing_list_members

List Mailing List Members

List members of a mailing list. Can filter by subscription status.

verify_domain

Verify Domain

Trigger DNS verification for a domain. Run this after configuring DNS records to verify SPF, DKIM, and MX settings. Returns the current verification status of each DNS record.

get_template

Get Template

Get a specific email template with its active version content. Use to review template content and configuration before sending.

create_webhook

Create Webhook

Create a webhook for a specific event type on a domain. Mailgun will POST event data to the specified URL when events of the given type occur.

update_domain_tracking

Update Domain Tracking

Update tracking settings for a domain. Configure open tracking, click tracking, or unsubscribe tracking individually.

create_domain

Create Domain

Create a new sending domain in Mailgun. Returns the domain details and DNS records that need to be configured. After creation, set up the returned DNS records and use the verify domain tool to complete setup.

remove_mailing_list_member

Remove Mailing List Member

Remove a member from a mailing list.

create_mailing_list

Create Mailing List

Create a new mailing list. Mailing lists can be used as recipients when sending messages. Members can be added after creation.

list_suppressions

List Suppressions

List suppressed email addresses for a domain. Retrieves bounces, complaints, or unsubscribes depending on the type selected. Suppressed addresses are blocked from receiving further emails to protect sending reputation.

add_mailing_list_member

Add Mailing List Member

Add a new member to a mailing list or update an existing member using the upsert option.

validate_email

Validate Email

Validate an email address in real-time using Mailgun's Email Validation API. Checks if the address is deliverable, identifies disposable and role-based addresses, and provides a risk assessment.

get_stats

Get Stats

Get email sending statistics from Mailgun's legacy Stats API for a domain. Returns aggregate counts for events like accepted, delivered, failed, opened, clicked, unsubscribed, and complained over a time range. Prefer the Query Metrics tool for current analytics unless you specifically need the legacy Stats API.

create_template_version

Create Template Version

Create a new version of an existing template. Templates support versioning to allow content changes while preserving previous versions.

get_domain

Get Domain

Get detailed information about a specific domain including DNS records and verification status. Use to check if DNS is properly configured for sending.

list_webhooks

List Webhooks

List all configured webhooks for a domain. Shows which event types have webhook URLs configured.

list_templates

List Templates

List all email templates for a domain. Templates are reusable email content with variable substitution support.

delete_webhook

Delete Webhook

Delete a webhook for a specific event type on a domain.

remove_suppression

Remove Suppression

Remove an email address from a suppression list (bounce, complaint, or unsubscribe). This re-enables delivery to the address.

update_route

Update Route

Update an existing inbound email route's expression, actions, priority, or description.

list_domains

List Domains

List all sending domains in the Mailgun account. Returns domain names, states, and configuration. Use to discover available domains for sending or to check domain verification status.

send_email

Send Email

Send an email through Mailgun. Supports plain text, HTML, and template-based emails with personalization. Can send to up to 1,000 recipients per call with individual personalization via recipient variables. Supports scheduling, tracking options, tags for analytics, custom headers, and reply-to addresses.

delete_template

Delete Template

Delete an email template and all its versions permanently.

delete_mailing_list

Delete Mailing List

Delete a mailing list and all its members permanently.

create_route

Create Route

Create a new inbound email route. Routes match incoming emails using expressions and execute actions like forwarding to a URL or email, storing, or stopping. **Expression types:** - `match_recipient("[email protected]")` - match specific recipient - `match_header("subject", ".*support.*")` - match header with regex - `catch_all()` - match any unmatched message **Action types:** - `forward("http://myapp.com/incoming")` - forward to URL - `forward("[email protected]")` - forward to email - `store(notify="http://myapp.com/notify")` - store and optionally notify - `stop()` - stop further route processing

delete_route

Delete Route

Delete an inbound email route permanently.

create_template

Create Template

Create a new email template for a domain. Optionally include initial content which creates the first version automatically. Templates support Handlebars variable substitution with helpers like `if`, `unless`, `each`, and `with`.

list_routes

List Routes

List all inbound email routes. Routes define rules for handling incoming emails by matching recipient addresses or headers, then forwarding, storing, or stopping processing.

get_domain_tracking

Get Domain Tracking

Get the current tracking settings for a domain. Shows whether open tracking, click tracking, and unsubscribe tracking are enabled.

update_template

Update Template

Update a domain-level Mailgun template's metadata. Use template version tools to update content or active version.

get_stored_message

Get Stored Message

Retrieve a message stored by Mailgun from a storage key found in events, logs, or inbound route store actions. The stored message payload is returned as a JSON attachment, with metadata in the tool output.

delete_template_version

Delete Template Version

Delete a specific version from a Mailgun domain-level template.

add_allowlist_entry

Add Allowlist Entry

Add an email address or domain to Mailgun's allowlist for a domain. Allowlisted values are prevented from being added to the bounce suppression list.

update_template_version

Update Template Version

Update a domain-level Mailgun template version's content, comment, or active status.

remove_allowlist_entry

Remove Allowlist Entry

Remove an email address or domain from Mailgun's allowlist for a domain.

get_mailing_list

Get Mailing List

Get one Mailgun mailing list by address, including access level, reply preference, and member count.

list_template_versions

List Template Versions

List versions for a domain-level Mailgun template. Use before selecting, updating, activating, or deleting a specific version.

update_webhook

Update Webhook

Replace the webhook URL list for a Mailgun domain event type with a new URL.

list_allowlist

List Allowlist

List Mailgun allowlist entries for a domain. Allowlisted addresses or domains are protected from being added to bounce suppressions, which is useful for test and controlled-recipient workflows.

query_metrics

Query Metrics

Query Mailgun's current Metrics API for account or domain analytics. Use this for current reporting instead of the legacy Stats API when you need flexible dimensions, filters, rates, and aggregate metrics.

update_mailing_list_member

Update Mailing List Member

Update a Mailgun mailing list member's display name, custom variables, or subscription status.

get_template_version

Get Template Version

Get a specific version of a domain-level Mailgun template, including its content and active status.

get_webhook

Get Webhook

Get configured webhook URLs for one Mailgun domain event type.

get_mailing_list_member

Get Mailing List Member

Get a specific member from a Mailgun mailing list, including subscription status and custom variables.

query_logs

Query Logs

Query Mailgun's current Logs API for account event logs. Use this for current delivery/debug logging instead of the legacy Events API when you need pagination, totals, or richer log records.

More integrations teams use with Mailgun

Slack

Slack: connect with bot OAuth or user OAuth. Send, update, delete, and schedule messages; list and cancel scheduled messages; open DMs and group DMs; manage conversations, members, files, reactions, pins, bookmarks, reminders, user groups, and user status; search messages and files with user scopes; and retrieve user, conversation, and workspace info.

GitHub

Manage repositories, issues, and pull requests. Create and configure branches, star repositories, review code, and merge changes. Automate CI/CD workflows with GitHub Actions, manage workflow runs, secrets, and artifacts. Track issues with labels, milestones, and assignees. Search across code, repositories, issues, and users. Manage organizations, teams, and memberships. Create and manage projects, gists, packages, deployments, and environments. Access security alerts including code scanning, secret scanning, and Dependabot alerts. Read and write file contents in repositories. Manage webhooks, notifications, and codespaces.

Sharepoint

Manage SharePoint sites, document libraries, lists, and files. Create, read, update, and delete lists and list items with custom columns. Upload, download, move, copy, and version files in document libraries. Search across sites, files, folders, lists, and list items using Microsoft Search. Manage permissions at site, list, and item levels with granular access control. Define and manage content types and site columns. Subscribe to webhooks for list and library change notifications. Retrieve site properties and search for sites across Microsoft 365.

Hubspot

Create, read, update, and delete CRM objects including contacts, companies, deals, tickets, and custom objects. Manage associations between CRM records. Track engagements such as calls, emails, meetings, notes, and tasks. Send transactional and marketing emails, manage campaigns, and handle subscription preferences. Build and manage marketing workflows, sequences, and automation actions. Manage CMS content including blog posts, landing pages, and HubDB tables. Handle commerce data including products, orders, invoices, quotes, and payments. Create and manage contact lists for segmentation. Configure deal, ticket, and order pipelines with custom stages. Search and filter CRM records. Bulk import and export CRM data. Manage users, teams, and account settings. Subscribe to webhooks for real-time notifications on object creation, deletion, property changes, merges, and association changes.

Salesforce

Manage CRM data including Accounts, Contacts, Leads, Opportunities, Cases, and custom objects. Create, read, update, and delete records. Query data using SOQL and search across objects using SOSL. Perform bulk data operations for large-scale imports, exports, and migrations. Execute composite requests to batch multiple operations in a single API call. Access analytics, reports, and dashboards. Manage files and attachments associated with records. Interact with Chatter feeds, posts, and groups for social collaboration. Subscribe to real-time change events via Change Data Capture and Platform Events. Manage org metadata including custom objects, fields, layouts, and workflows. Query data using GraphQL for precise data retrieval across related objects.

Apolloio

Search and prospect B2B contacts and companies from a database of over 275 million people and 70 million organizations. Enrich people and company data with emails, phone numbers, and firmographic details. Create and manage contacts, accounts, deals, and tasks. Add contacts to email sequences and manage sequence statuses. Log and search call records. Perform bulk operations for contact creation, account creation, task creation, and data enrichment.

Technical notes for Mailgun

Send, receive, and track transactional and marketing emails via Mailgun. Manage sending domains, tracking settings, inbound routes, suppressions, allowlists, mailing lists, reusable templates, current logs and metrics, legacy events and stats, stored messages, validation, and domain webhook notifications.

Connect Mailgun to production AI agents

See how Metorial gives Mailgun access the governance, tracing, and security controls teams need.

Frequently asked questions

Common questions about connecting Mailgun to AI agents with Metorial.

  1. Can Metorial connect Mailgun to AI agents?
    Yes. Metorial connects AI agents to Mailgun through a governed integration layer, so teams can use the provider while keeping access controlled and observable.
  2. Metorial is MCP compatible and lets teams expose approved provider tools to MCP-capable agents and clients through a controlled access layer.
  3. Metorial applies policies across users, groups, providers, agents, and individual tools, then records the context around every agent interaction.
  4. Yes. Metorial records provider activity so teams can inspect tool calls, troubleshoot integrations, and give security teams the visibility they need.