All articles AI & agents

IMAP MCP server: connect any mailbox to Claude, and what to check first

If your email provider has no MCP server of its own, an IMAP MCP server can connect almost any mailbox to Claude. Here's how it works, what each big provider asks for at sign-in, and how little an IMAP login lets you limit.

· ·
  • imap mcp
  • email mcp server
  • AI & agents

An IMAP MCP server is a small program, usually run on your own computer, that signs in to your mailbox over IMAP and offers its contents to an AI assistant as MCP tools such as search, read and move. Many also connect to SMTP so the assistant can send. Because IMAP is a standard that almost every provider supports, one server can work with Gmail, iCloud Mail, Fastmail, your web host’s mail and most others, as long as the provider lets you sign in with a password.

Every IMAP MCP server we found, as of November 2026, is a community project, not something an email provider ships. Provider details below are from their own help pages at the same date, and they change, so check before you rely on them. If MCP is new to you, start with what MCP is, and why it matters for email.

The short version

  • It’s generic. IMAP is an open standard, defined today in RFC 9051, so one server can connect to most mailboxes.
  • It runs locally. Most IMAP MCP servers run on your machine over stdio, which suits Claude Desktop and Claude Code but not Claude on the web or on your phone.
  • The password is the whole permission. An IMAP login isn’t scoped. Whatever limits the assistant has come from the MCP server’s tools, not from the provider.
  • Sign-in varies by provider. Gmail, iCloud and Fastmail use an app password. Microsoft 365 needs OAuth, and Outlook.com is moving to OAuth only. Many IMAP servers don’t support it.
  • Check for an official server first. If your provider offers one, it usually gives you finer control than a password does.

How does an IMAP MCP server work?

Three pieces are involved:

  1. Your mailbox at your provider, reachable over IMAP for reading and over SMTP for sending. Mail clients send through the submission service described in RFC 6409.
  2. The MCP server runs on your computer, holds your login and turns mailbox actions into tools the assistant can call.
  3. Your AI client, such as Claude Desktop or Claude Code, starts the server and calls its tools when you ask for something.

The model itself runs at your AI provider. When the assistant reads a message, the text goes from your provider to the MCP server, then to the client, and from there to the AI provider.

Reading and sending are separate. A server that only speaks IMAP can search, read, move and save drafts, but it can’t send. Sending needs SMTP as well, and many projects add it. A few keep sending off unless you switch it on.

When should you use one instead of an official server?

Use an IMAP MCP server when your provider has no MCP server of its own, or when its official one doesn’t fit your account. Where an official server exists, compare it first:

  • Fastmail has an official MCP server with separate read, write and send access, so a generic IMAP server adds little there.
  • Gmail and Outlook have official options with conditions attached, covered in Gmail MCP and Outlook MCP: what’s official.
  • Proton Mail has no official server, and community projects reach it over IMAP through Proton Mail Bridge.
  • iCloud Mail, your web host’s mail, and most smaller providers have no MCP server we know of. This is where an IMAP server is the practical route.

Which sign-in does each provider need?

Most IMAP MCP servers take a username and password. Many large providers no longer accept your normal password from third-party tools, so you’ll usually create an app password first.

ProviderSign-in for an IMAP tool
GmailApp password, with 2-Step Verification on
iCloud MailApp-specific password
FastmailApp password
Outlook.comOAuth, as Microsoft is removing Basic authentication
Microsoft 365OAuth, as Microsoft has turned off Basic authentication
Proton MailBridge password, on a paid plan

Google notes that app passwords aren’t available on every account, for example work or school accounts, or accounts with Advanced Protection. For Outlook.com and Microsoft 365, you need a server that supports OAuth for IMAP, or one of the routes in our Gmail MCP and Outlook MCP article. Check the README before you install anything.

You’ll also need the server names and ports, which your provider publishes in its mail client settings. The usual pair is IMAP on port 993 and SMTP submission on port 465, both over TLS from the first byte, as RFC 8314 recommends. Some providers use port 587 with STARTTLS instead.

How do you connect an IMAP mailbox to Claude?

The details depend on the project, so follow the README of the server you choose. The general pattern is:

  1. Create an app password at your provider, as in the table above. Give it a name you’ll recognise later, such as “Claude”.
  2. Note the server settings: IMAP host and port, SMTP host and port, and your full email address as the username.
  3. Choose an MCP server. Search GitHub or an MCP directory for IMAP servers, then check it as described below.
  4. Add it to your client. For Claude Desktop, you edit its configuration file, as described in the MCP project’s guide to connecting local servers. For Claude Code, you add it with claude mcp add, as covered in Anthropic’s Claude Code MCP documentation.
  5. Pass the settings as environment variables, using the names the README gives.
  6. Restart the client and ask something read-only first, such as “list my unread mail from today”.

A Claude Desktop entry usually has this shape. The package name and variable names are placeholders, not a real project:

{
  "mcpServers": {
    "mail": {
      "command": "npx",
      "args": ["-y", "example-imap-mcp@1.2.3"],
      "env": {
        "IMAP_HOST": "imap.example.com",
        "IMAP_USER": "you@example.com",
        "IMAP_PASSWORD": "your-app-password",
        "SMTP_HOST": "smtp.example.com"
      }
    }
  }
}

Because the server runs on your computer, the assistant can reach your mail only while that computer is on and the client is open.

Can you use it in Claude on the web or on your phone?

Not directly. Custom connectors in Claude’s web and mobile apps connect to a remote MCP server over the internet, not to a program on your laptop. Some IMAP projects can run as a remote server, but then you’re hosting a service that holds a full mailbox password, and it needs proper authentication in front of it. For most people, an IMAP MCP setup is a desktop setup.

What can an IMAP login limit, and what can’t it?

Very little. IMAP has no permission levels for third-party tools: a password that can read your mail can usually also move it, delete it and, through SMTP, send as you. That’s the main difference from servers that use OAuth, where you approve a defined level of access on a consent screen.

So the server’s tool list is your only limit. Before you connect one, check these:

  • Which tools it offers. If you want search and drafts only, pick a server without send or delete tools, or one that lets you turn them off.
  • What it does with your password. Check that it connects only to your provider and stores credentials sensibly, not in a file anyone can read.
  • Whether it’s maintained. Look for recent releases, open issues and how security reports are handled.
  • A pinned version. A command such as npx -y fetches the latest release each time the client starts. Pinning a version means an update can’t change what runs without you knowing.

Use a separate app password for the assistant, so you can revoke it without touching your mail client or your main login. And remember that a server can’t stop a model from being misled by text inside an email, known as prompt injection. An assistant that can send can be steered into sending. We cover how to limit that in giving an AI assistant access to your inbox, safely.

How Lettio compares

Lettio takes a different route. Our email MCP server is part of the mail service, not a separate program holding your password. Add https://mcp.lettio.eu/mcp as a remote server, sign in with OAuth, and connect up to 10 mailboxes at once. Add it in any MCP client that supports remote servers, including Claude’s custom connectors, or use the local package instead.

  • Sending. A new connection can read, organise and draft, and you send from the card in Claude yourself. Sending on its own is something you allow when you sign in, and then only as your own address.
  • Access you can revoke. Each mailbox you connect uses a dedicated app password, so you can cut one off on its own.
  • Jurisdiction. Your mailbox is hosted on our own EU servers, under the GDPR. Your AI provider still processes whatever your agent reads.

The trade-off is that it only works with a Lettio mailbox, so you’d move your mail. Lettio isn’t end-to-end encrypted either: our servers can read your mail, because search and agents work on it.

If you’re happy with your provider, a well-chosen IMAP MCP server and a dedicated app password are a reasonable way to add an assistant. If you’d rather have the limits built into the mailbox, under EU jurisdiction, Lettio is in a closed beta and you can request access.

Closed beta

Be early to European AI email.

Lettio is in a closed beta. Tell us about your domain and we'll invite you in, with a 14-day trial that needs no card.

Request beta access