Integrations

MCP Server

Model Context Protocol integration

Overview

The Model Context Protocol (MCP) server lets AI assistants interact with your email system programmatically. Any MCP-compatible client — such as Claude Desktop — can send emails, manage contacts, browse templates, and retrieve analytics through a single endpoint.

POST/api/mcp

MCP JSON-RPC endpoint. Accepts standard MCP protocol messages and returns tool results.

Available Tools

The MCP server exposes the following tools that AI assistants can invoke:

  • send_email — Compose and send an email to one or more recipients with a subject and HTML or plain-text body.
  • list_contacts — Retrieve all contacts from your address book with optional search and pagination.
  • create_contact — Add a new contact with an email address, name, and optional metadata.
  • list_templates — Browse available email templates including both custom and built-in options.
  • get_stats — Fetch sending statistics including total sent, delivered, opened, and bounced counts.
  • search_contacts — Search contacts by name or email address with fuzzy matching support.

Configuration

To connect Claude Desktop (or any MCP-compatible client) to your Mail Panda instance, add the following to your MCP configuration file:

Claude Desktop MCP Config
{
  "mcpServers": {
    "mailpanda": {
      "url": "http://localhost:3000/api/mcp"
    }
  }
}

For Claude Desktop, this file is located at ~/Library/Application Support/Claude/claude_desktop_config.json on macOS or %APPDATA%\Claude\claude_desktop_config.json on Windows. Restart Claude Desktop after saving the configuration.

Authentication

The MCP endpoint uses API key authentication. Include your API key in the request headers so the server can verify your identity. You can generate an API key from the Settings page in the dashboard.

Config with API Key
{
  "mcpServers": {
    "mailpanda": {
      "url": "http://localhost:3000/api/mcp",
      "headers": {
        "x-api-key": "your-api-key-here"
      }
    }
  }
}

Example Usage

Once configured, you can interact with your email system using natural language in Claude Desktop. Here are some example prompts:

  • "Send an email to john@example.com about the meeting tomorrow at 3pm"
  • "Show me all my contacts"
  • "What are my email stats for this week?"
  • "Create a new contact for Jane Smith at jane@company.com"
  • "List all available email templates"

The AI assistant will automatically select the appropriate tool and execute the action on your behalf. Responses are returned in a conversational format with confirmation of the completed action.