Back to MCP Catalog

Mailgun MCP Server

CommunicationJavaScript
Interact with Mailgun email services through AI assistants
Available Tools

sendEmail

Send an email through Mailgun's email delivery service

getStats

Retrieve email delivery statistics from Mailgun

The Mailgun MCP server enables AI assistants like Claude to interact directly with Mailgun's email delivery services. This integration allows you to send emails, check delivery statistics, and manage your email campaigns through natural language conversations with your AI assistant. With this MCP, you can leverage the power of Mailgun's robust email infrastructure while enjoying the convenience of an AI interface. Whether you need to quickly send an email, analyze delivery metrics, or troubleshoot issues, this tool bridges the gap between conversational AI and professional email services.

Overview

The Mailgun MCP server allows AI assistants like Claude Desktop to interact with Mailgun's email delivery services. This integration enables you to perform various email-related tasks through natural language conversations.

Prerequisites

Before setting up the Mailgun MCP server, ensure you have:

  • Node.js (v18 or higher)
  • Git
  • Claude Desktop or another MCP-compatible AI client
  • A Mailgun account with an API key

Installation

Step 1: Clone the Repository

First, clone the repository to your local machine:

git clone https://github.com/mailgun/mailgun-mcp-server.git
cd mailgun-mcp-server

Step 2: Install Dependencies

Install the required dependencies:

npm install

Step 3: Configure Your AI Client

For Claude Desktop, you'll need to modify the configuration file located at:

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

Add the following configuration to the file, replacing the placeholders with your actual paths and API key:

{
    "mcpServers": {
        "mailgun": {
            "command": "node",
            "args": ["PATH/TO/mailgun-mcp-server/src/mailgun-mcp.js"],
            "env": {
                "MAILGUN_API_KEY": "YOUR-MAILGUN-API-KEY"
            }
        }
    }
}

Usage Examples

Once configured, you can interact with Mailgun through your AI assistant using natural language. Here are some example prompts:

Sending an Email

Can you send an email to recipient@example.com with a funny email body that makes it sound like it's from the IT Desk from Office Space?
Please use the sending domain example.com, and make the email from "postmaster@example.com"!

Note: Sending emails may require a paid account with your AI provider.

Visualizing Email Statistics

Would you be able to make a chart with email delivery statistics for the past week?

Troubleshooting

If you encounter issues:

  1. Verify your Mailgun API key is correct and has the necessary permissions
  2. Check that the path to the MCP server in your configuration is correct
  3. Ensure Node.js is properly installed and accessible
  4. Review any error messages in your AI client's logs

The MCP server communicates over stdio. For detailed debugging information, refer to the Model Context Protocol documentation on debugging.

Additional Resources

Related MCPs

YouTube Transcript
CommunicationTypeScript

Retrieve transcripts from YouTube videos

iMessage Query
CommunicationPython

Access and analyze your iMessage conversations through a secure MCP server

Slack Integration
CommunicationTypeScript

Enables AI assistants to interact with Slack workspaces

About Model Context Protocol

Model Context Protocol (MCP) allows AI models to access external tools and services, extending their capabilities beyond their training data.

Generate Cursor Documentation

Save time on coding by generating custom documentation and prompts for Cursor IDE.