Skip to main content
Glama

mcp-imap-server

MCP (Model Context Protocol) server for IMAP email access. Connect Claude to your mailbox directly.

Setup

npm install
npm run build

Related MCP server: icloud-mcp

Configuration

Copy .env.example to .env and fill in your IMAP credentials:

cp .env.example .env

Claude Desktop / Claude Code Integration

Add to your MCP config (~/.claude.json or Claude Desktop settings):

{
  "mcpServers": {
    "imap": {
      "command": "node",
      "args": ["/path/to/mcp-imap-server/dist/index.js"],
      "env": {
        "IMAP_HOST": "imap.example.com",
        "IMAP_PORT": "993",
        "IMAP_USER": "your-email",
        "IMAP_PASSWORD": "your-password"
      }
    }
  }
}

Tools

Tool

Description

list_folders

List all mailbox folders

list_messages

List recent messages in a folder

get_message

Fetch a single email by UID

search_messages

Search by subject, from, date, unseen

mark_message

Set/remove flags (read, flagged)

move_message

Move message to another folder

delete_message

Delete or trash a message

create_draft

Create a new draft email

create_reply_draft

Create a reply draft on an existing thread (preserves In-Reply-To/References)

Available Tools

9 tools
create_draftC

Create a draft email in the Drafts folder

Inputs: to (required), subject (required), body (required), cc, +1 more.

create_reply_draftB

Create a reply draft on an existing email thread. Finds the message by UID, sets In-Reply-To and References headers to keep it in the same thread.

Inputs: uid (required), body (required), folder, replyAll, +1 more.

delete_messageA

Delete a message (move to Trash or permanently delete)

Inputs: uid (required), folder, permanent.

get_messageA

Fetch a single email by UID. Returns headers and text body (prefers plain text).

Inputs: uid (required), folder.

list_foldersB

List all IMAP mailbox folders

Inputs: no named parameters.

list_messagesC

List recent messages in a folder with subject, from, date. Default folder is INBOX.

Inputs: folder, limit.

mark_messageC

Set or remove flags on a message (e.g., mark as read/unread, flag/unflag)

Inputs: uid (required), flags (required), folder, action.

move_messageC

Move a message to another folder

Inputs: uid (required), destination (required), folder.

search_messagesC

Search messages in a folder by criteria (subject, from, since date, unseen only)

Inputs: folder, subject, from, since, +2 more.

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections.

Loading tool schema changelog…

    TDQS

    A3.6/5.0

    Scored across 9 tools

    Disambiguation5/5

    Every tool has a clearly distinct purpose with no ambiguity. Tools like create_draft and create_reply_draft are closely related but serve different functions (new draft vs. reply), while others like delete_message, move_message, and mark_message each handle specific message operations without overlap.

    Naming Consistency5/5

    All tools follow a consistent verb_noun pattern with snake_case throughout (e.g., create_draft, list_folders, search_messages). There are no deviations in naming conventions, making the set predictable and readable.

    Tool Count5/5

    With 9 tools, the count is well-scoped for an IMAP email server. Each tool earns its place by covering essential email operations like listing, creating, managing, and searching messages, without being excessive or too sparse.

    Completeness5/5

    The tool set provides complete CRUD/lifecycle coverage for email management: create (drafts/replies), read (get/list/search), update (mark/move), and delete (delete_message). It covers all core workflows from folder listing to message handling with no obvious gaps.

    Related MCP Connectors

    Related MCP Servers

    • F
      license
      Not graded
      quality
      D
      maintenance
      An MCP server that enables AI models to read, search, and send emails via IMAP and SMTP protocols. It supports various providers like Gmail and Outlook, allowing for tasks such as retrieving unread messages, searching by sender, and managing mailbox folders.
      -
    • A
      license
      B
      quality
      B
      maintenance
      An MCP server that connects Claude to iCloud Mail for reading, searching, sending, and organizing emails through natural language. It supports advanced management tasks like bulk operations, mailbox organization, and automated rules for inbox maintenance.
      86
      278 npm
      MIT
    • A
      license
      Not graded
      quality
      D
      maintenance
      A secure MCP server that enables Claude to read, search, send, reply, forward, and manage Gmail messages and labels through natural language commands.
      124 npm
      1
      MIT
    • A
      license
      Not graded
      quality
      D
      maintenance
      A cross-platform MCP server that provides Claude with email access via IMAP, supporting multiple email providers and account management.
      MIT