communication
Mailgun CLI for CI
Use the Mailgun CLI for CI with headless JSON commands, schema discovery, credentials, and permission controls.
7 functions 6 read 1 write API key auth
Mailgun CLI for CI
Run integration calls from CI jobs with JSON output, explicit credentials, and predictable exit status.
Use this shape when a pipeline needs to read or update an external service. The Mailgun CLI uses the same integration registry as the TUI, Lua runtime, and MCP gateway, but returns predictable command output for automation.
Command Shape
# Mailgun CLI for CI
kosmokrator integrations:configure mailgun --set api_key="$MAILGUN_API_KEY" --set domain="$MAILGUN_DOMAIN" --enable --read allow --write ask --json
kosmo integrations:call mailgun.mailgun_get_current_user '{}' --json Discovery Before Execution
Agents and scripts can inspect Mailgun docs and schemas before choosing a function.
kosmo integrations:docs mailgun --json
kosmo integrations:docs mailgun.mailgun_get_current_user --json
kosmo integrations:schema mailgun.mailgun_get_current_user --json
kosmo integrations:search "Mailgun" --json
kosmo integrations:list --json Useful Mailgun CLI Functions
| Function | Type | Parameters | Description |
|---|---|---|---|
mailgun.mailgun_get_current_user | Read | none | Verify the Mailgun API connection and retrieve basic account info by listing domains. |
mailgun.mailgun_get_domain | Read | domain | Get details and DNS records for a specific Mailgun domain. |
mailgun.mailgun_list_domains | Read | limit, skip | List all domains in your Mailgun account with optional pagination. |
mailgun.mailgun_list_messages | Read | limit, page, event, begin, end, ascending, recipient, subject | List message events in your Mailgun domain with optional filtering and pagination. |
mailgun.mailgun_list_routes | Read | limit, skip | List all routes in your Mailgun account with optional pagination. |
mailgun.mailgun_list_webhooks | Read | domain | List all webhooks configured for a Mailgun domain. |
mailgun.mailgun_send_email | Write | from, to, subject, text, html, cc, bcc, tag, reply_to | Send an email via Mailgun. Specify from, to, subject, and text or HTML content. |
Automation Notes
- Use
--jsonfor machine-readable output. - Keep credentials out of argv by using environment variables or stored KosmoKrator configuration.
- Configure read/write policy before unattended runs; use
--forceonly for trusted automation. - Use the MCP gateway instead when the agent needs dynamic tool discovery inside a conversation.