Email MCP Server
This MCP (Model Context Protocol) server lets your AI assistant send emails for you.
What Can It Do?
Your AI assistant can:
- Send both plain text and HTML emails
- Attach files and documents
- Send to multiple people with CC/BCC
- Check if your email setup works
Available Tools
send_email - Simple Email Sending
Send emails quickly using your environment configuration:
- Just specify recipient, subject, and body
- Automatically uses your configured SMTP settings
- Perfect for quick messages
send_custom_email - Advanced Email Features
Send emails with full control:
- Send to multiple people with CC/BCC
- Add file attachments
- Use HTML formatting
- Override SMTP settings per email
test_smtp_connection_tool - Check Setup
Test your email settings before sending important emails.
Getting Started
1. Install Required Software
# Install uv (Python package manager)
curl -LsSf https://astral.sh/uv/install.sh | sh
# Restart your terminal or run:
source ~/.bashrc
2. Install Project Dependencies
cd email-mcp-server
uv sync
3. Test the Installation
# Test your email setup
uv run python test_email.py
# Run the server directly (for testing)
uv run main.py
4. Configure Claude Desktop or Cursor
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.
Simple Examples
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"
Advanced Examples
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"
Email Provider Setup
For Gmail
"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:
- Enable 2-Factor Authentication
- Go to Google Account → Security → App passwords
- Generate an app password for "Mail"
- Use the 16-character app password
For Outlook
"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"
}
For Other Providers
Replace the SMTP settings with your provider's details. Most providers use:
- Port 587 with SMTP_SECURE=false (STARTTLS)
- Port 465 with SMTP_SECURE=true (SSL)
Configuration Variables
| 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 |
Troubleshooting
"Missing Configuration"
- Make sure all environment variables are set in the Claude Desktop config
- Check that the directory path is correct and absolute
- Restart Claude Desktop after making changes
"Authentication Failed"
- For Gmail/Yahoo: Use app passwords, not regular passwords
- Enable 2-Factor Authentication first
- Double-check username and password
"Connection Issues"
- Verify SMTP host and port are correct
- Check your internet connection
- Some networks block SMTP ports
"Server Not Found"
- Make sure
uvis installed and in your PATH - Check that the directory path exists
- Verify the project dependencies are installed with
uv sync
Testing
# 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
License
MIT License - Feel free to use and modify as needed.
Metadata
Release files for iflow-mcp_egyptianego17-documentation 0.1.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| iflow_mcp_egyptianego17_documentation-0.1.0.tar.gz | 21.3 kB | Without provenance | Details for iflow_mcp_egyptianego17_documentation-0.1.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| iflow_mcp_egyptianego17_documentation-0.1.0-py3-none-any.whl | Python 3 | none | any | Details for iflow_mcp_egyptianego17_documentation-0.1.0-py3-none-any.whl |
Total release size: 29.0 kB
Release files / iflow_mcp_egyptianego17_documentation-0.1.0.tar.gz
| Download URL | iflow_mcp_egyptianego17_documentation-0.1.0.tar.gz |
|---|---|
| Size | 21.3 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
976f124e64cd0ae8c76bf8e29c979d7aadc2c6f84ecce228cbd7a5a783527931
|
|
BLAKE2b-256 checksum How to use checksums |
c5f017fcfcdbd5b51b2affb9751b62cb016e679472fde3d913decd6394474807
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
uv/0.9.8
|
Release files / iflow_mcp_egyptianego17_documentation-0.1.0-py3-none-any.whl
| Download URL | iflow_mcp_egyptianego17_documentation-0.1.0-py3-none-any.whl |
|---|---|
| Size | 7.7 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
c1e4a9c8987319c719c6246ecee6e457415aa58b1b1d68a371753d936f79f3ed
|
|
BLAKE2b-256 checksum How to use checksums |
ac7a37b19c7e6b75e1016cab7b7c50c5c1e9366a14312da7b4c27f59b68ac08a
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
uv/0.9.8
|
Security for iflow-mcp_egyptianego17-documentation 0.1.0
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.