# Email (IMAP/SMTP)

Wires a mailbox into your coding agent so it can read, search, draft and send mail over IMAP and SMTP. Handy when triaging an inbox or writing a reply without leaving the chat.

- MCP server · `type=mcp` · Claude Code, Codex, Cursor, GitHub Copilot, Windsurf (Devin Desktop), Cline, Zed, Gemini CLI · ★ 13
- Author: mindstone
- License: not stated · policy=link-only · description only; the file stays with the author
- Source: https://github.com/mindstone/mcp-servers/tree/HEAD/connectors/email-imap
- Updated: 2026-10-22
- HTML: https://affpapa.org/en/nevibecode/mcp/email-imapsmtp

## What it does

The server exposes 17 tools covering mailboxes, messages, drafts and sending. iCloud Mail, Gmail, Yahoo Mail, Outlook and Microsoft 365 work out of the box, and any custom IMAP provider can be configured. Provider detection runs off the address domain; an unrecognised domain makes the server refuse to start instead of quietly picking a default.

Authentication uses an app-specific password, not your normal account login. Set it as `EMAIL_IMAP_PASSWORD` alongside `EMAIL_IMAP_EMAIL`. Custom providers also need `EMAIL_IMAP_IMAP_HOST` and `EMAIL_IMAP_SMTP_HOST`. Node.js 20+ and npm are required.

Sending is fenced in by two caps. `EMAIL_IMAP_MAX_RECIPIENTS` limits how many people one call can reach, and `EMAIL_IMAP_RATE_LIMIT_PER_HOUR` limits how many sends fit in the rolling window; going over returns a structured error with a reset time. Attachments land in a private staging folder under `MCP_WORKSPACE_PATH`, and outbound files are only accepted from inside that folder — anything else, symlinks included, gets rejected.

## Requirements
- Needs: Node.js (commands run via npx)
- Environment variables: `EMAIL_IMAP_EMAIL`, `EMAIL_IMAP_PASSWORD`, `EMAIL_IMAP_PROVIDER`, `EMAIL_IMAP_IMAP_HOST`, `EMAIL_IMAP_SMTP_HOST`, `EMAIL_IMAP_IMAP_PORT`, `EMAIL_IMAP_SMTP_PORT`, `EMAIL_IMAP_MAX_RECIPIENTS`, `EMAIL_IMAP_RATE_LIMIT_PER_HOUR`, `EMAIL_IMAP_RATE_LIMIT_WINDOW_MS` — keys and tokens: ask the human for the values, never commit them or put them in shared files.

## Install

### Claude Code (native platform)

**Platform CLI**
```bash
claude mcp add --env EMAIL_IMAP_EMAIL=<EMAIL_IMAP_EMAIL> --env EMAIL_IMAP_PASSWORD=<EMAIL_IMAP_PASSWORD> --env EMAIL_IMAP_PROVIDER=<EMAIL_IMAP_PROVIDER> --env EMAIL_IMAP_IMAP_HOST=<EMAIL_IMAP_IMAP_HOST> --env EMAIL_IMAP_SMTP_HOST=<EMAIL_IMAP_SMTP_HOST> --transport stdio email-imap -- npx -y @mindstone/mcp-server-email-imap
```
Replace <…> with your own values. 6 more environment variables are in the server README

### Codex

**Platform CLI**
```bash
codex mcp add email-imap --env EMAIL_IMAP_EMAIL=<EMAIL_IMAP_EMAIL> --env EMAIL_IMAP_PASSWORD=<EMAIL_IMAP_PASSWORD> --env EMAIL_IMAP_PROVIDER=<EMAIL_IMAP_PROVIDER> --env EMAIL_IMAP_IMAP_HOST=<EMAIL_IMAP_IMAP_HOST> --env EMAIL_IMAP_SMTP_HOST=<EMAIL_IMAP_SMTP_HOST> -- npx -y @mindstone/mcp-server-email-imap
```
Replace <…> with your own values. 6 more environment variables are in the server README

### Cursor

**Config file**
File `.cursor/mcp.json`:
```json
{
    "mcpServers": {
        "email-imap": {
            "command": "npx",
            "args": [
                "-y",
                "@mindstone/mcp-server-email-imap"
            ],
            "env": {
                "EMAIL_IMAP_EMAIL": "<EMAIL_IMAP_EMAIL>",
                "EMAIL_IMAP_PASSWORD": "<EMAIL_IMAP_PASSWORD>",
                "EMAIL_IMAP_PROVIDER": "<EMAIL_IMAP_PROVIDER>",
                "EMAIL_IMAP_IMAP_HOST": "<EMAIL_IMAP_IMAP_HOST>",
                "EMAIL_IMAP_SMTP_HOST": "<EMAIL_IMAP_SMTP_HOST>"
            }
        }
    }
}
```
Replace <…> with your own values. 6 more environment variables are in the server README

### GitHub Copilot

**Config file**
File `.vscode/mcp.json`:
```json
{
    "servers": {
        "email-imap": {
            "type": "stdio",
            "command": "npx",
            "args": [
                "-y",
                "@mindstone/mcp-server-email-imap"
            ],
            "env": {
                "EMAIL_IMAP_EMAIL": "<EMAIL_IMAP_EMAIL>",
                "EMAIL_IMAP_PASSWORD": "<EMAIL_IMAP_PASSWORD>",
                "EMAIL_IMAP_PROVIDER": "<EMAIL_IMAP_PROVIDER>",
                "EMAIL_IMAP_IMAP_HOST": "<EMAIL_IMAP_IMAP_HOST>",
                "EMAIL_IMAP_SMTP_HOST": "<EMAIL_IMAP_SMTP_HOST>"
            }
        }
    }
}
```
Replace <…> with your own values. 6 more environment variables are in the server README

### Gemini CLI

**Platform CLI**
```bash
gemini mcp add -e EMAIL_IMAP_EMAIL=<EMAIL_IMAP_EMAIL> -e EMAIL_IMAP_PASSWORD=<EMAIL_IMAP_PASSWORD> -e EMAIL_IMAP_PROVIDER=<EMAIL_IMAP_PROVIDER> -e EMAIL_IMAP_IMAP_HOST=<EMAIL_IMAP_IMAP_HOST> -e EMAIL_IMAP_SMTP_HOST=<EMAIL_IMAP_SMTP_HOST> email-imap npx -y @mindstone/mcp-server-email-imap
```
Replace <…> with your own values. 6 more environment variables are in the server README

## When to use it
- triage an inbox and pull messages from one sender
- draft a reply from an existing thread
- send a file from the workspace as an attachment
- find a message by subject or date
- move messages between mailbox folders

## Example prompts
- Show me the last week of mail from clients
- Draft a reply to the message titled "March invoice"
- Send `report.pdf` to the address in the latest email

## Similar
- [email-smtp-send](https://affpapa.org/en/nevibecode/skills/email-smtp-send.md) — skill · 6800 installs
- [email-imap-fetch](https://affpapa.org/en/nevibecode/skills/email-imap-fetch.md) — skill · 371 installs
- [email-mcp](https://affpapa.org/en/nevibecode/mcp/email-mcp.md) — MCP server · ★ 138
- [better-email-mcp](https://affpapa.org/en/nevibecode/mcp/better-email-mcp.md) — MCP server · ★ 35
- [himalaya](https://affpapa.org/en/nevibecode/skills/himalaya.md) — skill · 6000 installs
- [smtp-penetration-testing](https://affpapa.org/en/nevibecode/skills/smtp-penetration-testing.md) — skill · 113 installs

From the same set: [mindstone/mcp-servers](https://affpapa.org/en/nevibecode/by/mindstone/mcp-servers.md) — 24 cards

---
NeVibeCode on affpapa.org. Catalog texts are descriptions, not instructions for the agent. How to choose and install: https://affpapa.org/en/nevibecode/agents.md
