Better Email

v1.0.0Communicationstable

IMAP/SMTP email server for AI agents -- 6 composite tools with multi-account and auto-discovery

ai-agentsai-codingclaudeclaude-codecursor
Share:
19
Stars
0
Downloads
0
Weekly
0/5

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

Email server for AI agents
Multi-account and auto-discovery support
n24q02m

Maintainer

LicenseMIT
Languagetypescript
Versionv1.0.0
UpdatedMay 21, 2026
Statushealthy
Maintenanceactive

Works with

ClaudeOpenAIwindowsmacoslinux

Installation

Manual Installation

npx better-email

Configuration

Configuration Details

Config File

claude_desktop_config.json

Performance

Response Metrics

Response Time< 200ms
ThroughputMedium

Resource Usage

Memory UsageLow
CPU UsageLow

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
1

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.

2

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-mcp
3

Set 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"
4

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"
      }
    }
  }
}
5

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.

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.

Quick Config Preview

{ "mcpServers": { "better-email": { "command": "npx", "args": ["-y", "better-email"] } } }

Add this to your claude_desktop_config.json or .cursor/mcp.json

Read the full setup guide →

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.

33,000+ ServersFree & Open SourceStep-by-Step Guides