Python SDK for Mailgun
Python SDK for Mailgun. Exposed over MCP by the mailgun mcp server, that capability becomes something an assistant can invoke while it works, not something you go and do afterwards.
Welcome to the official Python SDK for Mailgun!
The Mailgun API is part of the Sinch family and enables you to send, track, and receive email effortlessly.
The server ships on PyPI as locally, so your MCP client can launch it on demand — there is no separate build step. Add the server block to your client's configuration, restart it, and the tools register themselves.
Everything the assistant can do here goes through one of these:
Authentication — Authenticate your Client using a tuple of ("api", "YOUR_API_KEY"). Find your API key in the [Mailgun ControlAsyncClient — SDK provides native async version of the client to use in asynchronous applications. The AsyncClient offers the same functionality as the sync clientYou will need 8 environment variables: APIKEY, DOMAIN, MESSAGES_FROM, MESSAGES_TO, MESSAGES_CC, DOMAINS_DEDICATED_IP, MAILLIST_ADDRESS, VALIDATION_ADDRESS_1. The server will not start without them, which is usually why the tools fail to appear on a first run. Keep credentials in your client's env block or a secrets manager rather than in a file you might commit.
This sits in the developer tooling group, where several servers overlap in what they claim to do but differ sharply once you actually set them up. Mailgun's toolset — Authentication, AsyncClient — is a fair guide to whether it matches your workflow.
We check each listing at SyncDev against the project's documentation before it goes live — if something here drifts out of date, it is a bug worth reporting.
| Tool | What it does |
|---|---|
| Authentication | Authenticate your Client using a tuple of ("api", "YOUR_API_KEY"). Find your API key in the [Mailgun Control Panel](https://app.mailgun.com/settings/api_security). |
| AsyncClient | SDK provides native async version of the client to use in asynchronous applications. The AsyncClient offers the same functionality as the sync client but with non-blocking I/O, making it ideal for concurrent operations a |
{
"mcpServers": {
"mailgun-1": {
"command": "uvx",
"args": ["locally"],
"env": {
"APIKEY": "your-value",
"DOMAIN": "your-value",
"MESSAGES_FROM": "your-value",
"MESSAGES_TO": "your-value",
"MESSAGES_CC": "your-value",
"DOMAINS_DEDICATED_IP": "your-value",
"MAILLIST_ADDRESS": "your-value",
"VALIDATION_ADDRESS_1": "your-value"
}
}
}
}Add to claude_desktop_config.json, then restart Claude Desktop.
| Variable | Description | Required |
|---|---|---|
| APIKEY | Credential the server authenticates with. | Yes |
| DOMAIN | Configuration value read at startup. | Optional |
| MESSAGES_FROM | Configuration value read at startup. | Optional |
| MESSAGES_TO | Configuration value read at startup. | Optional |
| MESSAGES_CC | Configuration value read at startup. | Optional |
| DOMAINS_DEDICATED_IP | Configuration value read at startup. | Optional |
| MAILLIST_ADDRESS | Configuration value read at startup. | Optional |
| VALIDATION_ADDRESS_1 | Configuration value read at startup. | Optional |
Kill hallucinated APIs — version-accurate, up-to-date library documentation injected straight into context.
Microsoft's official browser automation server — drive a real browser through the accessibility tree, no screenshots needed.
GitHub's official server — repos, issues, pull requests, Actions and code security, straight from your assistant.
Issue tracking at the speed of conversation — Linear's official hosted server with OAuth and zero install.
Local repository surgery — status, diffs, commits, branches and history for any repo on disk.
Timezone sanity for AI — current time anywhere and correct conversions, without the model doing date math.