Email (IMAP/SMTP)▌
by yunfeizhu
Securely access and manage your emails domains with IMAP Apple and SMTP. Enjoy reliable email delivery with IMAP/SMTP su
Provides IMAP/SMTP email access for reading messages and sending emails with secure connection support and environment-based credential management.
Both formats append explainx.ai attribution and the canonical URL for this MCP server listing.
best for
- / AI-assisted email management and organization
- / Automated email responses and workflows
- / Quick email searches and summaries through chat
capabilities
- / Search and read emails from any mailbox
- / Send HTML and text emails with attachments
- / Browse multiple mailboxes (Inbox, Sent, custom folders)
- / Download and save email attachments
- / Manage email operations with natural language commands
what it does
Connects your AI assistant to email accounts via IMAP/SMTP to read, search, and send emails directly from chat.
about
Email (IMAP/SMTP) is a community-built MCP server published by yunfeizhu that provides AI assistants with tools and capabilities via the Model Context Protocol. Securely access and manage your emails domains with IMAP Apple and SMTP. Enjoy reliable email delivery with IMAP/SMTP su It is categorized under productivity, communication.
how to install
You can install Email (IMAP/SMTP) in your AI client of choice. Use the install panel on this page to get one-click setup for Cursor, Claude Desktop, VS Code, and other MCP-compatible clients. This server runs locally on your machine via the stdio transport.
license
MIT
Email (IMAP/SMTP) is released under the MIT license. This is a permissive open-source license, meaning you can freely use, modify, and distribute the software.
readme
MCP Mail Server
Language: English | 中文
A Model Context Protocol server for IMAP/SMTP email operations with Claude, Cursor, and other AI assistants.
Features
- IMAP Operations: Search, read, and manage emails across mailboxes
- SMTP Support: Send emails with HTML/text content and attachments
- Attachment Management: View attachment metadata and save attachments to local files
- Secure Configuration: Environment-based setup with TLS/SSL support
- AI-Friendly: Natural language commands for email operations
- Auto Connection Management: Automatic IMAP/SMTP connection handling
- Multi-Mailbox Support: Access INBOX, Sent, and custom folders
Quick Start
- Install:
npm install -g mcp-mail-server - Configure environment variables (see Configuration)
- Add to your MCP client configuration
- Use natural language: "Show me unread emails from today"
Installation
<details> <summary>Claude Desktop</summary>Add to your claude_desktop_config.json:
{
"mcpServers": {
"mcp-mail-server": {
"command": "npx",
"args": ["-y", "mcp-mail-server"],
"env": {
"IMAP_HOST": "your-imap-server.com",
"IMAP_PORT": "993",
"IMAP_SECURE": "true",
"SMTP_HOST": "your-smtp-server.com",
"SMTP_PORT": "465",
"SMTP_SECURE": "true",
"EMAIL_USER": "[email protected]",
"EMAIL_PASS": "your-password"
}
}
}
}
</details>
<details>
<summary>Cursor</summary>
Add to your Cursor MCP settings:
{
"mcpServers": {
"mcp-mail-server": {
"command": "npx",
"args": ["-y", "mcp-mail-server"],
"env": {
"IMAP_HOST": "your-imap-server.com",
"IMAP_PORT": "993",
"IMAP_SECURE": "true",
"SMTP_HOST": "your-smtp-server.com",
"SMTP_PORT": "465",
"SMTP_SECURE": "true",
"EMAIL_USER": "[email protected]",
"EMAIL_PASS": "your-password"
}
}
}
}
</details>
<details>
<summary>Claude Code</summary>
Add using the claude mcp add command:
claude mcp add mcp-mail-server \
-e IMAP_HOST=your-imap-server.com \
-e IMAP_PORT=993 \
-e IMAP_SECURE=true \
-e SMTP_HOST=your-smtp-server.com \
-e SMTP_PORT=465 \
-e SMTP_SECURE=true \
-e [email protected] \
-e EMAIL_PASS=your-password \
-- npx -y mcp-mail-server
Or manually add to .claude/settings.json:
{
"mcpServers": {
"mcp-mail-server": {
"command": "npx",
"args": ["-y", "mcp-mail-server"],
"env": {
"IMAP_HOST": "your-imap-server.com",
"IMAP_PORT": "993",
"IMAP_SECURE": "true",
"SMTP_HOST": "your-smtp-server.com",
"SMTP_PORT": "465",
"SMTP_SECURE": "true",
"EMAIL_USER": "[email protected]",
"EMAIL_PASS": "your-password"
}
}
}
}
</details>
<details>
<summary>OpenAI Codex</summary>
Add to codex.json in your project root:
{
"mcpServers": {
"mcp-mail-server": {
"command": "npx",
"args": ["-y", "mcp-mail-server"],
"env": {
"IMAP_HOST": "your-imap-server.com",
"IMAP_PORT": "993",
"IMAP_SECURE": "true",
"SMTP_HOST": "your-smtp-server.com",
"SMTP_PORT": "465",
"SMTP_SECURE": "true",
"EMAIL_USER": "[email protected]",
"EMAIL_PASS": "your-password"
}
}
}
}
</details>
<details>
<summary>Other MCP Clients</summary>
Other MCP clients can be configured similarly. The core configuration is:
{
"mcpServers": {
"mcp-mail-server": {
"command": "npx",
"args": ["-y", "mcp-mail-server"],
"env": {
"IMAP_HOST": "your-imap-server.com",
"IMAP_PORT": "993",
"IMAP_SECURE": "true",
"SMTP_HOST": "your-smtp-server.com",
"SMTP_PORT": "465",
"SMTP_SECURE": "true",
"EMAIL_USER": "[email protected]",
"EMAIL_PASS": "your-password"
}
}
}
}
Refer to your specific client's documentation for the appropriate configuration file location.
</details>Available Tools
| Tool | Description |
|---|---|
connect_all | Connect to both IMAP and SMTP servers |
get_connection_status | Check connection status and server info |
disconnect_all | Disconnect from all servers |
open_mailbox | Open specific mailbox/folder |
list_mailboxes | List available mail folders |
get_message_count | Get total message count in current mailbox |
get_unseen_messages | Get all unread emails |
get_recent_messages | Get recent emails |
search_by_sender | Find emails from specific sender |
search_by_subject | Search by subject keywords |
search_by_recipient | Find emails sent to specific recipient |
search_by_body | Search message body content |
search_since_date | Find emails since date |
search_unread_from_sender | Find unread emails from specific sender |
search_unreplied_from_sender | Find unreplied emails from specific sender |
search_with_keyword | Search emails by keyword/flag |
search_all_messages | Search all messages with optional date range and limit |
get_message | Retrieve email by UID |
get_messages | Retrieve multiple emails |
delete_message | Delete email by UID |
send_email | Send email via SMTP (with optional attachments) |
reply_to_email | Reply to specific email |
get_attachments | Get attachment metadata for an email |
save_attachment | Download and save attachments to local files |
Connection Management
- connect_all: No parameters required
- get_connection_status: No parameters required
- disconnect_all: No parameters required
Mailbox Operations
- open_mailbox:
mailboxName(string, default: "INBOX"),readOnly(boolean) - list_mailboxes: No parameters required
Search Operations
- search_by_sender:
sender(string, email address),startDate(string, optional),endDate(string, optional) - search_by_subject:
subject(string, keywords),startDate(string, optional),endDate(string, optional) - search_by_recipient:
recipient(string, email address),startDate(string, optional),endDate(string, optional) - search_by_body:
text(string, search text),startDate(string, optional),endDate(string, optional) - search_since_date:
date(string, date format) - search_unread_from_sender:
sender(string, email address),startDate(string, optional),endDate(string, optional) - search_unreplied_from_sender:
sender(string, email address),startDate(string, optional),endDate(string, optional),limit(number, optional) - search_with_keyword:
keyword(string, keyword),startDate(string, optional),endDate(string, optional) - search_all_messages:
startDate(string, optional),endDate(string, optional),limit(number, optional, default: 50)
Message Operations
- get_message_count: No parameters required
- get_unseen_messages: No parameters required
- get_recent_messages: No parameters required
- get_message:
uid(number),markSeen(boolean, optional) - get_messages:
uids(array),markSeen(boolean, optional) - delete_message:
uid(number)
Email Sending
- send_email:
to(string),subject(string),text(string, optional),html(string, optional),cc(string, optional),bcc(string, optional),attachments(string[], optional, absolute file paths) - reply_to_email:
originalUid(number),text(string),html(string, optional),replyToAll(boolean, optional),includeOriginal(boolean, optional)
Attachment Operations
- get_attachments:
uid(number) — Returns metadata: filename, contentType, size, index - save_attachment:
uid(number),savePath(string, absolute path),attachmentIndex(number, optional, 0-based),returnBase64(boolean, optional, default: false)
Usage Examples
Use natural language commands with your AI assistant:
Basic Operations
- "Connect to my email servers"
- "Show me all unread emails"
- "Search for emails from [email protected]"
- "Send an email to [email protected] about the meeting"
- "Reply to email with UID 123"
Advanced Searches
- "Find emails with 'urgent' in the subject from last week"
- "Show me unreplied emails from [email protected]"
- "Search emails sent to [email protected]"
- "Get all emails from the Sales folder"
- "Show unread emails from [email protected]"
- "Show me all emails from the last 7 days"
- "List all messages, limit to 20"
Email Management
- "Delete the email with UID 123"
- "Mark recent emails as read"
- "List all my email folders"
Attachment Operations
- "Show me the attachments of email UID 456"
- "Save all attachments from email UID 456 to D:/Downloads"
- "Download the first attachment from email UID 789"
- "Send an email to [email protected] with attachment D:/report.pdf"
Configuration
Environment Variables
⚠️ All variables are required
| Variable | Description | Example |
|---|---|---|
IMAP_HOST | IMAP server address | imap.gmail.com |
IMAP_PORT | IMAP port number | 993 |
IMAP_SECURE | Enable TLS | true |
SMTP_HOST | SMTP server address | smtp.gmail.com |
SMTP_PORT | SMTP port number | 465 |
SMTP_SECURE | Enable SSL | true |
EMAIL_USER | Email username | [email protected] |
EMAIL_PASS | Email password/app password | your-app-password |
Common Email Providers
<details> <summary>Gmail Configuration</FAQ
- What is the Email (IMAP/SMTP) MCP server?
- Email (IMAP/SMTP) is a Model Context Protocol (MCP) server profile on explainx.ai. MCP lets AI hosts (e.g. Claude Desktop, Cursor) call tools and resources through a standard interface; this page summarizes categories, install hints, and community ratings.
- How do MCP servers relate to agent skills?
- Skills are reusable instruction packages (often SKILL.md); MCP servers expose live capabilities. Teams frequently combine both—skills for workflows, MCP for APIs and data. See explainx.ai/skills and explainx.ai/mcp-servers for parallel directories.
- How are reviews shown for Email (IMAP/SMTP)?
- This profile displays 69 aggregated ratings (sample rows for discoverability plus signed-in user reviews). Average score is about 4.7 out of 5—verify behavior in your own environment before production use.
Use Cases▌
Extended AI Capabilities
Add new capabilities to Claude beyond text generation
Example
Access external data sources, execute code, interact with tools and services
Transform Claude from chatbot to action-taking agent
Context Enhancement
Provide Claude with access to relevant context and data
Example
Load project documentation, access knowledge bases, query databases
Get more accurate, context-aware responses
Workflow Automation
Automate multi-step workflows combining AI and external tools
Example
Research → Summarize → Create document → Send notification
Complete complex tasks end-to-end without manual steps
Implementation Guide▌
Prerequisites
- ›Claude Desktop 0.7.0+ or Cursor IDE with MCP support
- ›Basic understanding of MCP architecture and capabilities
- ›Access credentials for integrated services (if required)
- ›Willingness to experiment and iterate on configuration
Time Estimate
15-60 minutes depending on server complexity
Installation Steps
- 1.Install MCP server: npm install -g [package-name] or via GitHub
- 2.Add server configuration to ~/.claude/mcp.json
- 3.Provide required credentials and configuration
- 4.Restart Claude Desktop to load new server
- 5.Test basic functionality with simple prompts
- 6.Explore capabilities and experiment with use cases
- 7.Document successful patterns for reuse
Troubleshooting
- ⚠MCP server not loading: Check config syntax, verify installation
- ⚠Connection errors: Check network, firewall, credentials
- ⚠Feature not working: Read server docs, check required parameters
- ⚠Performance issues: Monitor resource usage, check for network latency
- ⚠Conflicts with other servers: Check port assignments, namespace collisions
Best Practices▌
✓ Do
- +Read server documentation thoroughly before setup
- +Start with simple use cases to validate functionality
- +Test in non-production environment first
- +Monitor resource usage and performance
- +Keep servers updated for bug fixes and new features
- +Document configuration for team members
- +Use environment variables for sensitive configuration
✗ Don't
- −Don't grant overly permissive access to MCP servers
- −Don't skip reading security considerations in docs
- −Don't expose sensitive data without proper controls
- −Don't run untrusted MCP servers without code review
- −Don't ignore error messages—investigate root cause
💡 Pro Tips
- ★Combine multiple MCP servers for powerful workflows
- ★Create custom MCP servers for your specific needs
- ★Share successful configurations with team
- ★Use MCP inspector for debugging
- ★Join MCP community for tips and troubleshooting
Technical Details▌
Architecture
Model Context Protocol standardizes how AI hosts (Claude, Cursor) communicate with external tools and data sources through server implementations.
Protocols
- Model Context Protocol (MCP)
- JSON-RPC 2.0
- stdio or HTTP transport
Compatibility
- Claude Desktop
- Cursor IDE
- Custom MCP clients
When to Use This▌
✓ Use When
Use when you need Claude to access external data, execute actions, or integrate with tools. Best for extending AI capabilities beyond conversation.
✗ Avoid When
Avoid when native integrations exist (use official APIs directly), for real-time critical systems, or when security/compliance requires zero external dependencies.
Integration▌
- →Tool composition: Chain multiple MCP tools in workflows
- →Context augmentation: Provide AI with relevant external data
- →Action delegation: Let AI execute tasks on external systems
- →Bidirectional sync: Keep AI context and external systems in sync
Discussion
Product Hunt–style comments (not star reviews)- No comments yet — start the thread.
List & Promote Your MCP Server
Share your MCP server with the developer community
Ratings
4.7★★★★★69 reviews- ★★★★★Lucas Reddy· Dec 24, 2024
Email (IMAP/SMTP) reduced integration guesswork — categories and install configs on the listing matched the upstream repo.
- ★★★★★Evelyn Ndlovu· Dec 20, 2024
According to our notes, Email (IMAP/SMTP) benefits from clear Model Context Protocol framing — fewer ambiguous “AI plugin” claims.
- ★★★★★Evelyn Haddad· Dec 20, 2024
Email (IMAP/SMTP) has been reliable for tool-calling workflows; the MCP profile page is a good permalink for internal docs.
- ★★★★★Aanya White· Dec 12, 2024
Email (IMAP/SMTP) is a well-scoped MCP server in the explainx.ai directory — install snippets and categories matched our Claude Code setup.
- ★★★★★Pratham Ware· Dec 8, 2024
Email (IMAP/SMTP) is among the better-indexed MCP projects we tried; the explainx.ai summary tracks the official description.
- ★★★★★Chaitanya Patil· Dec 4, 2024
Useful MCP listing: Email (IMAP/SMTP) is the kind of server we cite when onboarding engineers to host + tool permissions.
- ★★★★★Emma Reddy· Dec 4, 2024
We wired Email (IMAP/SMTP) into a staging workspace; the listing’s GitHub and npm pointers saved time versus hunting across READMEs.
- ★★★★★Piyush G· Nov 23, 2024
Email (IMAP/SMTP) reduced integration guesswork — categories and install configs on the listing matched the upstream repo.
- ★★★★★Aditi Agarwal· Nov 23, 2024
We evaluated Email (IMAP/SMTP) against two servers with overlapping tools; this profile had the clearer scope statement.
- ★★★★★Lucas Ghosh· Nov 15, 2024
Useful MCP listing: Email (IMAP/SMTP) is the kind of server we cite when onboarding engineers to host + tool permissions.
showing 1-10 of 69