SMTP) logo

SMTP)

by Email (IMAP

Manage multiple IMAP/SMTP accounts through MCP tools for reading, searching, organizing, drafting, and sending email.

Install SMTP)

Run the project’s own setup commands, in order.

Setup steps from the project

Email (IMAP/SMTP) installs with its own steps rather than a config we can generate, so these are copied as-is. Follow them in order and run the commands in a terminal. Source: github.com

  1. 1. Install
    go install github.com/boutquin/mcp-server-email/cmd/mcp-server-email@latest
    
  2. 2. Configure
    chmod 600 ~/.config/mcp-email/accounts.json
    
  3. 3. Install
    brew install boutquin/tap/mcp-server-email
    
  4. 4. Start the server
    docker run --rm \
      -e EMAIL_ACCOUNTS='[{"id":"main","email":"user@example.com","imap_host":"mail.example.com","imap_port":993,"smtp_host":"mail.example.com","smtp_port":465,"username":"user@example.com","password":"app-password"}]' \
      ghcr.io/boutquin/mcp-server-email:latest
    
  5. 5. Install
    git clone https://github.com/boutquin/mcp-server-email.git
    
  6. 6. Run
    cd mcp-server-email
    

Overview

Email (IMAP/SMTP) MCP server connects AI agents to multiple mail accounts through IMAP and SMTP. It exposes 22 tools for listing folders and messages, searching and reading mail, managing attachments, organizing messages, handling threads, and sending or drafting email. Accounts use JSON configuration with passwords or OAuth2 for supported Gmail and Outlook accounts, while common providers can be auto-detected. Reach for it when an agent needs access to remote email accounts rather than a local Mail.app mailbox.

Use cases

  • Search messages across configured mail accounts
  • Organize mail by moving, copying, flagging, or deleting messages
  • Send replies, forwards, drafts, and new messages
  • Download attachments from selected messages
  • Inspect conversation threads across mailbox folders

Key features

  • Multi-account IMAP and SMTP access
  • Message search, pagination, and threading
  • Folder and message organization
  • Reply, forward, draft, and send workflows
  • Attachment listing and downloads
  • OAuth2 support for Gmail and Outlook

Tools22

What SMTP) lets your agent do. Expand a tool for its parameters.

Self-reported~255 tokens of context

Security & health

What it can reach and how reliably it runs — from our own checks, not the maintainer’s claims.

ActiveLast checked

Recent health check succeeded.

14/14 checks healthy over the last 79d

Adoption & maintenance

Factual signals from GitHub, npm, and our automated checks — not a rating.

GitHub stars4Stargazers on the source repository.
Last commit8mo agoMost recent push to the default branch.
Tools exposed22Callable tools this server registers over MCP.

How SMTP) works

What Email (IMAP/SMTP) does

Email (IMAP/SMTP) MCP server gives an MCP client access to one or more remote mail accounts. It can inspect account connection status, enumerate folders, report unread counts, retrieve messages, search subject and body text, and read long bodies in pages. Agents can also create folders, move or copy messages, delete them, change read state, and add or remove flags.

The server covers outbound and message-composition workflows as well. It can send new messages through SMTP, save drafts, send existing drafts, reply with standard threading headers and quoted content, and forward messages with the original attachments reattached. Attachment listing and download are available by message, and thread lookup searches across common mail areas including inbox, sent, archive, and all mail.

How it works

The process connects to configured mailboxes over IMAP for retrieval and organization, and uses SMTP for sending. Multiple accounts are identified by a required account ID; tools can select an account explicitly or use the configured default. Connection pooling, operation timeouts, retry behavior, and per-account rate limits are part of the server’s runtime behavior.

For Gmail, Outlook, Yahoo, iCloud, Fastmail, and Zoho domains, omitted server addresses and ports can be inferred from the address. Explicit IMAP and SMTP settings override that inference. TLS behavior is inferred from standard ports, with configuration available to force STARTTLS or implicit TLS.

Setup and configuration

Install the Go command, Homebrew package, a release binary, Docker image, or build from source. The server communicates over a local MCP process, and the README also provides a Claude Desktop bundle. Configure accounts in a JSON file or inline through an environment variable. The file path is supplied with EMAIL_CONFIG_FILE; EMAIL_ACCOUNTS accepts the same account array as inline JSON and takes precedence when both are present.

Each account needs an ID, email address, username, and password unless OAuth2 is selected. Custom mail services also need IMAP and SMTP hosts and ports. OAuth2 device authorization is documented for Gmail and Outlook; tokens are stored locally and refreshed for later connections. Account configuration loads at startup, so edits require a restart. Protect password-containing files with restrictive permissions such as mode 600.

Optional environment settings control the default account, IMAP and SMTP timeouts, request and sending limits, attachment size limits, pool shutdown timing, and log output. EMAIL_DEBUG, LOG_LEVEL, and LOG_FORMAT adjust diagnostics.

Tools and capabilities

The 22 tools are grouped around these tasks:

  • Inspect accounts and folders, including unread and total counts.
  • List, search, retrieve, paginate, thread, and inspect messages.
  • Create folders and move, copy, delete, flag, or mark messages.
  • List and download attachments within configured size limits.
  • Reply, forward, send new messages, create drafts, and send drafts.
  • Apply batch operations to multiple messages.

Email (IMAP/SMTP) MCP server is therefore suited to assistants that need both mailbox administration and controlled outbound email, not only read-only search.

Limitations and notes

The server requires at least one of EMAIL_CONFIG_FILE or EMAIL_ACCOUNTS. Mailbox changes are not picked up until restart. OAuth2 is documented only for Gmail and Outlook, while password or app-password authentication is available through account configuration. Attachment uploads and downloads are bounded by configurable limits, and connection activity is constrained by IMAP and SMTP rate limits. Skipping TLS certificate verification is available for development or testing but weakens connection verification.

Written by AllMCPs with AI assistance from the project’s README and listing data. How we build listings

Reviews

No reviews yet — be the first to share how it worked for you.

Frequently Asked Questions about SMTP)

Email (IMAP/SMTP) is an MCP server that connects AI clients to remote email accounts over IMAP and SMTP. Its main tools list, search, read, organize, and thread messages; manage folders and attachments; and send, reply to, forward, create drafts, or send existing drafts across multiple configured accounts.

Install it with Go, Homebrew, a release binary, Docker, or a source build. The documented Go command is `go install github.com/boutquin/mcp-server-email/cmd/mcp-server-email@latest`. Then provide account configuration through `EMAIL_CONFIG_FILE` or `EMAIL_ACCOUNTS` and register the executable with your MCP client.

Configure an account with its email, username, and password or app password; Gmail and Outlook server settings can be auto-detected from the domain. OAuth2 is also supported for Gmail and Outlook through device-code authentication, using client credentials in the account JSON.

Yes, Email (IMAP/SMTP) supports Claude Desktop through the downloadable `.mcpb` bundle listed in the repository. It can also run as a standard local MCP process when configured in an MCP client, with account settings supplied through the supported environment variables.

Related MCP servers

Add a badge to your READMEShow it’s listed — live SVG, Markdown or HTML.

AllMCPs Directory Badge

Full Badge Customizer

Showcase your server listing on GitHub or your project documentation. Embed this dynamic SVG badge to highlight official listing status and live engagement.

Badge Style:
Live Dynamic SVG PreviewSMTP) AllMCPs Directory Badge
Markdown (GitHub README)
[![AllMCPs](https://allmcps.com/api/badge/email-imap-smtp?style=directory)](https://allmcps.com/mcp/email-imap-smtp)
HTML Embed
<a href="https://allmcps.com/mcp/email-imap-smtp"><img src="https://allmcps.com/api/badge/email-imap-smtp?style=directory" alt="SMTP) on AllMCPs" /></a>