# imap-email-mcp [Health: Active]

**Category:** 💬 Communication  
**Repository:** https://github.com/jdickey1/imap-email-mcp  
**GitHub Stars:** 11  
**npm Downloads (last month):** 1051  
**Views:** 1  
**Installs:** 0  
**Upvotes:** 0  
**Directory Page:** https://allmcps.com/mcp/imap-email-mcp

## Description
MCP server for Claude Code that provides email capabilities through IMAP/SMTP. Read, search, compose, and manage emails from any IMAP provider.

## Tools
Capabilities this server exposes over MCP:

- **list_folders** — List all email folders/mailboxes in the IMAP account
- **list_emails** — List emails from a folder with optional filtering
- **get_email** — Get full email content by UID
- **search_emails** — Search emails by subject, from, or body text
- **list_drafts** — List all draft emails
- **get_draft** — Get a specific draft email by UID
- **create_draft** — Create a new draft email
- **update_draft** — Update an existing draft by deleting old and creating new
- **send_email** — Send an email directly
- **delete_email** — Delete an email by UID

## Claude Desktop Quick Installation
Install path detected from listing signals. Uses `npx` (confidence: high):

```json
"mcpServers": {
  "imap-email-mcp": {
    "command": "npx",
    "args": ["-y","imap-email-mcp"],
    "env": {
      "IMAP_USER": "",
      "IMAP_PASSWORD": "",
      "IMAP_HOST": ""
    }
  }
}
```

**Requires environment variables:** `IMAP_USER`, `IMAP_PASSWORD`, `IMAP_HOST` — the values above are empty placeholders; fill in real credentials before running (see the repository for what each one is for).

## Documentation

## What imap-email-mcp does

imap-email-mcp gives MCP-compatible AI assistants access to email accounts through standard IMAP and SMTP connections. It can inspect mailboxes, retrieve complete messages, search by subject, sender, or body text, and work across folders rather than only the inbox.

The server also supports outbound email workflows. Assistants can create, inspect, modify, and remove drafts, or send a message through SMTP. Messages can be deleted by UID. This makes the server suitable for inbox review, mailbox search, draft preparation, and controlled sending from an existing email account.

Provider support is based on standard IMAP and SMTP settings. Examples include Gmail, Outlook, Yahoo, Fastmail, and iCloud, as well as other providers that expose compatible services.

## How it works

The package runs as an MCP process and communicates with an AI client using the server command. With npm available, clients can launch it using `npx -y imap-email-mcp`; it can also be installed globally or run from a local clone.

At runtime, the server uses IMAP for mailbox and message operations and SMTP for sending. Email messages are addressed by UID for retrieval, draft updates, and deletion. Folder discovery is available through `list_folders`, while draft operations use dedicated draft tools.

Claude Code adds the server with `claude mcp add` rather than an MCP configuration file. Cursor and Claude Desktop use their respective MCP settings to launch the command and provide its environment variables. Claude Code should be restarted after adding the server so its tools become available.

## Setup and configuration

The required variables are:

- `IMAP_USER`: email account address
- `IMAP_PASSWORD`: app password for the account
- `IMAP_HOST`: IMAP server hostname

The server also accepts optional connection settings. `IMAP_PORT` defaults to `993`, and `IMAP_TLS` defaults to `true`. SMTP uses the IMAP hostname unless `SMTP_HOST` is set. Its default port is `465`, and `SMTP_SECURE` defaults to `true`. Outlook setups can use port `587` with secure SMTP disabled.

Use an app password instead of the account’s main password, and keep credentials in environment variables. When entering a password in a shell command, quote it if it contains shell-special characters.

For Claude Code, the connection can be registered with the CLI and environment variables passed using `-e`. Cursor requires a command-type MCP entry with `npx -y imap-email-mcp`, followed by the variables in its MCP settings. Claude Desktop uses the `claude_desktop_config.json` file in the platform-specific application support location.

## Tools and capabilities

Available tools include:

- `list_folders` to enumerate mailboxes
- `list_emails` to list messages with optional filtering
- `get_email` to retrieve full content by UID
- `search_emails` to search subject, sender, or body content
- `list_drafts` and `get_draft` to inspect drafts
- `create_draft` and `update_draft` to prepare or revise messages
- `send_email` to send through SMTP
- `delete_email` to remove a message by UID

The server can handle requests such as checking unread inbox mail, finding messages from a particular sender, creating a meeting-related draft, or viewing the drafts folder.

## Limitations and notes

Mailbox folder names differ between providers. Draft discovery checks common names such as `Drafts`, `INBOX.Drafts`, and `[Gmail]/Drafts`, but providers may use another name. Authentication requires IMAP access to be enabled and a valid app password. Network access to the configured IMAP and SMTP ports must also be available.

Because `send_email` sends directly, review messages with `create_draft` first when approval is needed. The project is distributed under the MIT license.

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

