
Security News
Software Engineering Daily Podcast: Feross on AI, Open Source, and Supply Chain Risk
Socket CEO Feross Aboukhadijeh joins Software Engineering Daily to discuss modern software supply chain attacks and rising AI-driven security risks.
mcp-mail-enhanced
Advanced tools
English Version • Versión en Español
Enhanced Mail MCP Server is an advanced MCP (Model Context Protocol) server that enables MCP clients (Claude Desktop, Cursor, etc.) to perform email operations through a standardized interface with intelligent auto-configuration.
EMAIL_SERVER, EMAIL_USER, and EMAIL_PASSAdd this to your claude_desktop_config.json:
{
"mcpServers": {
"mail-enhanced": {
"command": "npx",
"args": [
"-y",
"mcp-mail-enhanced"
],
"env": {
"EMAIL_SERVER": "gmail.com",
"EMAIL_USER": "your.email@gmail.com",
"EMAIL_PASS": "your-app-password"
}
}
}
}
You can run the server directly without installation using npx:
# Run directly with simplified config
EMAIL_SERVER=gmail.com EMAIL_USER=tu@gmail.com EMAIL_PASS=password npx -y mcp-mail-enhanced
If you have cloned the repository and want to run your local version:
# 1. Build the project
npm install && npm run build
# 2. Run with npx pointing to current directory
EMAIL_SERVER=gmail.com EMAIL_USER=tu@gmail.com EMAIL_PASS=password npx .
If you prefer using the Python bridge (legacy method):
{
"mcpServers": {
"mail-enhanced": {
"command": "python",
"args": ["path/to/bridging_mail_mcp.py"],
"env": {
"EMAIL_SERVER": "gmail.com",
"EMAIL_USER": "your.email@gmail.com",
"EMAIL_PASS": "your-app-password"
}
}
}
}
git clone https://github.com/krka/mcp-mail-enhanced.git
cd mcp-mail-enhanced
npm install
npm run build
Add the configuration to your MCP client (Claude Desktop, Cursor, etc.) configuration file.
Smart Search: Multi-folder, keyword, date range, sender/recipient complex search
Intelligent Contact Management: Automatically extract contact info from email history with frequency analysis
Content Range Control: View large emails in segments to avoid loading too much content
Multiple Email Formats: Support both plain text and HTML email sending and display
Attachment Processing: Smart attachment type recognition, support for text, image previews
Secure & Reliable: All email operations processed locally, no third-party server forwarding
waitForReply: Wait for a new email to arrive in a folder (long-polling).
getAttachment: Download or view content of a specific attachment.
listFolders: List all available mail folders on the server.markAsRead: Mark a specific email as read.markAsUnread: Mark a specific email as unread.markMultipleAsRead: Mark multiple emails as read by UID.markMultipleAsUnread: Mark multiple emails as unread by UID.deleteEmail: Delete an email (move to Trash/Deleted).moveEmail: Move an email from one folder to another.getContacts: Extract contact list from your email history.# Development mode with auto-reload
npm run dev
# Build production version
npm run build
# Run tests
npm run test
# Start built server
npm start
src/
├── index.ts # Main entry point
├── tools/
│ ├── mail.ts # MCP server implementation
│ ├── mail-service.ts # Email service (SMTP/IMAP)
│ ├── email-config-detector.ts # Auto-configuration logic
│ └── process-manager.ts # Process management
├── bridging_mail_mcp.py # Python bridge script
└── CLAUDE.md # Claude Code documentation
This server is designed to be used naturally with LLMs. Here are some example prompts you can use:
Check your inbox:
"Check my inbox for new emails from the last 24 hours" Tools used:
listEmails
Search for something specific:
"Search for emails from 'amazon' about 'delivery' sent this week" Tools used:
searchEmails
Read a specific email:
"Read the latest email from John Doe and summarize it" Tools used:
listEmails->getEmailDetail
Check for new replies:
"Wait for a reply to the email I just sent (timeout 10 minutes)" Tools used:
waitForReply
Send a quick email:
"Send an email to user@example.com with subject 'Meeting' and body 'See you at 2pm'" Tools used:
sendMailorsendSimpleMail
Send with attachments:
"Send the file 'report.pdf' to boss@company.com" Tools used:
sendMail(with attachment)
Send to multiple people:
"Send a reminder to team@company.com and cc manager@company.com about the deadline" Tools used:
sendMail
Organize your inbox:
"Move all emails from 'newsletter@spam.com' to the Trash folder" Tools used:
searchEmails->moveEmail
Clean up:
"Mark all emails from yesterday as read" Tools used:
listEmails->markMultipleAsRead
Find contacts:
"Who have I emailed recently about 'project x'?" Tools used:
getContacts
We welcome contributions! Please feel free to submit issues and enhancement requests.
ISC License - see LICENSE file for details.
This project is an enhanced fork that builds upon the original MCP mail implementation, adding significant improvements in usability and configuration management.
⭐ If this project helps you, please give it a star! (。♥‿♥。)
FAQs
Enhanced Mail MCP Server with auto-configuration and simplified setup
The npm package mcp-mail-enhanced receives a total of 4 weekly downloads. As such, mcp-mail-enhanced popularity was classified as not popular.
We found that mcp-mail-enhanced demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Security News
Socket CEO Feross Aboukhadijeh joins Software Engineering Daily to discuss modern software supply chain attacks and rising AI-driven security risks.

Security News
GitHub has revoked npm classic tokens for publishing; maintainers must migrate, but OpenJS warns OIDC trusted publishing still has risky gaps for critical projects.

Security News
Rust’s crates.io team is advancing an RFC to add a Security tab that surfaces RustSec vulnerability and unsoundness advisories directly on crate pages.