# IMAP MCP

> IMAP MCP is an open-source MCP server for communication. Self-hosted MCP server giving AI agents approval-gated access to any IMAP mailbox. It runs as a hosted remote server, so there is nothing to install locally.

- **Kind:** MCP server
- **Pricing:** Open source
- **Platforms:** Web, API, Self-hosted
- **Website:** https://www.harrywang.me/projects/tools/imap-mcp
- **Repository:** https://github.com/harrywang/imap-mcp
- **MCP Registry name:** io.github.harrywang/imap-mcp
- **Categories:** [communication](https://ai-powered.com/categories/communication), [productivity](https://ai-powered.com/categories/productivity)
- **Listing updated:** 2026-11-21

## About

Most mailboxes outside Gmail have no ready-made connector for AI assistants. This project runs a personal MCP server that lets clients such as Claude, ChatGPT, Cursor or VS Code search, read, organize and draft email in any account that offers IMAP access.

You deploy your own copy on Vercel with a Neon Postgres database, or run it on your own server with Docker. Mailbox passwords stay in environment variables, and each tool call connects to the mail server only for the duration of that call. Sign-in uses OAuth, and you approve each connecting app once on a consent page.

It suits people who want an AI assistant to work across several personal or work mailboxes, with replies sent from the correct address and every send requiring explicit approval in the chat.

## Features

- **Any IMAP mailbox:** Connects to any provider that supports IMAP, including mailboxes that have no native AI connector.
- **Multiple mailboxes:** Supports up to 20 mailboxes and labels each result with the mailbox it came from.
- **Attachment reading:** Opens PDFs, Word and Excel files, CSVs, text, calendar invites and images, and reports when a file cannot be read.
- **Approval-gated sending:** Saves messages as drafts and sends only the exact approved draft, with a per-hour send limit.
- **OAuth sign-in:** Clients register dynamically and receive short-lived access tokens after a one-time login and consent.
- **Draft-only mode:** Setting ALLOW_SEND to false removes the send tool so agents can only save drafts.

## Good for

- Searching and summarising unread email across several personal and work accounts
- Drafting replies in an AI chat and sending them after review
- Pulling invoices or contracts from email attachments into an AI assistant
- Organising mail by moving messages to folders or marking them read

## Tools

From the tool list in its README, going by the names, 3 of 9 tools change data. From the server's own tool labels and tool names; not verified by us.

- `list_accounts` (name suggests: reads): Configured mailboxes
- `list_folders` (name suggests: reads): Folders in a mailbox
- `search_emails` (name suggests: reads): Search by text, from, to, subject, date range, unread. Newest first.
- `read_email` (name suggests: reads): Headers, plain-text body, numbered attachment list. Doesn't mark as read.
- `read_attachment` (name suggests: reads): Opens one attachment and returns it as text or images.
- `create_draft` (name suggests: changes): Saves to Drafts, threaded when replying.
- `move_email` (name suggests: changes): Move to another folder
- `mark_read` (name suggests: reads): Mark read or unread
- `send_draft` (name suggests: changes): Sends an approved draft exactly as saved.

## FAQ

### Which AI clients can connect?

Claude, ChatGPT connectors, Cursor, VS Code and other MCP clients that support remote servers with OAuth.

### Are my emails stored on the server?

No. Each tool call connects to the mail server, does its job and disconnects. The database holds only login, OAuth clients and tokens, and rate-limit counters.

### Can the agent send email without my approval?

Messages are saved as drafts first and are sent only after you approve them in the chat. Setting ALLOW_SEND to false disables sending entirely.

### Do I need a Gmail app password?

Many providers, including Gmail, iCloud and Fastmail, require an app password for IMAP access rather than the normal account password.

### Is IMAP MCP free?

Yes. IMAP MCP is open source, so you can use and self-host it for free.

### What are the best alternatives to IMAP MCP?

The closest alternatives to IMAP MCP are mcp4mail, MailMCP, Imap MCP Server, Lettio MCP and Email MCP.

## Where this comes from

- Description: written from the project's README, the project's website and its MCP Registry entry.

## Alternatives

- [mcp4mail](https://ai-powered.com/mcp/mcp4mail): mcp4mail is an open-source MCP server for communication.
- [MailMCP](https://ai-powered.com/mcp/mailmcp-3): MailMCP is a freemium MCP server for communication.
- [Imap MCP Server](https://ai-powered.com/mcp/imap-mcp-server): Imap MCP Server is an open-source MCP server for communication.
- [Lettio MCP](https://ai-powered.com/mcp/lettio-mcp): Lettio MCP is an open-source MCP server for communication.
- [Email MCP](https://ai-powered.com/mcp/email-mcp-2): Email MCP is an open-source MCP server for communication.
- [Mailbox MCP](https://ai-powered.com/mcp/mailbox-mcp-2): Mailbox MCP is an open-source MCP server for communication.
- [mcp-mail](https://ai-powered.com/mcp/mcp-mail): mcp-mail is an open-source MCP server for communication.
- [mailmcp](https://ai-powered.com/mcp/mailmcp): mailmcp is a freemium MCP server for communication.

---
Source: https://ai-powered.com/mcp/imap-mcp-2
