AI Integration

Integrate MailCatcher NG with Claude using MCP and plugins for AI-powered email testing and automation.

Model Context Protocol (MCP)

Enable Claude to interact with MailCatcher NG through the MCP protocol for seamless AI integration.

What is MCP?

The Model Context Protocol (MCP) is an open standard for connecting AI models to external data sources and tools. With MailCatcher NG's MCP server, Claude can search, retrieve, and analyze emails directly.

Start MailCatcher with MCP

Enable MCP mode when starting MailCatcher NG:

Start with MCP
mailcatcher --mcp --foreground

Configure Claude Desktop

Add MailCatcher NG to your Claude Desktop configuration:

~/.claude_desktop_config.json
{
  "mcpServers": {
    "mailcatcher": {
      "command": "mailcatcher",
      "args": ["--mcp", "--foreground"]
    }
  }
}

Location: ~/.claude_desktop_config.json

Available MCP Tools

search_messages

Search through caught emails with flexible filtering.

Parameters:

  • query - Search term (required)
  • limit - Max results (default: 5)
  • has_attachments - Filter by attachments
  • from_date - Start date (ISO 8601)
  • to_date - End date (ISO 8601)

get_latest_message_for

Get the latest email received by a specific recipient.

Parameters:

  • recipient - Email address (required)
  • subject_contains - Optional subject filter

get_message_details

Get complete details of a specific message including headers and body.

Parameters:

  • message_id - Message ID (required)

list_messages

List all caught messages with pagination support.

Parameters:

  • limit - Max results (default: 20)
  • offset - Pagination offset

Example Usage

Natural Language Queries
# In Claude, you can now ask:
"Search for emails from noreply@example.com in the last 24 hours"

"What's the verification code in the latest email to admin@test.com?"

"Show me all emails with attachments"

"Find all password reset emails from the last week"

Claude Plugin

Use MailCatcher NG as a plugin with Claude.com or Claude Desktop for instant mail inspection capabilities.

What is a Claude Plugin?

Claude Plugins extend Claude's capabilities with custom tools. The MailCatcher NG plugin gives Claude direct access to your caught emails through a simple HTTP interface.

Start MailCatcher with Plugin Support

Enable plugin mode when starting MailCatcher NG:

Start with Plugin
mailcatcher --plugin --foreground

Or enable both MCP and Plugin:

Start with MCP and Plugin
mailcatcher --mcp --plugin --foreground

Install Plugin on Claude

  1. 1 Go to Claude.com or open Claude Desktop
  2. 2 Open the plugin settings
  3. 3 Click "Create a plugin"
  4. 4 Paste the manifest URL: http://localhost:1080/.well-known/ai-plugin.json
  5. 5 Click "Install" or "Add"

Manual Plugin Installation

If automatic discovery doesn't work:

Manual Plugin Details
Name: MailCatcher NG
Plugin URL: http://localhost:1080/.well-known/ai-plugin.json
API Base URL: http://localhost:1080

Plugin Endpoints

POST /plugin/search

Search through emails

Example
POST /plugin/search?query=password&limit=10
GET /plugin/message/:id/latest

Get latest message for a recipient

Example
GET /plugin/message/1/latest?recipient=user@example.com

Example Plugin Queries

Natural Language with Plugin
"Search my emails for messages from noreply@example.com"

"What's the OTP code in the latest email to admin@test.com?"

"Show me the HTML preview of message 1 optimized for mobile"

"Clear all my test emails"

MCP vs Plugin

Feature MCP Plugin
Setup Config file + restart URL paste + click
Claude Desktop ✓ Native Via HTTP
Claude.com No ✓ Yes
Performance ✓ Faster HTTP overhead
Reliability ✓ More stable Network dependent
Context Sharing ✓ Full access Limited scope

Recommendation: Use MCP with Claude Desktop for the best experience. Use the Plugin if you primarily use Claude.com or need web access to your local MailCatcher instance.