MCP server/communication

Better Email MCP Server

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

★ 3n24q02m/better-email-mcp ↗by n24q02mupdated
1

Add it to Claude Code

claude mcp add -e "EMAIL_CREDENTIALS=${EMAIL_CREDENTIALS}" better-email -- npx -y @n24q02m/better-email-mcp@latest
Required:EMAIL_CREDENTIALS+ 1 optional
2

Make your agent remember this setup

better-email's config, env vars, and the gotchas you hit — recalled in every future Claude Code, Cursor, and Codex session.

npx conare@latest

Free · one command · indexes the sessions already on disk. Set up in the browser instead →

What it does

  • Multi-account support for Gmail, Outlook, Yahoo, iCloud, and custom IMAP
  • App Password support for simplified authentication
  • 5 composite tools covering search, read, send, reply, and organization
  • Auto-discovery of provider settings based on email address
  • Thread-aware replies that maintain In-Reply-To and References headers

Tools 5

messagesSearch, read, and organize emails using actions like search, read, mark_read, mark_unread, flag, unflag, move, archive, and trash.
foldersList mailbox folders.
attachmentsList and download email attachments.
sendCompose, reply, and forward emails.
helpGet full documentation for any tool.

Environment Variables

EMAIL_CREDENTIALSrequiredEmail credentials ([email protected]:app-password), comma-separated for multi-account.
OUTLOOK_CLIENT_IDCustom Azure AD client ID for Outlook.

Try it

Search for unread emails from my boss received since last week.
Find the latest email with an attachment and download it.
Reply to the most recent email in my inbox confirming I received the document.
Move all emails with the subject 'Project Update' to the 'Work' folder.
List all folders in my primary email account.
Original README from n24q02m/better-email-mcp

Better Email MCP

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

<a href="https://glama.ai/mcp/servers/n24q02m/better-email-mcp"> </a>

Features

  • Multi-account support -- manage 6+ email accounts (Gmail, Outlook, Yahoo, iCloud, Zoho, ProtonMail, custom IMAP)
  • App Passwords -- no OAuth2 setup required for most providers; clone and run in 1 minute
  • 5 composite tools with 15 actions -- search, read, send, reply, forward, organize in single calls
  • Auto-discovery -- provider settings detected from email address, custom IMAP host supported
  • Thread-aware -- reply/forward maintains In-Reply-To and References headers
  • Tiered token optimization -- compressed descriptions + on-demand help tool + MCP Resources

Quick Start

Claude Code Plugin (Recommended)

claude plugin add n24q02m/better-email-mcp

After install, set your credentials: claude config set mcpServers.better-email-mcp.env.EMAIL_CREDENTIALS "[email protected]:app-password". See Prerequisites below for how to create App Passwords.

MCP Server

Prerequisites: Create App Passwords (NOT your regular password):

Option 1: npx
{
  "mcpServers": {
    "better-email": {
      "command": "npx",
      "args": ["-y", "@n24q02m/better-email-mcp@latest"],
      "env": {
        "EMAIL_CREDENTIALS": "[email protected]:abcd-efgh-ijkl-mnop"
      }
    }
  }
}

Other runners: bun x, pnpm dlx, yarn dlx also work.

Option 2: Docker
{
  "mcpServers": {
    "better-email": {
      "command": "docker",
      "args": [
        "run", "-i", "--rm",
        "-e", "EMAIL_CREDENTIALS",
        "n24q02m/better-email-mcp:latest"
      ],
      "env": {
        "EMAIL_CREDENTIALS": "[email protected]:abcd-efgh-ijkl-mnop"
      }
    }
  }
}

Multiple Accounts

[email protected]:pass1,[email protected]:pass2,[email protected]:pass3

Custom IMAP Host

[email protected]:password:imap.custom.com

Tools

Tool Actions Description
messages search, read, mark_read, mark_unread, flag, unflag, move, archive, trash Search, read, and organize emails
folders list List mailbox folders
attachments list, download List and download email attachments
send new, reply, forward Compose, reply, and forward emails
help - Get full documentation for any tool

Search Query Language

Query Description
UNREAD Unread emails
FLAGGED Starred emails
SINCE 2024-01-01 Emails after date
FROM [email protected] Emails from sender
SUBJECT meeting Emails matching subject
UNREAD SINCE 2024-06-01 Compound filter

Configuration

Variable Required Default Description
EMAIL_CREDENTIALS Yes - Email credentials ([email protected]:app-password, comma-separated for multi-account)
OUTLOOK_CLIENT_ID No - Custom Azure AD client ID

Frequently Asked Questions

What are the key features of Better Email MCP?

Multi-account support for Gmail, Outlook, Yahoo, iCloud, and custom IMAP. App Password support for simplified authentication. 5 composite tools covering search, read, send, reply, and organization. Auto-discovery of provider settings based on email address. Thread-aware replies that maintain In-Reply-To and References headers.

What can I use Better Email MCP for?

Automating email triage by moving specific project-related emails to dedicated folders.. Drafting and sending automated replies to routine inquiries.. Extracting and downloading attachments from incoming invoices or reports.. Managing multiple professional and personal email accounts from a single AI interface..

How do I install Better Email MCP?

Install Better Email MCP by running: npx -y @n24q02m/better-email-mcp@latest

What MCP clients work with Better Email MCP?

Better Email MCP works with any MCP-compatible client including Claude Desktop, Claude Code, Cursor, and other editors with MCP support.

Conare · memory for coding agents

Turn this server into reusable context

Keep Better Email MCP docs, env vars, and workflow notes in Conare so your agent carries them across sessions.

Set up free$npx conare@latest