Skip to content
MCP server

IMAP MCP

Self-hosted MCP server giving AI agents approval-gated access to any IMAP mailbox

IMAP MCP is an open-source MCP server for communication. It runs as a hosted remote server, so there is nothing to install locally.

Pricing
Open source
Platforms
Web, API, Self-hosted
Runs
Remotely
What it can do
Can change data (3 tools)
Version
1.0.0
Listing updated

Similar MCP servers

About IMAP MCP

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.

Tools this server provides (9)

Taken from the project documentation; the running server may differ.

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_accountsName suggests: reads
Configured mailboxes
list_foldersName suggests: reads
Folders in a mailbox
search_emailsName suggests: reads
Search by text, from, to, subject, date range, unread. Newest first.
read_emailName suggests: reads
Headers, plain-text body, numbered attachment list. Doesn't mark as read.
read_attachmentName suggests: reads
Opens one attachment and returns it as text or images.
create_draftName suggests: changes
Saves to Drafts, threaded when replying.
move_emailName suggests: changes
Move to another folder
mark_readName suggests: reads
Mark read or unread
send_draftName suggests: changes
Sends an approved draft exactly as saved.

What it does

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

Pricing

Open source

MIT-licensed and self-hosted; runs on a free Vercel account with a free Neon database.

Prices change. Check harrywang.me before you buy.

More servers for the same service

IMAP MCP 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.

How AIPoweredBot checks servers