Better Email MCP Server

1

Add it to Claude Code

Run this in a terminal.

Run in terminal
claude mcp add -e "EMAIL_CREDENTIALS=${EMAIL_CREDENTIALS}" better-email -- npx -y @n24q02m/better-email-mcp@latest
Required:EMAIL_CREDENTIALS+ 1 optional
README.md

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

Better Email MCP

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

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 "user@gmail.com: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": "user@gmail.com: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": "user@gmail.com:abcd-efgh-ijkl-mnop"
      }
    }
  }
}

Multiple Accounts

EMAIL_CREDENTIALS=user1@gmail.com:pass1,user2@outlook.com:pass2,user3@yahoo.com:pass3

Custom IMAP Host

EMAIL_CREDENTIALS=user@custom.com: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 boss@company.com 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 (user@gmail.com:app-password, comma-separated for multi-account)
OUTLOOK_CLIENT_ID No - Custom Azure AD client ID

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 (user@gmail.com:app-password), comma-separated for multi-account.
OUTLOOK_CLIENT_IDCustom Azure AD client ID for Outlook.

Configuration

claude_desktop_config.json
{"mcpServers": {"better-email": {"command": "npx", "args": ["-y", "@n24q02m/better-email-mcp@latest"], "env": {"EMAIL_CREDENTIALS": "user@gmail.com:abcd-efgh-ijkl-mnop"}}}}

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.

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.

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.

Need the old visual installer? Open Conare IDE.
Open Conare