communication
Mailgun MCP, CLI, and Lua Integration for AI Agents
Mailgun integration docs for AI agents: MCP gateway setup, Mailgun CLI commands, Lua API reference, credentials, and function schemas.
7 functions 6 read 1 write API key auth
Mailgun for agents
Credentials can be configured manually in web or CLI hosts.
Use this integration from Lua code mode, the headless integrations CLI, or the KosmoKrator MCP gateway. The same package metadata powers all three surfaces.
Machine-Readable Metadata
- integration_slug
mailgun- route_slug
mailgun- package
mailgun- auth_strategy
api_keyAPI key- cli_setup_supported
true- cli_runtime_supported
true- mcp_gateway_supported
true- lua_supported
true- supports_multi_account
true
Quick Links
Lua APIAgent-facing namespace and function reference. Mailgun CLIHeadless setup and direct function calls. Mailgun MCPMCP gateway setup for external clients. Submit feedbackReport missing tools, auth problems, wrong docs, or runtime issues. ContributeAdd tools or improve metadata in the integrations repo.
Mailgun MCP Client Matrix
Use these pages when a specific agent client or framework needs copy-pasteable MCP setup for Mailgun.
Claude Code Mailgun MCP setup for Claude Code. Cursor Mailgun MCP setup for Cursor. Codex Mailgun MCP setup for Codex. OpenAI Agents Mailgun MCP setup for OpenAI Agents SDK. Claude Agent SDK Mailgun MCP setup for Claude Agent SDK. Vercel AI SDK Mailgun MCP setup for Vercel AI SDK. LangChain Mailgun MCP setup for LangChain. LangGraph Mailgun MCP setup for LangGraph. CrewAI Mailgun MCP setup for CrewAI. MCP clients Mailgun MCP setup for Generic MCP Clients.
Mailgun CLI Matrix
Use these pages for direct Mailgun CLI workflows in scripts, CI, cron, and agent wrappers.
CI Mailgun CLI for CI. Cron Jobs Mailgun CLI for cron jobs. Shell Scripts Mailgun CLI for shell scripts. Headless Automation Mailgun CLI for headless automation. Coding Agents Mailgun CLI for coding agents.
Function Catalog
| Function | Type | Parameters | Description |
|---|---|---|---|
mailgun.mailgun_get_current_user | Read read | 0 | Verify the Mailgun API connection and retrieve basic account info by listing domains. |
mailgun.mailgun_get_domain | Read read | 1 | Get details and DNS records for a specific Mailgun domain. |
mailgun.mailgun_list_domains | Read read | 2 | List all domains in your Mailgun account with optional pagination. |
mailgun.mailgun_list_messages | Read read | 8 | List message events in your Mailgun domain with optional filtering and pagination. |
mailgun.mailgun_list_routes | Read read | 2 | List all routes in your Mailgun account with optional pagination. |
mailgun.mailgun_list_webhooks | Read read | 1 | List all webhooks configured for a Mailgun domain. |
mailgun.mailgun_send_email | Write write | 9 | Send an email via Mailgun. Specify from, to, subject, and text or HTML content. |