by egyptianego17
Enables AI agents to send plain‑text or HTML emails, attach files, and manage CC/BCC via configurable SMTP settings.
Email MCP Server provides a lightweight MCP endpoint that lets AI assistants issue email‑sending commands. It abstracts the SMTP interaction so the model only needs to specify recipients, subject, body, and optional attachments.
curl -LsSf https://astral.sh/uv/install.sh | sh
source ~/.bashrc
cd email-mcp-server
uv sync
uv run main.py
send_email, send_custom_email, test_smtp_connection_tool) from your AI agent to perform email actions.send_email tool for quick plain‑text messages.send_custom_email tool with HTML support, multiple recipients, CC/BCC, and file attachments.test_smtp_connection_tool to verify SMTP credentials before sending real emails.Q: Which email providers are supported? A: Any provider offering SMTP access. Configuration examples for Gmail and Outlook are provided.
Q: Do I need to store my password in plain text? A: Use environment variables or secret management tools. For Gmail, generate an app‑specific password.
Q: How do I test the connection without sending an email?
A: Run test_smtp_connection_tool or execute uv run python test_email.py which only attempts a login.
Q: Can I override SMTP settings per email?
A: Yes, send_custom_email accepts optional parameters to change host, port, or credentials for a single message.
Q: What if my network blocks SMTP ports? A: Verify that ports 587 (STARTTLS) or 465 (SSL) are open, or use a VPN/relay service.
This MCP (Model Context Protocol) server lets your AI assistant send emails for you.
Your AI assistant can:
send_email - Simple Email SendingSend emails quickly using your environment configuration:
send_custom_email - Advanced Email FeaturesSend emails with full control:
test_smtp_connection_tool - Check SetupTest your email settings before sending important emails.
# Install uv (Python package manager)
curl -LsSf https://astral.sh/uv/install.sh | sh
# Restart your terminal or run:
source ~/.bashrc
cd email-mcp-server
uv sync
# Test your email setup
uv run python test_email.py
# Run the server directly (for testing)
uv run main.py
Add this to your Claude Desktop configuration or Cursor file:
{
"mcpServers": {
"mcp-server": {
"command": "uv",
"args": [
"--directory",
"path/to/the/app/email-mcp-server",
"run",
"main.py"
],
"env": {
"SMTP_HOST": "",
"SMTP_PORT": "",
"SMTP_SECURE": "",
"SMTP_USER": "",
"SMTP_FROM": "",
"SMTP_PASS": ""
}
}
}
}
Important: Change the directory path to match your actual installation location.
Send a basic email:
"Send an email to john@company.com saying the meeting is tomorrow at 2 PM"
Send with HTML formatting:
"Send an HTML email to team@company.com with subject 'Weekly Update' and create a nice formatted message about this week's progress"
Test your setup:
"Test the email connection to make sure it's working"
Send to multiple people with attachments:
"Send a custom email to the team about the project update. Send to team@company.com, CC manager@company.com, and attach the project report"
"env": {
"SMTP_HOST": "smtp.gmail.com",
"SMTP_PORT": "587",
"SMTP_SECURE": "false",
"SMTP_USER": "your-email@gmail.com",
"SMTP_FROM": "your-email@gmail.com",
"SMTP_PASS": "your-app-password"
}
Gmail Setup Steps:
"env": {
"SMTP_HOST": "smtp-mail.outlook.com",
"SMTP_PORT": "587",
"SMTP_SECURE": "false",
"SMTP_USER": "your-email@outlook.com",
"SMTP_FROM": "your-email@outlook.com",
"SMTP_PASS": "your-password"
}
Replace the SMTP settings with your provider's details. Most providers use:
| Variable | Description | Example |
|---|---|---|
SMTP_HOST |
Your email server | smtp.gmail.com |
SMTP_PORT |
Server port | 587 |
SMTP_SECURE |
Use SSL (true/false) | false |
SMTP_USER |
Your username | user@gmail.com |
SMTP_FROM |
Sender address | noreply@company.com |
SMTP_PASS |
Your password | your-password |
uv is installed and in your PATHuv sync# Test configuration and connection
uv run python test_email.py
# Send a real test email to yourself
uv run python test_email.py --send-real
MIT License - Feel free to use and modify as needed.
Please log in to share your review and rating for this MCP.
Explore related MCPs that share similar capabilities and solve comparable challenges
by activepieces
A self‑hosted, open‑source platform that provides a no‑code builder for creating, versioning, and running AI‑driven automation workflows. Pieces are TypeScript‑based plugins that become MCP servers, allowing direct consumption by large language models.
by Skyvern-AI
Automates browser‑based workflows by leveraging large language models and computer‑vision techniques, turning natural‑language prompts into fully functional web interactions without writing custom scripts.
by ahujasid
Enables Claude AI to control Blender for prompt‑assisted 3D modeling, scene creation, and manipulation via a socket‑based Model Context Protocol server.
by PipedreamHQ
Connect APIs quickly with a free, hosted integration platform that enables event‑driven automations across 1,000+ services and supports custom code in Node.js, Python, Go, or Bash.
by elie222
Organizes email inbox, drafts replies in the user's tone, tracks follow‑ups, and provides analytics to achieve inbox zero quickly.
by grab
Enables Cursor AI to read and programmatically modify Figma designs through a Model Context Protocol integration.
by CursorTouch
Enables AI agents to control the Windows operating system, performing file navigation, application launching, UI interaction, QA testing, and other automation tasks through a lightweight server.
by ahujasid
Enables Claude AI to control Ableton Live in real time, allowing AI‑driven creation, editing, and playback of tracks, clips, instruments, and effects through a socket‑based server.
by leonardsellem
Provides tools and resources to enable AI assistants to manage and execute n8n workflows via natural language commands.