# Email (IMAP/SMTP) [Health: Active]

**Category:** 💬 Communication  
**Repository:** https://github.com/boutquin/mcp-server-email  
**GitHub Stars:** 4  
**Views:** 0  
**Installs:** 0  
**Upvotes:** 0  
**Directory Page:** https://allmcps.com/mcp/email-imap-smtp

## Description
Multi-account IMAP/SMTP email server with 22 tools for reading, sending, searching, and organizing.

## Tools
Capabilities this server exposes over MCP:

- **email_accounts** — List configured accounts with connection status
- **email_folders** — List all folders with unread/total counts
- **email_folder_create** — Create new folder
- **email_list** — List messages in folder
- **email_unread** — List unread messages
- **email_search** — Search subject and body
- **email_get** — Get full message by ID
- **email_read_body** — Read email body with pagination
- **email_move** — Move message to folder
- **email_copy** — Copy message to folder
- **email_delete** — Delete message (trash or permanent expunge)
- **email_mark_read** — Mark as read/unread
- **email_flag** — Flag/unflag message
- **email_reply** — Reply to a message (sets In-Reply-To, References, quotes body)
- **email_forward** — Forward a message (re-attaches original attachments)
- **email_batch** — Batch operations on multiple messages
- **email_attachment_list** — List attachments on a message
- **email_attachment_get** — Download attachment by index
- **email_thread** — Get conversation thread (searches across INBOX, Sent, Archive, and All Mail)
- **email_send** — Send via SMTP with optional attachments
- **email_draft_create** — Save draft with optional attachments
- **email_draft_send** — Send existing draft

## Claude Desktop Quick Installation
No generated config for this server: it installs through its own setup steps.

The project's own setup steps (from https://github.com/boutquin/mcp-server-email), copied verbatim. Follow them in order; they are not an mcpServers config.

1. Install:

```sh
go install github.com/boutquin/mcp-server-email/cmd/mcp-server-email@latest
```

2. Configure:

```sh
chmod 600 ~/.config/mcp-email/accounts.json
```

3. Install:

```sh
brew install boutquin/tap/mcp-server-email
```

4. Start the server:

```sh
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. Install:

```sh
git clone https://github.com/boutquin/mcp-server-email.git
```

6. Run:

```sh
cd mcp-server-email
```

## Documentation

## 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.

_Full upstream README: https://allmcps.com/mcp/email-imap-smtp/readme_

