Email Sender MCP Server
π A Model Context Protocol (MCP) server that enables AI assistants to send emails via SMTP. Built with FastMCP and supports Gmail SMTP integration.
Ask AI about Email Sender MCP Server
Powered by Claude Β· Grounded in docs
I know everything about Email Sender MCP Server. Ask me about installation, configuration, usage, or troubleshooting.
0/500
Reviews
Documentation
π§ Email Sender MCP Server
A Model Context Protocol (MCP) server that enables AI assistants like Claude to send emails via SMTP. Built with FastMCP for seamless integration with AI workflows.
β¨ Features
- π¨ Send Emails - Send emails programmatically through AI assistants
- β Email Validation - Automatic validation of recipient email addresses
- π Secure SMTP - Uses TLS encryption for secure email transmission
- π Server Info Resource - Query server metadata and capabilities
- π― Gmail Integration - Pre-configured for Gmail SMTP (easily adaptable to other providers)
Demo Video
link - https://drive.google.com/file/d/129tccBAfMRiJLKSd7pNl7pwMm7-VH9M_/view?usp=drivesdk
π Quick Start
Prerequisites
- Python 3.8 or higher
- Gmail account with App Password enabled (or other SMTP provider)
Installation
- Clone the repository
git clone https://github.com/AbuZar-Ansarii/Email-Sender-MCP-Server.git
cd email-mcp-server
- Install dependencies
uv pip install -r requirements.txt
- Configure your email credentials
Edit the configuration section in the code:
SMTP_SERVER = "smtp.gmail.com"
SMTP_PORT = 587
SENDER_EMAIL = "your-email@gmail.com"
SENDER_PASSWORD = "your-app-password" # Use App Password, not regular password!
Setting Up Gmail App Password
- Enable 2-Factor Authentication on your Google account
- Go to Google App Passwords
- Generate a new app password for "Mail"
- Use this 16-character password in the
SENDER_PASSWORDfield
Running the Server
python email_sender.py
Or with FastMCP:
fastmcp run email_sender.py
π§ Usage
With Claude Desktop
Add to your claude_desktop_config.json:
{
"mcpServers": {
"email-sender": {
"command": "uv",
"args": ["/path/to/email_sender.py"]
}
}
}
Available Tools
send_email
Sends an email to a specified recipient.
Parameters:
receiver(str): Recipient's email addresssubject(str): Email subject linecontent(str): Email body content
Returns:
- Success message with recipient email
- Error message if sending fails
Example:
send_email(
receiver="recipient@example.com",
subject="Hello from MCP!",
content="This is a test email sent via MCP server."
)
Available Resources
info://server
Returns server metadata including name, version, description, available tools, and author.
π Requirements
fastmcp
email-validator
π Security Notes
- Never commit credentials - Always use environment variables or config files (add to
.gitignore) - Use App Passwords - Don't use your main Gmail password
- Validate inputs - The server includes email validation to prevent invalid addresses
- Rate limiting - Be aware of SMTP provider rate limits (Gmail: ~500 emails/day for free accounts)
π οΈ Customization
Using Different SMTP Providers
Outlook/Hotmail:
SMTP_SERVER = "smtp-mail.outlook.com"
SMTP_PORT = 587
Yahoo:
SMTP_SERVER = "smtp.mail.yahoo.com"
SMTP_PORT = 587
Custom SMTP:
SMTP_SERVER = "your-smtp-server.com"
SMTP_PORT = 587 # or 465 for SSL
π€ Contributing
Contributions are welcome! Please feel free to submit a Pull Request.
- Fork the repository
- Create your feature branch (
git checkout -b feature/AmazingFeature) - Commit your changes (
git commit -m 'Add some AmazingFeature') - Push to the branch (
git push origin feature/AmazingFeature) - Open a Pull Request
π License
This project is licensed under the MIT License - see the LICENSE file for details.
π€ Author
Mohd Abuzar
ail validation powered by email-validator
π Support
If you have any questions or run into issues, please open an issue on GitHub.
β Star this repo if you find it helpful!
