Mailgun

Live

API KEY

EMAIL

Communication

Mailgun gives your agent authenticated access to email sending, routing, and deliverability data, with every send attributed to a real user.

  • Per-user credentials: each call uses the actual user's token, never a shared bot.
  • Encrypted per-tenant vault: AES-256, resolved at request time, never in LLM context.
  • Scoped before every call: pre-call scope check, 90-day SIEM-exportable audit chain.
Mailgun
agent · Acme Q3
Run
What is bouncing on the marketing domain?
S
mailgun_domain_stats_get
98ms
Email agent
2.4% bounce rate on mg.example.com, up from 0.6%. 88% of bounces trace to one imported list.
Sources: 1 domain, last 7 days
mailgun
2.4% bounce
18:29
Message Claude...

Tools your agent reaches for on Mailgun, scoped per user.

CALL ANY TOOL
Send email, manage domains and routes, and read deliverability stats and suppressions with the signed-in user's own Mailgun access.
mailgun_account_add_sandbox_recipient
Account add sandbox recipient
Add an authorized email recipient for your Mailgun sandbox domain. Sandbox domains can only send to explicitly authorized recipients (max 5), and the recipient must accept an invite email before they can receive test messages. Returns a 'Only 5 sandbox recipients are allowed' error if the limit has been reached.
Parameters
Name
Type
Required
Description
email
string
Required
The email address of the new authorized sandbox recipient, e.g. alice@example.com.
mailgun_account_get_signing_key
Account get signing key
mailgun_account_ip_allowlist_create
Create account ip allowlist
mailgun_account_ip_allowlist_delete
Delete account ip allowlist
mailgun_account_ip_allowlist_list
List account ip allowlist
mailgun_account_ip_allowlist_update
Update account ip allowlist
mailgun_account_limits_enable
Enable account limits
mailgun_account_remove_sandbox_recipient
Account remove sandbox recipient
mailgun_account_tags_search
Search account tags
mailgun_alerts_revoke_slack_oauth
Alerts revoke slack oauth
mailgun_alerts_update_alert
Alerts update alert
mailgun_api_keys_delete
Delete api keys
mailgun_bounce_classification_list_rule_stats
Bounce classification list rule stats
mailgun_bounce_classification_query_stats_v2
Bounce classification query stats v2
mailgun_complaints_create
Create complaints
mailgun_domain_keys_activate_key
Domain keys activate key
mailgun_domain_templates_get_version
Domain templates get version
mailgun_domain_tracking_update_unsubscribe_tracking
Domain tracking update unsubscribe tracking
mailgun_dynamic_ip_pools_enroll_all_domains
Dynamic ip pools enroll all domains
mailgun_dynamic_ip_pools_list_pools
Dynamic ip pools list pools
mailgun_ip_warmup_cancel_warmup_plan
Ip warmup cancel warmup plan
mailgun_ip_warmup_create_warmup_plan
Ip warmup create warmup plan
mailgun_ips_get_spillover_settings
Ips get spillover settings
mailgun_ips_set_ip_band
Ips set ip band
mailgun_ips_update_subaccount_assignments
Ips update subaccount assignments
mailgun_limits_delete
Delete limits
mailgun_messages_resend_stored_message
Messages resend stored message
mailgun_messages_send
Send messages
mailgun_routes_list
List routes
mailgun_stats_get_filtered_totals
Stats get filtered totals

For more tools, view docs.

Build your Agent
Same auth pattern across LangChain, OpenAI, Anthropic, and Google ADK.
Python · LlamaIndex
import { ScalekitClient } from "@scalekit-sdk/node";
import { createReactAgent } from "@langchain/langgraph/prebuilt";

const sk = new ScalekitClient(env.SCALEKIT_ENV_URL, env.SCALEKIT_CLIENT_ID, env.SCALEKIT_CLIENT_SECRET);

// Mailgun tools scoped to this user
const { tools } = await sk.tools.listScopedTools("user_123", {
  filter: { connectionNames: ["mailgun"], toolNames: [
    "mailgun_account_add_sandbox_recipient",
    "mailgun_account_get_signing_key",
    "mailgun_account_ip_allowlist_create"] },
  pageSize: 100,
});

const agent = createReactAgent({ llm, tools });
await agent.invoke({ messages: [{ role: "user", content: "Is the Salesforce sync healthy?" }] });
import OpenAI from "openai";
import { ScalekitClient } from "@scalekit-sdk/node";

const sk = new ScalekitClient(env.SCALEKIT_ENV_URL, env.SCALEKIT_CLIENT_ID, env.SCALEKIT_CLIENT_SECRET);
const openai = new OpenAI();

const { tools } = await sk.tools.listScopedTools("user_123", {
  filter: { connectionNames: ["mailgun"] }, pageSize: 100,
});

const res = await openai.chat.completions.create({
  model: "gpt-5",
  messages: [{ role: "user", content: "Which data sources are connected?" }],
  tools,
});

// Execute the tool call with the user's vaulted Mailgun credential
await sk.tools.executeTool(res.choices[0].message.tool_calls[0], "user_123");
import Anthropic from "@anthropic-ai/sdk";
import { ScalekitClient } from "@scalekit-sdk/node";

const sk = new ScalekitClient(env.SCALEKIT_ENV_URL, env.SCALEKIT_CLIENT_ID, env.SCALEKIT_CLIENT_SECRET);
const anthropic = new Anthropic();

const { tools } = await sk.tools.listScopedTools("user_123", {
  filter: { connectionNames: ["mailgun"] }, pageSize: 100,
});

const msg = await anthropic.messages.create({
  model: "claude-sonnet-5",
  max_tokens: 1024,
  messages: [{ role: "user", content: "Pull open Zendesk tickets created this week." }],
  tools,
});

// Tool call runs with the user's vaulted Mailgun credential
await sk.tools.executeTool(msg.content, "user_123");
import { Agent } from "@google/adk/agents";
import { ScalekitClient } from "@scalekit-sdk/node";

const sk = new ScalekitClient(env.SCALEKIT_ENV_URL, env.SCALEKIT_CLIENT_ID, env.SCALEKIT_CLIENT_SECRET);

const { tools } = await sk.tools.listScopedTools("user_123", {
  filter: { connectionNames: ["mailgun"] }, pageSize: 100,
});

const agent = new Agent({
  name: "mailgun_agent",
  model: "gemini-2.5-pro",
  instruction: "Work with Mailgun for the signed-in user.",
  tools,
});

await agent.run("What auth does the Shopify connector need?");
Try these prompts
Paste any prompt into your agent to get started.
Deliverability
Copy the prompt
Copied
What is bouncing on our marketing domain?
Copy the prompt
Copied
Show me the complaints from the last 30 days.
Copy the prompt
Copied
List the suppressions on this domain.
Domains
Copy the prompt
Copied
List our sending domains and their verification state.
Copy the prompt
Copied
Show me the DNS records still pending for this domain.
Copy the prompt
Copied
Get the signing key for this account.
Routing
Copy the prompt
Copied
List the inbound routes configured.
Copy the prompt
Copied
Create a route that forwards support mail to our helpdesk.
Copy the prompt
Copied
Show me the mailing lists and their members.
SEE HOW AUTH WORKS
Your users connect Mailgun once. Their credentials stay vaulted, every call is scope checked, and every send is logged.
1
Authorize
Your user connects
Mailgun
once. We tie it to their identity and the meetings they approved — no shared bot account, no org-wide access
Who:
user ‘A’
when:
Once per user
access:
Limited to user
2
Store
Their
Mailgun
token lives in a vault scoped to them. User A's meetings are never reachable by an agent acting for user B, even on the same connection
vault:
encrypted
scope:
per-user
tokens:
auto-refreshed
3
Resolve
When your agent calls a
Mailgun
tool, we fetch the right token server-side. It never touches your agent, never appears in the LLM context, never shows up in your logs
speed:
~40ms
check:
before every call
seen by:
nobody
4
Audit
Every
Mailgun
tool call is logged — who triggered it, which meeting was fetched, what came back. 90 days of history, tied to the user who authorized it
history:
90 days
export:
SIEM-ready
logged:
every call
Test other agents
See the same per-user auth pattern across other connectors.
Support and Ops Teams
Email-to-calendar agent
Reads scheduling intent out of Gmail threads, resolves the times everyone actually has free, and creates the event on the user's own Google Calendar. No shared service account.
GTM and RevOps Teams
Outbound prospecting agent
Searches Apollo for prospects matching your ICP, scores and ranks them, drafts personalized outreach in Gmail, and logs every send to Google Sheets. Mail goes out as the rep, not from a shared inbox.
Engineering Teams
DevOps assistant agent
Polls GitHub for failing checks and stale PRs, opens Linear issues for the ones that need work, and posts a daily digest to Slack. It acts as the engineer, not a shared service account.
Engineering Teams
Slack triage
Polls Slack for new messages, classifies bugs and support requests with a LangGraph router, files GitHub issues or Zendesk tickets, and confirms in the thread.
Test other agents
See the same per-user auth pattern across other connectors.
OPS
Email-to-calendar scheduling agent
Read scheduling intent out of Gmail threads, resolve mutual free time, and create the Google Calendar event.
SALES
Outbound prospecting agent
Search Apollo for ICP matches, rank them, draft personalised Gmail outreach, and log every send to Google Sheets.
ENGINEERING
DevOps assistant agent
Poll GitHub for failing checks and stale pull requests, open Linear issues for the ones that need work, and digest to Slack.
ENGINEERING
Slack triage agent
Classify new Slack messages as bugs or support requests, file the GitHub issue or Zendesk ticket, and reply in the thread.
Why Scalekit
Secure your agent's access. Connectors ship in minutes
01.
Shared tokens break per-user analytics
A shared Mailgun token looks fine in a demo. In production every action looks like one service account, and you cannot tell who wired a source or ran a query. Scalekit resolves the credential of the actual user who triggered the agent, never a shared bot.
// shared token
audit → bot_service_account

// scalekit
audit → user_abc ✓
02.
Authentication is not authorization
03.
Multi-tenancy is architectural
04.
Mailgun today. Ten connectors tomorrow.
“Our agents act across Salesforce, Gong, Google Drive, and more, on behalf of every customer. Scalekit behind the scenes meant we can keep adding tools without ever rebuilding how credentials or tool calling work.”
Venu Madhav Kattagoni
Head of Engineering / Von
FAQs
Frequently Asked Questions
Can I keep the agent out of domain configuration?
Yes. Scope the connection to the sending and stats tools. Domain and route tools stay unavailable, enforced before the API call.
How many Mailgun tools are available?
259 across sending, domains, routes, mailing lists, suppressions, IP pools, and stats. The page shows a representative 30; the docs list all of them.
Who appears in the audit trail?
The user who triggered the agent, because Scalekit resolves their credential rather than a shared account key.
Does this cover inbound routing?
Yes. Route create, list, update, and delete are exposed, subject to the scope you grant.
How is the API key stored?
Encrypted per tenant with AES-256, resolved at request time, never in LLM context.
Start in your coding agent
Up and running in one command
Install the Scalekit skill in your editor of choice. Connector, auth, tools, prompt, all wired up
Claude Code REPL
/plugin marketplace add scalekit-inc/claude-code-authstack
/plugin install agentkit@scalekit-auth-stack
Cursor Code REPL
# ~/.cursor/mcp.json
{
""mcpServers"": {
""mailgun"": {
""url"": ""https://mcp.scalekit.com/mailgun"",
""headers"": { ""Authorization"": ""Bearer $SCALEKIT_TOKEN"" }
}
}
}
Codex Code REPL
# ~/.codex/config.toml
[mcp_servers.mailgun]
url = ""https://mcp.scalekit.com/mailgun""
auth_env = ""SCALEKIT_TOKEN""
Copilot Code REPL
# .vscode/mcp.json
{
""servers"": {
""mailgun"": {
""url"": ""https://mcp.scalekit.com/mailgun"",
""type"": ""http""
}
}
}