Enables sending, searching, replying to, and organizing Gmail emails through SMTP and IMAP protocols, with support for attachments, threading, and folder management.
Enables sending, searching, replying to, and organizing iCloud Mail emails through SMTP and IMAP protocols, with support for attachments, threading, and folder management.
Email MCP Server
A clean, simple MCP server for email operations supporting both SMTP (sending) and IMAP (reading).
Features
✅ Send emails with HTML and attachments
✅ Search emails with flexible filters
✅ Reply/Forward with proper threading
✅ Organize (mark read, archive, flag)
✅ Multi-account support for managing multiple email accounts
✅ List folders to browse your mailbox structure
Quick Start
Installation
Or install globally:
Configuration
Add to your Claude Desktop config file:
macOS: ~/Library/Application Support/Claude/claude_desktop_config.json
Windows: %APPDATA%\Claude\claude_desktop_config.json
⚠️ Important: Restart Claude Desktop after adding this configuration.
Email Provider Settings
Gmail
Setup: Create App Password
iCloud Mail
Setup: Generate App-Specific Password
Outlook/Office 365
Multiple Accounts
Available Tools
Tool | Description |
| Search emails with flexible filters (sender, subject, date, attachments, etc.) |
| Mark as read/unread, flag, archive, or move emails |
| Send new emails with HTML content and attachments |
| Reply or forward emails with proper threading |
| List all available email folders |
Usage Examples
Ask Claude to:
"Find unread emails from last week"
"Send an email to team@company.com about the meeting"
"Reply to the last email from Sarah"
"Archive all emails older than 30 days"
"List my email folders"
"Find emails with attachments from my boss"
"Mark all emails from newsletter@site.com as read"
Security Notes
Never commit
.envfiles or credentials to version controlUse app-specific passwords or app passwords, not your main account password
The server runs locally on your machine - credentials stay private
All email connections use TLS encryption (ports 587 for SMTP, 993 for IMAP)
Development
Troubleshooting
Authentication Errors
Make sure you're using an app password, not your regular password
For Gmail: Create App Password
For iCloud: Generate App-Specific Password
Server Not Starting
Verify your configuration JSON is properly escaped
Check that ports 587 (SMTP) and 993 (IMAP) are not blocked by your firewall
Restart Claude Desktop after configuration changes
Connection Issues
Confirm your email provider allows IMAP/SMTP access
Check your internet connection
Verify the SMTP/IMAP host and port settings for your provider
License
MIT License - see LICENSE file for details
Contributing
Contributions are welcome! Please feel free to submit a Pull Request.
Author
Sami Halawa - GitHub
Made with ❤️ for the MCP community