drio
Open app

Mailgun MCP Server

Source

Implementation of Model Context Protocol server for Mailgun APIs

Catalog onlyCatalog onlySTDIO

Overview

Mailgun MCP Server is an implementation of the Model Context Protocol (MCP) server for Mailgun APIs, allowing AI clients like Claude Desktop to interact with Mailgun services.

To use the Mailgun MCP Server, clone the repository, install dependencies, and configure Claude Desktop with your Mailgun API key and the path to the MCP server script.

  • Enables interaction between MCP-compatible AI clients and Mailgun APIs. - Supports sending emails and fetching email delivery statistics. - Provides a local test suite for debugging and testing.
  1. Sending automated emails through AI prompts.
  2. Visualizing email delivery statistics over a specified period.
  3. Integrating Mailgun services with AI applications for enhanced functionality.

Add to your AI client

Use these steps to connect Mailgun MCP Server in Cursor, Claude, VS Code, and other MCP-compatible apps. The same JSON appears in the Use with menu above for one-click copy.

Cursor

Add this to your .cursor/mcp.json file in your project root, then restart Cursor.

.cursor/mcp.json

{
  "mcpServers": {
    "mailgun-mcp-server-mailgun": {
      "command": "npx",
      "args": [
        "-y",
        "@modelcontextprotocol/server-mailgun-mcp-server-mailgun"
      ]
    }
  }
}

Claude Desktop

Add this server entry to the mcpServers object in your Claude Desktop config, then restart the app.

~/Library/Application Support/Claude/claude_desktop_config.json (macOS) or %APPDATA%\Claude\claude_desktop_config.json (Windows)

{
  "mcpServers": {
    "mailgun-mcp-server-mailgun": {
      "command": "npx",
      "args": [
        "-y",
        "@modelcontextprotocol/server-mailgun-mcp-server-mailgun"
      ]
    }
  }
}

Claude Code

Add this to your project's .mcp.json file. Claude Code will detect it automatically.

.mcp.json (project root)

{
  "mcpServers": {
    "mailgun-mcp-server-mailgun": {
      "command": "npx",
      "args": [
        "-y",
        "@modelcontextprotocol/server-mailgun-mcp-server-mailgun"
      ]
    }
  }
}

VS Code (Copilot)

Add this to your .vscode/mcp.json file. Requires the GitHub Copilot extension with MCP support enabled.

.vscode/mcp.json

{
  "servers": {
    "mailgun-mcp-server-mailgun": {
      "type": "stdio",
      "command": "npx",
      "args": [
        "-y",
        "@modelcontextprotocol/server-mailgun-mcp-server-mailgun"
      ]
    }
  }
}

Windsurf

Add this to your Windsurf MCP config file, then restart Windsurf.

~/.codeium/windsurf/mcp_config.json

{
  "mcpServers": {
    "mailgun-mcp-server-mailgun": {
      "command": "npx",
      "args": [
        "-y",
        "@modelcontextprotocol/server-mailgun-mcp-server-mailgun"
      ]
    }
  }
}

Cline

Open Cline settings, navigate to MCP Servers, and add this server configuration.

Cline MCP Settings (via UI)

{
  "mcpServers": {
    "mailgun-mcp-server-mailgun": {
      "command": "npx",
      "args": [
        "-y",
        "@modelcontextprotocol/server-mailgun-mcp-server-mailgun"
      ]
    }
  }
}

FAQ

What are the prerequisites for using Mailgun MCP Server?

You need Node.js (v18 or higher), Git, a Mailgun account, and Claude Desktop for integration.

Is there a cost associated with sending emails through the MCP server?

Yes, sending emails currently requires a paid account with Anthropic; free accounts may not work as expected.

How can I test the Mailgun MCP Server?

You can run the local test suite using the command: `NODE_ENV=test npm test`.