Mailgun MCP Server
for AI Agents
Connect your AI agent to StackOne's Mailgun MCP server and give it 89 MCP tools out of the box. Auth, tool execution, and security all managed.
Coverage
89 Agent Actions
Create, read, update, and delete across Mailgun — and extend your agent's capabilities with custom actions.
Authentication
Agent Tool Authentication
Per-user OAuth in one call. Your Mailgun MCP server gets session-scoped tokens with zero credentials stored on your infra.
Agent Auth →Security
Agent Protection
Every Mailgun tool response scanned for prompt injection in milliseconds — 88.7% accuracy, all running on CPU.
Prompt Injection Defense →Performance
Max Agent Context. Min Cost.
Free up to 96% of your agent's context window to enhance reasoning and reduce cost, on every Mailgun call.
Tools Discovery →What is the Mailgun MCP Server?
A Mailgun MCP server lets AI agents read and write Mailgun data through the Model Context Protocol — Anthropic's open standard for connecting LLMs to external tools. StackOne's Mailgun MCP server ships with 89 pre-built actions, fully extensible via the Connector Builder — plus managed authentication, prompt injection defense, observability, and agent execution runtime. Connect it from MCP clients like Claude Desktop, Claude Code, Cursor, Goose, and VS Code, or from agent frameworks like OpenAI Agents SDK, LangChain, and Vercel AI SDK.
All Mailgun MCP Tools
Every action from Mailgun's API, ready for your agent. Create, read, update, and delete — scoped to exactly what you need.
Tags
- Get Tag
Retrieve an analytics tag by name and optionally update its description.
- Update Tag
Update the description of an existing analytics tag.
- Delete Tag
Delete an analytics tag from the account.
SMTP Credentials
- Create SMTP Credential
Create a new SMTP login credential for a domain.
- List SMTP Credentials
List all SMTP credentials configured for a domain.
- Update SMTP Credential
Update the password for an existing SMTP credential.
- Delete SMTP Credential
Permanently delete an SMTP credential from a domain.
Domains
- Create Domain
Add a new sending domain to the Mailgun account.
- List Domains
List all domains associated with the Mailgun account.
- Get Domain
Retrieve details and DNS verification status for a specific domain.
- Update Domain
Update configuration settings for an existing domain.
- Delete Domain
Permanently delete a domain from the Mailgun account.
IPs
- List IPs
List all IP addresses allocated to the Mailgun account.
- Get IP
Retrieve details for a specific IP address allocated to the account.
IP Pools
- Create IP Pool
Create a new IP pool to group dedicated IPs for a sending stream.
- List IP Pools
List all IP pools configured on the Mailgun account.
- Get IP Pool
Retrieve details of a specific IP pool.
Mailing Lists
- Create Mailing List
Create a new mailing list for bulk email distribution.
- List Mailing Lists
List all mailing lists associated with the Mailgun account.
- Get Mailing List
Retrieve details of a specific mailing list by its email address.
- Update Mailing List
Update the settings of an existing mailing list.
- Delete Mailing List
Permanently delete a mailing list and all its members.
Mailing List Members
- Create Mailing List Member
Add a new member to a mailing list.
- List Mailing List Members
List all members of a specific mailing list.
- Get Mailing List Member
Retrieve the details of a specific mailing list member.
- Update Mailing List Member
Update the details or subscription status of an existing mailing list member.
- Delete Mailing List Member
Remove a member from a mailing list.
Routes
- Create Route
Create a new inbound email routing rule.
- List Routes
List all inbound email routing rules configured on the account.
- Get Route
Retrieve the details of a specific inbound routing rule.
- Update Route
Update an existing inbound email routing rule.
- Delete Route
Permanently delete an inbound email routing rule.
Subaccounts
- Create Subaccount
Create a new subaccount under the parent Mailgun account.
- List Subaccounts
List all subaccounts under the parent Mailgun account.
- Get Subaccount
Retrieve details of a specific subaccount.
- Delete Subaccount
Permanently delete a subaccount from the parent Mailgun account.
Bounces
- Create Bounce
Manually add an email address to the bounce suppression list for a domain.
- List Bounces
List all bounce records for a domain's suppression list.
- Get Bounce
Retrieve the bounce record for a specific email address.
- Delete Bounce
Remove a specific email address from the bounce suppression list.
- Delete Bounces
Clear all bounce records from a domain's suppression list.
Complaints
- Create Complaint
Manually add an email address to the spam complaint suppression list.
- List Complaints
List all spam complaint records for a domain's suppression list.
- Get Complaint
Retrieve the spam complaint record for a specific email address.
- Delete Complaint
Remove a specific email address from the spam complaint suppression list.
- Delete Complaints
Clear all spam complaint records from a domain's suppression list.
Unsubscribes
- Create Unsubscribe
Manually add an email address to the unsubscribe suppression list.
- List Unsubscribes
List all unsubscribe records for a domain's suppression list.
- Get Unsubscribe
Retrieve the unsubscribe record for a specific email address.
- Delete Unsubscribe
Remove a specific email address from the unsubscribe suppression list.
- Delete Unsubscribes
Clear all unsubscribe records from a domain's suppression list.
Allowlist Entrys
- Create Allowlist Entry
Add an email address or domain to the bounce allowlist.
- Get Allowlist Entry
Retrieve a specific entry from the bounce allowlist.
- Delete Allowlist Entry
Remove a specific entry from the bounce allowlist.
Account Templates
- Create Account Template
Create a new email template at the account level.
- Copy Account Template
Copy one or more account-level templates to a destination domain.
- List Account Templates
List all email templates stored at the account level.
- Get Account Template
Retrieve details of a specific account-level template.
- Update Account Template
Update the metadata of an existing account-level template.
- Delete Account Template
Permanently delete an account-level template and all its versions.
Account Template Versions
- Create Account Template Version
Add a new version to an existing account-level template.
- List Account Template Versions
List all versions of a specific account-level template.
- Get Account Template Version
Retrieve a specific version of an account-level template.
- Update Account Template Version
Update the content or status of a specific account template version.
- Delete Account Template Version
Delete a specific version of an account-level template.
Users
- List Users
List all users associated with the Mailgun account.
- Get User
Retrieve the profile of a specific user by their user ID.
Webhooks
- Create Webhook
Register a new webhook endpoint to receive Mailgun event notifications.
- List Webhooks
List all webhooks configured on the Mailgun account.
- Delete Webhook
Remove a webhook endpoint from the Mailgun account.
Other (19)
- Send Email
Send an email message via Mailgun for the specified domain.
- Send Email (MIME)
Send an email in raw MIME format via Mailgun for the specified domain.
- List Sending Metrics
Query detailed email sending and engagement analytics metrics.
- List Usage Metrics
Query usage metrics for Mailgun services such as email validation and previews.
- List Email Logs
Query detailed email event logs for a time range with filtering support.
- List Email Events
Retrieve a log of email events for a domain within a time period.
- Get Domain Tracking Settings
Retrieve the click, open, and unsubscribe tracking settings for a domain.
- List Sending Queues
Retrieve the current state of the sending queues for a domain.
- List Allowlist
List all entries in the bounce allowlist for a domain.
- List Domain Templates
List all email templates stored at the domain level (v3 API).
- Get Current User
Retrieve the profile of the currently authenticated user.
- Update Click Tracking
Enable or disable click tracking for links in emails sent from a domain.
- Update Open Tracking
Enable or disable open tracking for emails sent from a domain.
- Update Unsubscribe Tracking
Enable or disable unsubscribe tracking and footer injection for a domain.
- Verify Domain
Trigger DNS verification for a domain to confirm DNS records are correctly configured.
- Match Route
Test which routes match a given recipient email address without sending an email.
- Enable Subaccount
Re-enable a previously disabled subaccount.
- Disable Subaccount
Disable a subaccount to suspend its ability to send email.
- Rename Account Template
Rename an existing account-level template.
Set Up Your Mailgun MCP Server in Minutes
One endpoint. Any framework. Your agent is talking to Mailgun in under 10 lines of code.
Agent Frameworks
{
"mcpServers": {
"stackone": {
"command": "npx",
"args": [
"-y",
"mcp-remote@latest",
"https://api.stackone.com/mcp?x-account-id=<account_id>",
"--header",
"Authorization: Basic <YOUR_BASE64_TOKEN>"
]
}
}
}Platform Resources
MCP Code Mode: Keeping Tool Responses Out of Agent Context
Anthropic's code_execution processes data already in context. Custom MCP code mode keeps raw tool responses in a sandbox. 14K tokens vs 500.
11 min
Comparing BM25, TF-IDF, and Hybrid Search for MCP Tool Discovery
Benchmarking BM25, TF-IDF, and hybrid search for MCP tool discovery across 916 tools. The 80/20 TF-IDF/BM25 hybrid hits 21% Top-1 accuracy in under 1ms.
10 min
Indirect Prompt Injection Defense for MCP Tools: A Technical Guide
MCP tools that read emails, CRM records, and tickets are indirect prompt injection vectors. Here's how we built a two-tier defense that scans tool results in ~11ms.
12 min
MCP vs A2A: Architecture, Security, and When to Use Each
MCP vs A2A: what each protocol standardizes, how they differ, their shared security risks including indirect prompt injection, and when to use one, both, or a hybrid architecture.
12 min
MCP vs API: What 200+ Connector Builds Taught Us
MCP wraps APIs, it doesn't replace them. After building 200+ connectors that serve both, here's when each approach wins.
14 min read
Mailgun MCP Server FAQ
Does StackOne have a Mailgun MCP server?
Mailgun MCP server vs direct API integration — what's the difference?
How does Mailgun authentication work for AI agents?
origin_owner_id.Are Mailgun MCP tools vulnerable to prompt injection?
What is the context bloat of a Mailgun agent and how do I avoid it?
Can I limit which actions my Mailgun agent can access?
Can I create custom agent actions for my Mailgun MCP server?
When should I NOT use a Mailgun MCP server?
What AI frameworks and AI clients does the StackOne Mailgun MCP server support?
Put your AI agents to work
All the tools you need to build and scale AI agent integrations, with best-in-class connectivity, execution, and security.