Get the FREE Ultimate OpenClaw Setup Guide →

imap-email

MCP server for Claude Code that provides email capabilities through IMAP/SMTP. Read, search, compose, and manage emails from any IMAP provider.

Installation
Run this command in your terminal to add the MCP server to Claude Code.
Run in terminal:
Command
claude mcp add --transport stdio jdickey1-imap-email-mcp npx -y imap-email-mcp \
  --env IMAP_TLS="true" \
  --env IMAP_HOST="imap.example.com" \
  --env IMAP_PORT="993" \
  --env IMAP_USER="your-email@example.com" \
  --env SMTP_HOST="imap.example.com" \
  --env SMTP_PORT="465" \
  --env SMTP_SECURE="true" \
  --env IMAP_PASSWORD="your-app-password"

How to use

IMAP Email MCP Server provides a programmable interface to read, search, compose, and manage emails from any MCP-compatible AI tool. It supports operations such as listing folders, reading emails, searching by subject or content, managing drafts, and sending emails via SMTP. The server is designed to integrate with Claude Code, Claude Desktop, Cursor, and other MCP clients; you configure your credentials and point the MCP client at the imap-email-mcp service to access your mailbox with OAuth-less app passwords where supported. Tools exposed include list_folders, list_emails, get_email, search_emails, list_drafts, get_draft, create_draft, update_draft, send_email, and delete_email, enabling end-to-end email management from natural-language prompts.

How to install

Prerequisites:

  • Node.js and npm installed on your system
  • Access to run npm or npx commands
  • An email account that supports IMAP/SMTP with app passwords if required by your provider

Minimal install (via npx):

  1. Ensure you have your IMAP/SMTP credentials ready:
    • IMAP_USER, IMAP_PASSWORD, IMAP_HOST (and optional ports/settings)
  2. Run the MCP server via npx as shown in Quick Start:
claude mcp add imap-email -s user \
  -e IMAP_USER=you@example.com \
  -e IMAP_PASSWORD='your-app-password' \
  -e IMAP_HOST=imap.example.com \
  -- npx -y imap-email-mcp

Alternative: run directly with npx (without Claude integration):

npx -y imap-email-mcp

If you prefer a local Node install:

git clone https://github.com/jdickey1/imap-email-mcp.git
cd imap-email-mcp
npm install
node index.js

Additional notes

Tips and common considerations:

  • Use app passwords where required by your email provider and store credentials in environment variables, not in code.
  • The server supports both IMAP and SMTP; ensure IMAP_HOST, IMAP_PORT, IMAP_TLS, SMTP_HOST, SMTP_PORT, and SMTP_SECURE are set according to your provider's recommendations.
  • Some providers (e.g., Gmail) may require enabling IMAP access and generating an app password; see provider docs for steps.
  • If you encounter authentication failures, verify that the IMAP_PASSWORD is correct and that the account allows IMAP connections from your client.
  • For debugging, check that IMAP_HOST and SMTP_HOST are reachable from your network and that necessary ports (993 for IMAP, 465 or 587 for SMTP) are not blocked by a firewall.
  • When using Claude Code, remember to restart the MCP toolkit after adding or updating the MCP to refresh available tools.

Related MCP Servers

Sponsor this space

Reach thousands of developers