Skip to main content
Glama
io.github.p-w-4-z/inbox-mcp

io.github.p-w-4-z/inbox-mcp

by p-w-4-z

inbox-mcp

Provider-agnostic email MCP server for AI assistants. Connect any IMAP mailbox to Claude Desktop, Cursor, VS Code, or any MCP-compatible client.

Features

  • 8 email tools: get_summary, list_messages, read_message, search, list_folders, mark_read, move_message, create_folder

  • Provider auto-detection: Automatically configures Gmail, Outlook, GMX from your email address

  • Any IMAP server: Works with any standard IMAP provider out of the box

  • Read-only mode: Optional safety mode that disables all write operations

  • Security-first: No delete operations exposed. Ever.

Related MCP server: Errol-Mail

Quick Start

pip install inbox-mcp

Configuration

Set two environment variables:

export INBOX_MCP_EMAIL="you@gmail.com"
export INBOX_MCP_PASSWORD="your-app-password"

All Environment Variables

Variable

Required

Default

Description

INBOX_MCP_EMAIL

Yes

—

Your email address

INBOX_MCP_PASSWORD

Yes

—

Password or app password

INBOX_MCP_HOST

No

Auto-detected

IMAP server hostname

INBOX_MCP_PORT

No

993

IMAP port

INBOX_MCP_PROVIDER

No

Auto-detected

Force provider: gmail, outlook, gmx, generic

INBOX_MCP_READ_ONLY

No

false

Set to true to disable write operations

Provider Auto-Detection

Email Domain

Provider

IMAP Host

gmail.com, googlemail.com

gmail

imap.gmail.com

outlook.com, hotmail.com, live.com

outlook

outlook.office365.com

gmx.net, gmx.at, gmx.de, gmx.ch, gmx.com

gmx

imap.gmx.net

yahoo.com, ymail.com, rocketmail.com

yahoo

imap.mail.yahoo.com

anything else

generic

imap.{domain}

Gmail Setup

Gmail requires an App Password:

  1. Enable 2-Step Verification on your Google account

  2. Go to App Passwords

  3. Generate a password for "Mail"

  4. Use that as INBOX_MCP_PASSWORD

Client Configuration

Claude Desktop

Add to ~/Library/Application Support/Claude/claude_desktop_config.json (macOS) or %APPDATA%\Claude\claude_desktop_config.json (Windows):

{
  "mcpServers": {
    "inbox": {
      "command": "inbox-mcp",
      "env": {
        "INBOX_MCP_EMAIL": "you@gmail.com",
        "INBOX_MCP_PASSWORD": "your-app-password"
      }
    }
  }
}

Claude Code

claude mcp add -e INBOX_MCP_EMAIL=you@gmail.com -e INBOX_MCP_PASSWORD=your-app-password inbox inbox-mcp

Cursor / VS Code

Add to .cursor/mcp.json or .vscode/mcp.json:

{
  "mcpServers": {
    "inbox": {
      "command": "inbox-mcp",
      "env": {
        "INBOX_MCP_EMAIL": "you@gmail.com",
        "INBOX_MCP_PASSWORD": "your-app-password"
      }
    }
  }
}

Running Directly

# As entry point
inbox-mcp

# As module
python -m inbox_mcp

Tools

Tool

Description

Write?

get_summary

Inbox stats: total, unread, last 7 days

No

list_messages

List messages with filters (all, unread, today, week)

No

read_message

Full message body by sequence number

No

search

Search by subject or sender

No

list_folders

List all IMAP folders/labels

No

mark_read

Set messages as read

Yes

move_message

Move messages between folders

Yes

create_folder

Create a new IMAP folder

Yes

Write tools are disabled when INBOX_MCP_READ_ONLY=true.

Multiple Accounts

Run multiple instances with different names:

{
  "mcpServers": {
    "work-email": {
      "command": "inbox-mcp",
      "env": {
        "INBOX_MCP_EMAIL": "you@company.com",
        "INBOX_MCP_PASSWORD": "work-password",
        "INBOX_MCP_HOST": "mail.company.com"
      }
    },
    "personal-email": {
      "command": "inbox-mcp",
      "env": {
        "INBOX_MCP_EMAIL": "you@gmail.com",
        "INBOX_MCP_PASSWORD": "gmail-app-password"
      }
    }
  }
}

License

Dual-licensed:

If your project is open-source, you can use inbox-mcp under AGPL-3.0 at no cost. For proprietary/closed-source use, contact hello@breact.com for a commercial license.

Available Tools

8 tools
create_folderB

Create a new IMAP folder.

Args: folder_name: Name of the folder to create (e.g. 'Archive/2024')

Inputs: folder_name (required). Returns: result

get_summaryA

Get inbox statistics: total messages, unread count, and messages from the last 7 days.

Inputs: no named parameters. Returns: result

list_foldersA

List all available IMAP folders/labels in the email account.

Inputs: no named parameters. Returns: result

list_messagesA

List messages from a mailbox folder.

Args: folder: IMAP folder to read from (default: INBOX) filter: Message filter — 'all', 'unread', 'today', or 'week' (default: unread) limit: Maximum number of messages to return, up to 50 (default: 20)

Inputs: folder, filter, limit. Returns: result

mark_readA

Mark one or more messages as read (sets the IMAP Seen flag).

Args: message_ids: List of IMAP sequence numbers to mark as read folder: IMAP folder containing the messages (default: INBOX)

Inputs: message_ids (required), folder. Returns: result

move_messageA

Move one or more messages to a different folder. Creates the target folder if needed.

Args: message_ids: List of IMAP sequence numbers to move target_folder: Destination IMAP folder source_folder: Source IMAP folder (default: INBOX)

Inputs: message_ids (required), target_folder (required), source_folder. Returns: result

read_messageA

Read the full body of a specific email by its sequence number.

Args: message_id: The IMAP sequence number of the message (from list_messages) folder: IMAP folder containing the message (default: INBOX)

Inputs: message_id (required), folder. Returns: result

Tool Schema Changelog

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

Loading tool schema changelog…

    TDQS

    A4/5.0

    Scored across 8 tools

    Disambiguation5/5

    Each tool has a clearly distinct purpose: folder creation, summary stats, folder listing, message listing, marking read, moving, reading, and searching. No overlaps.

    Naming Consistency5/5

    All tool names follow a consistent verb_noun snake_case pattern (e.g., create_folder, list_messages, mark_read). 'search' is a verb but fits the pattern.

    Tool Count5/5

    8 tools cover the core inbox management operations without bloat. The count is appropriate for the domain.

    Completeness4/5

    Covers main actions: folder creation, listing, message reading, marking read, moving, searching. Missing delete/mark unread/send are minor gaps but not critical for the stated purpose.

    Related MCP Connectors

    Related MCP Servers

    • A
      license
      Not graded
      quality
      F
      maintenance
      An MCP server that receives emails on your domain and allows AI assistants to search, read, and manage them via natural language queries.
      MIT
    • A
      license
      Not graded
      quality
      D
      maintenance
      An MCP server that gives AI assistants comprehensive access to Apple Mail accounts, enabling email discovery, reading, flag management, and server-side message retrieval.
      MIT
    • F
      license
      Not graded
      quality
      D
      maintenance
      MCP server for any IMAP mailbox that lets AI models read, search, send, and manage email, including processing attachments as images.
      1
      -
    • A
      license
      Not graded
      quality
      D
      maintenance
      A self-hosted, multi-mailbox MCP server that exposes IMAP/SMTP operations as tools for AI agents, enabling email management like listing folders, reading, searching, sending, and moving messages via natural language.
      MIT