Fire in da houseTop Tip:Paying $100+ per month for Perplexity, MidJourney, Runway, ChatGPT and other tools is crazy - get all your AI tools in one site starting at $15 per month with Galaxy AI Fire in da houseCheck it out free

mailgun-mcp-server

MCP.Pizza Chef: mailgun

The mailgun-mcp-server is a Model Context Protocol server implementation that exposes Mailgun's email service APIs to MCP-compatible AI clients like Claude Desktop. It allows real-time, structured interaction with Mailgun's email sending, receiving, and management features, enabling AI models to perform email-related workflows programmatically and securely. This server requires Node.js and a Mailgun account with API keys for setup.

Use This MCP server To

Send transactional emails via Mailgun through AI-driven workflows Retrieve and analyze email logs and delivery status in real time Automate email list management and segmentation using AI Enable AI clients to trigger email campaigns programmatically Integrate Mailgun email data into AI-powered customer support tools Monitor email bounce and complaint rates with AI notifications Generate email content drafts and send them via Mailgun APIs Sync Mailgun email events with AI-driven CRM systems

README

Mailgun MCP Server

MCP

Overview

A Model Context Protocol (MCP) server implementation for Mailgun, enabling MCP-compatible AI clients like Claude Desktop to interract with the service.

Prerequisites

  • Node.js (v18 or higher)
  • Git
  • Claude Desktop (for Claude integration)
  • Mailgun account and an API key

Quick Start

Manual Installation

  1. Clone the repository:

    git clone https://github.com/mailgun/mailgun-mcp-server.git
    cd mailgun-mcp-server
  2. Install dependencies and build:

    npm install
  3. Configure Claude Desktop:

    Create or modify the config file:

    • MacOS: ~/Library/Application Support/Claude/claude_desktop_config.json
    • Windows: %APPDATA%/Claude/claude_desktop_config.json

    Add the following configuration:

    {
        "mcpServers": {
            "mailgun": {
                "command": "node",
                "args": ["CHANGE/THIS/PATH/TO/mailgun-mcp-server/src/mailgun-mcp.js"],
                "env": {
                    "MAILGUN_API_KEY": "YOUR-mailgun-api-key"
                }
            }
        }
    }

Testing

Run the local test suite with:

NODE_ENV=test npm test

Sample Prompts with Claude

Send an Email

Note: sending an email currently (2025-03-18) seems to require a paid account with Anthropic. You'll get a silent failure on the free account

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"!
Fetch and Visualize Sending Statistics
Would you be able to make a chart with email delivery statistics for the past week?

Debugging

The MCP server communicates over stdio, please refer to Debugging section of the Model Context Protocol.

License

LICENSE file for details

Contributing

We welcome contributions! Please feel free to submit a Pull Request.

mailgun-mcp-server FAQ

How do I install the mailgun-mcp-server?
Clone the GitHub repo, install dependencies with npm, and configure your Mailgun API key and Claude Desktop settings.
What prerequisites are needed to run mailgun-mcp-server?
You need Node.js v18+, Git, a Mailgun account with API key, and an MCP-compatible AI client like Claude Desktop.
Can I use mailgun-mcp-server with AI clients other than Claude Desktop?
Yes, any MCP-compatible AI client can interact with this server, enabling flexible integration.
How does mailgun-mcp-server secure my Mailgun API credentials?
Credentials are stored locally in configuration files and used only for authenticated API calls; ensure your environment is secure.
Does mailgun-mcp-server support real-time email event streaming?
It supports querying Mailgun APIs for email events, but real-time streaming depends on Mailgun's webhook setup and client implementation.
Can I customize the mailgun-mcp-server to add more Mailgun API endpoints?
Yes, the server is open source and can be extended to support additional Mailgun API features as needed.
Is mailgun-mcp-server compatible with multiple Mailgun domains?
Yes, you can configure it to manage multiple domains by providing respective API keys and settings.
What AI models are compatible with mailgun-mcp-server?
It works with any MCP-compatible AI models, including OpenAI GPT, Anthropic Claude, and Google Gemini.