# MCPEmails

Connect an agent to Gmail, Outlook, or an IMAP mailbox to search, read, organize, and send email.

- MCP server · `type=mcp` · Claude Code, Codex, Cursor, GitHub Copilot, Windsurf (Devin Desktop), Cline, Zed, Gemini CLI · ★ 13
- Author: Albretsen
- License: AGPL-3.0 · policy=link-only · description only; the file stays with the author
- Source: https://github.com/Albretsen/MCPEmails
- Updated: 2026-10-24
- HTML: https://affpapa.org/en/nevibecode/mcp/mcpemails

## What it does

MCPEmails gives Claude Code email tools through MCP. An agent can search messages, read attachments, move or flag mail, draft replies, and send messages from your address. Scheduled sending is supported too.

Messages are fetched from the provider when requested and are not stored on the server. Outlook and Microsoft 365 connect through Microsoft Graph; Gmail uses IMAP with an app password; other IMAP/SMTP mailboxes are supported. Connect a mailbox and create an API key with the permissions the agent needs. The `npx` setup requires that key.

## Requirements
- Needs: Node.js (commands run via npx)
- Remote server: `https://mcpemails.com/api/mcp`
- Environment variables: `MCPEMAILS_API_KEY` — keys and tokens: ask the human for the values, never commit them or put them in shared files.

## Install

### Claude Code (native platform)

1. **Platform CLI: remote server**
```bash
claude mcp add --transport http emails https://mcpemails.com/api/mcp
```

2. **Platform CLI**
```bash
claude mcp add --env MCPEMAILS_API_KEY=<MCPEMAILS_API_KEY> --transport stdio mcpemails -- npx -y mcpemails
```
Replace <…> with your own values

### Codex

1. **Platform CLI: remote server**
```bash
codex mcp add mcpemails --url https://mcpemails.com/api/mcp
```

2. **Platform CLI**
```bash
codex mcp add mcpemails --env MCPEMAILS_API_KEY=<MCPEMAILS_API_KEY> -- npx -y mcpemails
```
Replace <…> with your own values

### Cursor

**Config file**
File `.cursor/mcp.json`:
```json
{
    "mcpServers": {
        "mcpemails": {
            "url": "https://mcpemails.com/api/mcp"
        }
    }
}
```
File `.cursor/mcp.json`:
```json
{
    "mcpServers": {
        "mcpemails": {
            "command": "npx",
            "args": [
                "-y",
                "mcpemails"
            ],
            "env": {
                "MCPEMAILS_API_KEY": "<MCPEMAILS_API_KEY>"
            }
        }
    }
}
```
Replace <…> with your own values

### GitHub Copilot

**Config file**
File `.vscode/mcp.json`:
```json
{
    "servers": {
        "mcpemails": {
            "type": "http",
            "url": "https://mcpemails.com/api/mcp"
        }
    }
}
```
File `.vscode/mcp.json`:
```json
{
    "servers": {
        "mcpemails": {
            "type": "stdio",
            "command": "npx",
            "args": [
                "-y",
                "mcpemails"
            ],
            "env": {
                "MCPEMAILS_API_KEY": "<MCPEMAILS_API_KEY>"
            }
        }
    }
}
```
Replace <…> with your own values

### Gemini CLI

1. **Platform CLI: remote server**
```bash
gemini mcp add -t http mcpemails https://mcpemails.com/api/mcp
```

2. **Platform CLI**
```bash
gemini mcp add -e MCPEMAILS_API_KEY=<MCPEMAILS_API_KEY> mcpemails npx -y mcpemails
```
Replace <…> with your own values

## When to use it
- search a mailbox for matching messages
- read an email and its attachments
- move or flag selected messages
- send mail from a connected address
- schedule a message for later delivery

## Example prompts
- Find messages about the login failure and show who sent them.
- Read the latest email from the team and extract its attachment text.
- Draft a reply to the latest message and send it from my address.

## Similar
- [email-mcp](https://affpapa.org/en/nevibecode/mcp/marlinjai-email-mcp.md) — MCP server · ★ 26
- [mailbox-mcp](https://affpapa.org/en/nevibecode/mcp/mailbox-mcp.md) — MCP server · ★ 10
- [email-pair](https://affpapa.org/en/nevibecode/plugins/email-pair.md) — plugin · ★ 28786
- [Inbox Zero](https://affpapa.org/en/nevibecode/mcp/inbox-zero.md) — MCP server · ★ 12826
- [better-email-mcp](https://affpapa.org/en/nevibecode/mcp/better-email-mcp.md) — MCP server · ★ 35
- [your-mail-mcp](https://affpapa.org/en/nevibecode/mcp/your-mail-mcp.md) — MCP server · ★ 18

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