Better Email
IMAP/SMTP email server for AI agents -- 6 composite tools with multi-account and auto-discovery
What is Better Email?
Better Email is a Model Context Protocol (MCP) server that allows AI assistants like Claude, Cursor, and VS Code to imap/smtp email server for ai agents -- 6 composite tools with multi-account and auto-discovery
IMAP/SMTP email server for AI agents -- 6 composite tools with multi-account and auto-discovery
This server falls under the Communication category on MCPgee, the world's largest MCP server directory with 33,000+ servers.
Features
- IMAP/SMTP email server for AI agents -- 6 composite tools wi
Use Cases
Maintainer
Works with
Installation
Manual Installation
npx better-emailConfiguration
Configuration Details
claude_desktop_config.json
Performance
Response Metrics
Resource Usage
How to Set Up and Use Better Email
Better Email MCP is a full-featured IMAP/SMTP email server for AI agents that lets them read, send, organize, and manage email attachments across multiple accounts simultaneously. It supports Gmail, Outlook, Yahoo, iCloud, Zoho, ProtonMail, and any custom IMAP provider, using simple App Passwords rather than requiring complex OAuth2 setup for most providers. The server exposes 7 composite tools covering 21 distinct actions — including search, read, reply, forward, folder management, and credential setup — with provider auto-discovery from email addresses. It runs in two modes: stdio for single-user local use and HTTP for multi-user deployments with OAuth 2.1, making it useful for both personal automation and team-level email agents.
Prerequisites
- Node.js 18 or higher installed
- An email account with IMAP/SMTP access enabled (Gmail, Outlook, Yahoo, iCloud, or custom IMAP)
- An App Password for your email account (required for Gmail and most providers; for Outlook in stdio mode, use an Outlook App Password from Account Settings > Security)
- An MCP client such as Claude Desktop, Claude Code, Cursor, or Windsurf
Enable IMAP and generate an App Password
For Gmail: go to Google Account > Security > 2-Step Verification > App passwords and generate one for 'Mail'. For Outlook: go to Account Settings > Security > Advanced security options > App passwords. For Yahoo/iCloud: enable IMAP and create an app-specific password in your account security settings.
Install the package
Install better-email-mcp from npm globally or use npx to run it directly without installation.
npm install -g @n24q02m/better-email-mcp
# Or run directly without installing:
npx @n24q02m/better-email-mcpSet the EMAIL_CREDENTIALS environment variable
Set EMAIL_CREDENTIALS as 'email:app-password' for a single account. For multiple accounts, use comma-separated entries. For custom IMAP hosts, append ':imap_host:imap_port' after the password.
# Single account:
export EMAIL_CREDENTIALS="[email protected]:your-app-password"
# Multiple accounts:
export EMAIL_CREDENTIALS="[email protected]:gmail-app-pass,[email protected]:outlook-app-pass"
# Custom IMAP host:
export EMAIL_CREDENTIALS="[email protected]:password:mail.company.com:993"Add the server to your MCP client configuration
Update your claude_desktop_config.json or equivalent config file to register better-email-mcp using stdio mode. The EMAIL_CREDENTIALS env var is passed directly in the config.
{
"mcpServers": {
"better-email": {
"command": "npx",
"args": ["-y", "@n24q02m/better-email-mcp"],
"env": {
"EMAIL_CREDENTIALS": "[email protected]:your-app-password"
}
}
}
}Verify the connection
Restart your MCP client and ask it to list your email folders or check for unread messages. The server will auto-discover IMAP/SMTP settings from your email address.
Better Email Examples
Client configuration
stdio mode configuration for Claude Desktop or Claude Code with a Gmail App Password.
{
"mcpServers": {
"better-email": {
"command": "npx",
"args": ["-y", "@n24q02m/better-email-mcp"],
"env": {
"EMAIL_CREDENTIALS": "[email protected]:abcd-efgh-ijkl-mnop"
}
}
}
}Prompts to try
Example prompts for reading, searching, and sending emails through the MCP server.
- "Show me my unread emails from the last 24 hours"
- "Search for emails from [email protected] about pull requests"
- "Reply to the latest email from John saying I'll review it tomorrow"
- "Send an email to [email protected] with subject 'Weekly Update' summarizing our project progress"
- "List all folders in my mailbox and show how many unread messages are in each"Troubleshooting Better Email
Authentication failure connecting to Gmail
Make sure you have 2-Step Verification enabled on your Google account and are using an App Password (not your regular password). Go to myaccount.google.com > Security > 2-Step Verification > App passwords to generate one. Also verify IMAP is enabled under Gmail Settings > See all settings > Forwarding and POP/IMAP.
Outlook connection fails in stdio mode
Outlook/Hotmail/Live accounts in stdio mode require an App Password, not a regular password. Go to account.microsoft.com > Security > Advanced security options > App passwords. Note: OAuth device-code flow is only available in HTTP mode.
Server starts but tools return IMAP errors
Check that the email address and app password in EMAIL_CREDENTIALS are correct and contain no extra spaces. If using a custom IMAP host, verify the host and port are correct (usually port 993 for IMAP over TLS). Run with DEBUG=true for detailed connection logs.
Frequently Asked Questions about Better Email
What is Better Email?
Better Email is a Model Context Protocol (MCP) server that imap/smtp email server for ai agents -- 6 composite tools with multi-account and auto-discovery It connects AI assistants to external tools and data sources through a standardized interface.
How do I install Better Email?
Follow the installation instructions on the Better Email GitHub repository. Clone the repo, install dependencies, and add the server config to your AI client.
Which AI clients work with Better Email?
Better Email works with all major MCP-compatible AI clients including Claude Desktop, Claude Code, Cursor, VS Code (GitHub Copilot), Windsurf, and Cline.
Is Better Email free to use?
Yes, Better Email is open source and available under the MIT license. You can use it freely in both personal and commercial projects.
Better Email Alternatives — Similar Communication Servers
Looking for alternatives to Better Email? Here are other popular communication servers you can use with Claude, Cursor, and VS Code.
Slack
★ 86.1kEnables interaction with Slack workspaces through comprehensive channel management, messaging, user management, file uploads, and Block Kit formatting. Features secure credential storage via macOS Keychain and supports all major Slack operations incl
LibreChat
★ 37.3kEnhanced ChatGPT Clone: Features Agents, MCP, DeepSeek, Anthropic, AWS, OpenAI, Responses API, Azure, Groq, o1, GPT-5, Mistral, OpenRouter, Vertex AI, Gemini, Artifacts, AI model switching, message search, Code Interpreter, langchain, DALL-E-3, OpenA
Note Gen
★ 11.9kA cross-platform Markdown AI note-taking software.
DeepChat
★ 5.8k🐬DeepChat - A smart assistant that connects powerful AI to your personal world
WhatsApp MCP
★ 5.7kConnects AI assistants to the official Meta WhatsApp Cloud API for managing conversations and sending various message types through natural language. It provides tools for media management, template messages, and real-time webhook processing without
Apple
★ 3.1kEnables interaction with Apple apps like Messages, Notes, and Contacts through the MCP protocol to send messages, search, and open app content using natural language.
Browse More Communication MCP Servers
Explore all communication servers available in the MCPgee directory. Each server includes setup guides for Claude, Cursor, and VS Code.
Set Up Better Email in Your Editor
Choose your AI client for step-by-step setup instructions.
Quick Config Preview
Add this to your claude_desktop_config.json or .cursor/mcp.json
Ready to use Better Email?
Browse our complete directory of 33,000+ MCP servers, read setup guides for your editor, and start building with the Model Context Protocol.