The Mailgun MCP Server is an implementation of the Model Context Protocol (MCP) designed to integrate Mailgun's email services with AI clients like Claude Desktop. This server enables seamless interaction between Claude and Mailgun, allowing users to send emails, fetch statistics, and more directly through AI prompts.
Before getting started, ensure you have the following:
shell
git clone https://github.com/mailgun/mailgun-mcp-server.git
cd mailgun-mcp-server
shell
npm install
Create or modify the config file:
~/Library/Application Support/Claude/claude_desktop_config.json
%APPDATA%/Claude/claude_desktop_config.json
Add the following configuration:
json
{
"mcpServers": {
"mailgun": {
"command": "node",
"args": ["CHANGE/THIS/PATH/TO/mailgun-mcp-server/src/mailgun-mcp.js"],
"env": {
"MAILGUN_API_KEY": "YOUR-mailgun-api-key"
}
}
}
}
Run the local test suite with:
NODE_ENV=test npm test
Note: Sending an email currently requires a paid account with Anthropic. Free accounts may result in silent failure.
Can you send an email to EMAIL_HERE with a funny email body that makes it sound like it's from the IT Desk from Office Space?
Please use the sending domain DOMAIN_HERE, and make the email from "postmaster@DOMAIN_HERE"!
Would you be able to make a chart with email delivery statistics for the past week?
The MCP server communicates over stdio. For detailed debugging, refer to the Debugging section of the Model Context Protocol documentation.
This project is licensed under the Apache-2.0 License. See the LICENSE file for details.
We welcome contributions! Feel free to submit a Pull Request.
The Mailgun MCP Server is an implementation of the Model Context Protocol server for Mailgun APIs. It bridges the gap between Mailgun's email services and AI clients like Claude Desktop, enabling powerful email automation and analytics through AI interactions.