Skip to main content
Glama
Email MCP Server

Email MCP Server

by x-mahar

Email MCP Server

A minimal, production-ready MCP (Model Context Protocol) server that enables Claude Desktop to send emails via Mailjet's API over Server-Sent Events (SSE).

πŸš€ Quick Start

1. Deploy the Server

Local Development:

# Clone and setup
git clone <your-repo>
cd email-mcp-server
pip install -r requirements.txt

# Configure environment
cp .env.example .env
# Edit .env with your API tokens

# Run server
python main.py
# Server runs on http://localhost:8000

Production Deploy (Railway/Render/Vercel):

  1. Fork this repository

  2. Connect to your hosting platform

  3. Set environment variables:

    • VALID_API_TOKENS=your-secure-tokens-here

    • HOST=0.0.0.0

    • PORT=8000

2. Get Your API Token

Visit your deployed server at https://your-domain.com and get a valid API token from the VALID_API_TOKENS environment variable.

3. Configure Claude Desktop

Add this to your Claude Desktop MCP configuration file:

macOS: ~/Library/Application Support/Claude/claude_desktop_config.json
Windows: %APPDATA%\Claude\claude_desktop_config.json

{
  "mcpServers": {
    "email-sender": {
      "transport": {
        "type": "sse",
        "url": "https://your-domain.com/sse?api_token=your-api-token"
      }
    }
  }
}

4. Get Mailjet Credentials

  1. Sign up at Mailjet.com (free tier available)

  2. Go to Account Settings β†’ API Keys

  3. Copy your API Key and Secret Key

5. Send Emails with Claude

Now you can ask Claude to send emails:

"Send an email to john@example.com with the subject 'Meeting Follow-up' saying 'Thanks for the great discussion today. Let's schedule a follow-up for next week.'"

Claude will ask for your Mailjet credentials the first time.

Related MCP server: email

πŸ›‘οΈ Security Features

  • API Token Authentication: Each request requires a valid token

  • User-Provided Credentials: Server never stores user email credentials

  • Input Validation: Email format validation and error handling

  • CORS Protection: Configurable origin restrictions

πŸ“‘ API Endpoints

  • GET / - Server status and information

  • GET /sse?api_token=TOKEN - SSE endpoint for MCP protocol

  • POST /mcp?api_token=TOKEN - Direct MCP message handling (debugging)

πŸ”§ Environment Variables

HOST=0.0.0.0                    # Server host
PORT=8000                       # Server port
VALID_API_TOKENS=token1,token2  # Comma-separated valid tokens

πŸ“ Usage Examples

Basic Email:

Send email to user@domain.com saying "Hello World"

With HTML:

Send a professional email to client@company.com with subject "Proposal" including both plain text and HTML formatting

Multiple Recipients (coming soon): Currently supports single emails only. Bulk email functionality planned for v2.

🚨 Troubleshooting

Common Issues:

  1. "Invalid API token" - Check your token in the SSE URL

  2. "Invalid Mailjet credentials" - Verify your API key and secret

  3. "Invalid email format" - Ensure email addresses are properly formatted

  4. Connection timeouts - Check your server deployment status

πŸ—οΈ Architecture

  • FastAPI - Modern Python web framework

  • SSE Transport - Real-time MCP protocol communication

  • Mailjet API - Reliable email delivery service

  • In-Memory Auth - Simple token validation (no database required)

πŸ“„ License

MIT License - feel free to use in your own projects!

🀝 Contributing

  1. Fork the repository

  2. Create a feature branch

  3. Make your changes

  4. Submit a pull request

For major changes, please open an issue first to discuss the proposed changes.

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections.

Loading tool schema changelog…

    Related MCP Connectors

    • Connect any IMAP/SMTP mailbox to Claude & ChatGPT: search, read, sort, draft. Sends only with OK.

    • Mailjet MCP server for ChatGPT, Claude and any AI agent: list contacts, create segment, duplicate campaign, update campaign subject, schedule campaign, send campaign, get campaign report and unsubscribe contacts in your own Mailjet account. Cotlet works in the account through your Cloud Browser, a real Chrome where you sign in to Mailjet yourself; Cotlet does not store your password and you need no Mailjet API key. About the official Mailjet API: Mailjet has a full REST API (v3) for contacts, segments, campaign drafts, scheduling, sending and statistics, and an official MCP server that is read-only: it does not send emails or change Mailjet settings (checked 22 Oct 2026). The MCP server runs on your computer with an API key and secret. Setup and FAQ: https://cotlet.dev/integrations/mailjet-api-mcp-server

      https://cotlet.dev/mcp/v1/mailjet
    • Connect any mailbox to Claude, ChatGPT & AI: read, send, reply, schedule & search emails.

      https://mailmcp.io/mcp
    • Connect AI agents to Emitd email sending, message tracking, templates, and automations. Emitd hosts a Model Context Protocol server for integrating supported email operations into AI-agent workflows. Connect a compatible client to the hosted endpoint (https://mcp.emitd.com/mcp) and authenticate with an Emitd API key. Available tools depend on the key's permissions and enabled features. Emitd's capability areas include sending email, message activity, templates, contacts, audiences, segments, domains, analytics, inbound email, broadcasts, automations, webhooks, and suppressions. Use restricted keys, sending guardrails, and approval settings appropriate to each workflow. For more information check https://emitd.com

      https://mcp.emitd.com/mcp

    Related MCP Servers

    • A
      license
      Not graded
      quality
      D
      maintenance
      Enables AI-powered inbox management with natural language commands through Claude Desktop. Supports sending, reading, searching, organizing emails, and managing labels using Gmail API with automatic authentication.
      8
      MIT
    • A
      license
      A
      quality
      D
      maintenance
      A Model Context Protocol (MCP) server that enables Claude Desktop to manage emails via SMTP and IMAP. Send emails, fetch unread messages, and create draft replies directly from conversations.
      3
      34 npm
      MIT
    • F
      license
      Not graded
      quality
      B
      maintenance
      Enables Claude to read, search, draft, send, flag, and move email across multiple IMAP/SMTP mailboxes while keeping credentials local.
      -
    • A
      license
      B
      quality
      C
      maintenance
      Enables AI agents to send and manage email, read threaded replies, run campaigns and automations, and handle approvals through the Model Context Protocol from any compatible client.
      45
      668 npm
      1
      MIT