Skip to content
MCP server

Imap MCP

MCP server that lets AI assistants save email drafts to any IMAP mailbox

Runs locally
Install

Imap MCP is an open-source MCP server for communication. It runs locally on your machine and is started by your AI client.

Pricing
Open source
Platforms
CLI, Self-hosted, API
Runs
Locally
Version
0.1.1
Listing updated

Similar MCP servers

Install

Run in a terminal

claude mcp add imap-mcp --env IMAP_HOST='<IMAP_HOST>' --env IMAP_USERNAME='<IMAP_USERNAME>' --env IMAP_PASSWORD='<IMAP_PASSWORD>' -- npx -y imap-mcp

Add to claude_desktop_config.json

{
  "mcpServers": {
    "imap-mcp": {
      "command": "npx",
      "args": [
        "-y",
        "imap-mcp"
      ],
      "env": {
        "IMAP_HOST": "<IMAP_HOST>",
        "IMAP_USERNAME": "<IMAP_USERNAME>",
        "IMAP_PASSWORD": "<IMAP_PASSWORD>"
      }
    }
  }
}

Add to ~/.cursor/mcp.json

{
  "mcpServers": {
    "imap-mcp": {
      "command": "npx",
      "args": [
        "-y",
        "imap-mcp"
      ],
      "env": {
        "IMAP_HOST": "<IMAP_HOST>",
        "IMAP_USERNAME": "<IMAP_USERNAME>",
        "IMAP_PASSWORD": "<IMAP_PASSWORD>"
      }
    }
  }
}

Add to .vscode/mcp.json

{
  "servers": {
    "imap-mcp": {
      "type": "stdio",
      "command": "npx",
      "args": [
        "-y",
        "imap-mcp"
      ],
      "env": {
        "IMAP_HOST": "<IMAP_HOST>",
        "IMAP_USERNAME": "<IMAP_USERNAME>",
        "IMAP_PASSWORD": "<IMAP_PASSWORD>"
      }
    }
  }
}

Add to ~/.codeium/windsurf/mcp_config.json

{
  "mcpServers": {
    "imap-mcp": {
      "command": "npx",
      "args": [
        "-y",
        "imap-mcp"
      ],
      "env": {
        "IMAP_HOST": "<IMAP_HOST>",
        "IMAP_USERNAME": "<IMAP_USERNAME>",
        "IMAP_PASSWORD": "<IMAP_PASSWORD>"
      }
    }
  }
}

Add to your client's MCP settings (most use this shape)

{
  "mcpServers": {
    "imap-mcp": {
      "command": "npx",
      "args": [
        "-y",
        "imap-mcp"
      ],
      "env": {
        "IMAP_HOST": "<IMAP_HOST>",
        "IMAP_USERNAME": "<IMAP_USERNAME>",
        "IMAP_PASSWORD": "<IMAP_PASSWORD>"
      }
    }
  }
}

Using several servers? Build one config file with the MCP config generator.

Configuration

  • IMAP_HOSTHostname of the IMAP server (e.g. imap.example.com)Required
  • IMAP_PORTPort of the IMAP server
  • IMAP_USERNAMEUsername for IMAP authentication, also the default From addressRequired
  • IMAP_PASSWORDPassword for IMAP authenticationRequired
  • IMAP_USE_SSLSet to true to connect over TLS

About Imap MCP

The README describes imap-mcp as a Model Context Protocol server that exposes IMAP mailbox operations to AI assistants. In its current form the only tool is create-draft, which writes a message into the Drafts folder of the configured mailbox rather than sending it, so a person can review and send it from their normal mail client.

The server runs over stdio and is configured through environment variables for host, port, username, password and whether to use TLS. The From address defaults to the IMAP username but can be overridden per call. The README notes that the draft is saved to either "INBOX.Drafts" or "Drafts", depending on the folder layout of the server.

It suits developers and users who want an assistant to prepare emails for them while keeping the final send step under their own control. The README is MIT licensed and points to a separate hosted product from the same team for users who prefer not to run a local server.

Tools this server provides (1)

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

create-draft
Creates a draft email message and saves it to the IMAP server's drafts folder.

What it does

Draft email creation
Creates a draft with recipient, subject, body and optional sender and stores it in the mailbox's Drafts folder.
Works with any IMAP server
Connects to any IMAP-compatible mail provider, with the README citing Gmail and Outlook as examples.
Environment-based credentials
Host, port, username, password and TLS setting are supplied as environment variables, with the password marked as secret.
Stdio transport
Runs as a local process launched by an MCP client through npx or node.
TypeScript source
Written in TypeScript and compiled to JavaScript before running.

Good for

  • Letting an AI assistant prepare replies that the user reviews before sending
  • Drafting outgoing messages from a script or agent workflow into an existing mailbox
  • Testing MCP email integrations against a self-hosted IMAP server

Pricing

Open source

Free and MIT licensed; a separate hosted product from the same team is linked in the README.

More servers for the same service

Imap MCP FAQ

Does the server send emails?

No. The create-draft tool saves a message to the Drafts folder, and the README does not describe a send tool.

Which mail servers can Imap MCP connect to?

Any IMAP-compatible server. The README names Gmail and Outlook as examples.

Which folder does the draft go to?

The README says it tries "INBOX.Drafts" or "Drafts", depending on the server's folder structure.

What is the license?

The README states the project is licensed under MIT.

Is Imap MCP free?

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

How do I add Imap MCP to Claude Code?

Run this command in your terminal: claude mcp add imap-mcp --env IMAP_HOST='<IMAP_HOST>' --env IMAP_USERNAME='<IMAP_USERNAME>' --env IMAP_PASSWORD='<IMAP_PASSWORD>' -- npx -y imap-mcp

What are the best alternatives to Imap MCP?

The closest alternatives to Imap MCP are mcp-mail, Lettio MCP, Thunderbird MCP, Iris and imsg-mcp.

Where this comes from

  • Description: written from the project's README and its MCP Registry entry.
  • Install steps: from the official MCP Registry entry.

How AIPoweredBot checks servers