Email MCP Server

Email MCP Server

Enables Claude Desktop to send emails through Mailjet's API using the Model Context Protocol over Server-Sent Events. Provides secure email sending capabilities with API token authentication and user-provided credentials.

Category
Visit Server

README

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.

🛡️ 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.

Recommended Servers

playwright-mcp

playwright-mcp

A Model Context Protocol server that enables LLMs to interact with web pages through structured accessibility snapshots without requiring vision models or screenshots.

Official
Featured
TypeScript
Magic Component Platform (MCP)

Magic Component Platform (MCP)

An AI-powered tool that generates modern UI components from natural language descriptions, integrating with popular IDEs to streamline UI development workflow.

Official
Featured
Local
TypeScript
Audiense Insights MCP Server

Audiense Insights MCP Server

Enables interaction with Audiense Insights accounts via the Model Context Protocol, facilitating the extraction and analysis of marketing insights and audience data including demographics, behavior, and influencer engagement.

Official
Featured
Local
TypeScript
VeyraX MCP

VeyraX MCP

Single MCP tool to connect all your favorite tools: Gmail, Calendar and 40 more.

Official
Featured
Local
graphlit-mcp-server

graphlit-mcp-server

The Model Context Protocol (MCP) Server enables integration between MCP clients and the Graphlit service. Ingest anything from Slack to Gmail to podcast feeds, in addition to web crawling, into a Graphlit project - and then retrieve relevant contents from the MCP client.

Official
Featured
TypeScript
Kagi MCP Server

Kagi MCP Server

An MCP server that integrates Kagi search capabilities with Claude AI, enabling Claude to perform real-time web searches when answering questions that require up-to-date information.

Official
Featured
Python
E2B

E2B

Using MCP to run code via e2b.

Official
Featured
Neon Database

Neon Database

MCP server for interacting with Neon Management API and databases

Official
Featured
Exa Search

Exa Search

A Model Context Protocol (MCP) server lets AI assistants like Claude use the Exa AI Search API for web searches. This setup allows AI models to get real-time web information in a safe and controlled way.

Official
Featured
Qdrant Server

Qdrant Server

This repository is an example of how to create a MCP server for Qdrant, a vector search engine.

Official
Featured