mcp-email-sender
An MCP server that enables AI agents to validate email addresses and send emails via SMTP with zero external dependencies.
README
MCP Email Sender — Email Validation & SMTP for AI Agents
An MCP (Model Context Protocol) server that gives AI agents the ability to validate email addresses, check MX records, detect disposable/role-based emails, and send emails via SMTP — all with zero external dependencies.
Features
- 8 MCP Tools:
validate_email,validate_email_batch,check_mx_records,is_disposable,is_role_based,send_email,send_email_batch,test_smtp_connection - Zero dependencies — pure Python stdlib (smtplib, email, re, socket)
- Email validation — format check, disposable detection, role-based detection, MX record lookup
- Batch operations — validate or send multiple emails in one call
- SMTP support — TLS, SSL, plain, with CC/BCC/Reply-To
- STDIO JSON-RPC mode — drop-in for Claude Desktop, Hermes, or any MCP client
- Environment-based config — SMTP credentials from env vars or tool args
Quick Start
# STDIO mode (for MCP clients)
python -m src.server --stdio
# Print manifest
python -m src.server --manifest
Use as a library
from src.server import MCPEmailServer
import json
server = MCPEmailServer()
# Validate email
result = server.handle_tool_call("validate_email", {"email": "user@gmail.com"})
print(json.loads(result)) # {"valid_format": true, "overall_valid": true, ...}
# Batch validate
result = server.handle_tool_call("validate_email_batch", {
"emails": ["user@gmail.com", "test@mailinator.com", "bad-email"]
})
# Send email
result = server.handle_tool_call("send_email", {
"to": "recipient@example.com",
"subject": "Hello from AI",
"body": "This email was sent by an AI agent via MCP.",
"smtp_host": "smtp.gmail.com",
"smtp_port": 587,
"smtp_username": "your@gmail.com",
"smtp_password": "app-password",
"use_tls": True
})
MCP Tool Reference
| Tool | Description | Required Params |
|---|---|---|
validate_email |
Full validation (format, disposable, role, MX) | email |
validate_email_batch |
Batch validate multiple emails | emails |
check_mx_records |
MX records for a domain | domain |
is_disposable |
Check if disposable email service | email |
is_role_based |
Check if role-based (admin@, info@) | email |
send_email |
Send via SMTP | to, subject, body |
send_email_batch |
Send multiple emails | emails |
test_smtp_connection |
Test SMTP server connection | — |
SMTP Configuration
Set via environment variables or pass in tool args:
export SMTP_HOST=smtp.gmail.com
export SMTP_PORT=587
export SMTP_USERNAME=your@gmail.com
export SMTP_PASSWORD=your-app-password
export SMTP_TLS=true
Integration with Claude Desktop
{
"mcpServers": {
"email-sender": {
"command": "python",
"args": ["-m", "src.server", "--stdio"],
"cwd": "/path/to/mcp-email-sender",
"env": {
"SMTP_HOST": "smtp.gmail.com",
"SMTP_PORT": "587",
"SMTP_USERNAME": "your@gmail.com",
"SMTP_PASSWORD": "your-app-password",
"SMTP_TLS": "true"
}
}
}
}
Tests
python -m pytest tests/ -v # 37 tests, all passing
License
MIT
Author
aaameobius-crypto — github.com/aaameobius-crypto
Freelance portfolio: https://ameobius-space.github.io/kwork-portfolio/
Recommended Servers
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.
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.
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.
VeyraX MCP
Single MCP tool to connect all your favorite tools: Gmail, Calendar and 40 more.
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.
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.
Neon Database
MCP server for interacting with Neon Management API and databases
E2B
Using MCP to run code via e2b.
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.
Qdrant Server
This repository is an example of how to create a MCP server for Qdrant, a vector search engine.