MCP Mail

v1.2.1Communicationstable

A lightweight Model Context Protocol (MCP) server that provides IMAP and SMTP email functionality for AI assistants like Claude in Cursor IDE. Built with TypeScript and optimized for easy deployment via npm/npx.

mcpimapsmtpemailmail
Share:
31
Stars
0
Downloads
0
Weekly
0/5

What is MCP Mail?

MCP Mail is a Model Context Protocol (MCP) server that allows AI assistants like Claude, Cursor, and VS Code to lightweight model context protocol (mcp) server that provides imap and smtp email functionality for ai assistants like claude in cursor ide. built with typescript and optimized for easy deployment via...

A lightweight Model Context Protocol (MCP) server that provides IMAP and SMTP email functionality for AI assistants like Claude in Cursor IDE. Built with TypeScript and optimized for easy deployment via npm/npx.

This server falls under the Communication category on MCPgee, the world's largest MCP server directory with 33,000+ servers.

Features

  • A lightweight Model Context Protocol (MCP) server that provi

Use Cases

Access email through IMAP and SMTP functionality in Claude or Cursor IDE.
Send and retrieve emails from AI assistants using lightweight TypeScript implementation.
Integrate email workflows with LLM-powered automation.
yunfeizhu

Maintainer

LicenseMIT License
Languagetypescript
Versionv1.2.1
UpdatedMay 19, 2026
Statushealthy
Maintenanceactive

Works with

ClaudeOpenAIwindowsmacoslinux

Installation

NPM

npx -y mcp-mail-server

Manual Installation

npx -y mcp-mail-server

Configuration

Configuration Details

Config File

claude_desktop_config.json

Performance

Response Metrics

Response Time< 200ms
ThroughputMedium

Resource Usage

Memory UsageLow
CPU UsageLow

How to Set Up and Use MCP Mail

MCP Mail Server is a lightweight TypeScript MCP server that brings full IMAP and SMTP email functionality directly into AI assistants like Claude and Cursor IDE. It exposes 24 tools spanning mailbox management, multi-criteria message search, email composition, replies, and attachment handling — all accessible through natural language. Developers and power users who want to read, search, send, and manage email without leaving their AI workflow will find this a complete solution.

Prerequisites

  • Node.js 18+ installed on your system
  • An email account with IMAP and SMTP access enabled (Gmail users need an App Password with 2FA enabled)
  • IMAP and SMTP server credentials (host, port, TLS settings) for your mail provider
  • An MCP-compatible client such as Claude Desktop or Cursor IDE
1

Install the package

Install mcp-mail-server globally via npm so it can be invoked with npx from any MCP client configuration.

npm install -g mcp-mail-server
2

Gather your email credentials

You will need your IMAP host, IMAP port (typically 993 for TLS), SMTP host, SMTP port (typically 587 or 465), your email address, and your password or app-specific password. For Gmail, generate an App Password at myaccount.google.com/apppasswords with 2FA enabled.

3

Add the server to your MCP client config

Open your Claude Desktop or Cursor config file and add the mcp-mail-server entry with environment variables for all required credentials.

{
  "mcpServers": {
    "mcp-mail-server": {
      "command": "npx",
      "args": ["-y", "mcp-mail-server"],
      "env": {
        "IMAP_HOST": "imap.gmail.com",
        "IMAP_PORT": "993",
        "IMAP_SECURE": "true",
        "SMTP_HOST": "smtp.gmail.com",
        "SMTP_PORT": "587",
        "SMTP_SECURE": "false",
        "EMAIL_USER": "[email protected]",
        "EMAIL_PASS": "your-app-password"
      }
    }
  }
}
4

Restart your MCP client

Fully quit and relaunch Claude Desktop or Cursor so the new server configuration is loaded and the connection is established.

5

Verify the connection

Ask your AI assistant to connect to your mail account and list available mailboxes to confirm the server is working correctly.

MCP Mail Examples

Client configuration

Full claude_desktop_config.json entry for mcp-mail-server using Gmail credentials.

{
  "mcpServers": {
    "mcp-mail-server": {
      "command": "npx",
      "args": ["-y", "mcp-mail-server"],
      "env": {
        "IMAP_HOST": "imap.gmail.com",
        "IMAP_PORT": "993",
        "IMAP_SECURE": "true",
        "SMTP_HOST": "smtp.gmail.com",
        "SMTP_PORT": "587",
        "SMTP_SECURE": "false",
        "EMAIL_USER": "[email protected]",
        "EMAIL_PASS": "your-app-password"
      }
    }
  }
}

Prompts to try

Natural language commands you can use once the server is connected.

- "Show me all unread emails in my inbox"
- "Search for emails from [email protected] with 'invoice' in the subject"
- "Send an email to [email protected] with subject 'Meeting Notes' and summarize today's discussion"
- "Reply to the last email from my manager with a confirmation"
- "List all mailbox folders and how many messages are in each"
- "Download and save the attachment from the email with subject 'Q2 Report'"

Troubleshooting MCP Mail

Authentication failed or connection refused

For Gmail, ensure you have 2FA enabled and are using an App Password (not your regular password). For other providers, verify IMAP access is enabled in your mail account settings and double-check the IMAP_HOST, IMAP_PORT, and IMAP_SECURE values.

Server not appearing in Claude Desktop

Confirm you have fully quit and relaunched the client (not just closed the window). Check that the config JSON is valid — no trailing commas, correct nesting — by running it through a JSON validator.

Emails send but are not delivered

Verify SMTP_HOST and SMTP_PORT are correct for your provider. Port 587 requires SMTP_SECURE=false with STARTTLS; port 465 requires SMTP_SECURE=true. Check your provider's spam filters and sending limits.

Frequently Asked Questions about MCP Mail

What is MCP Mail?

MCP Mail is a Model Context Protocol (MCP) server that lightweight model context protocol (mcp) server that provides imap and smtp email functionality for ai assistants like claude in cursor ide. built with typescript and optimized for easy deployment via npm/npx. It connects AI assistants to external tools and data sources through a standardized interface.

How do I install MCP Mail?

Install via npm with the command: npx -y mcp-mail-server. Then add the server configuration to your AI client's JSON config file (e.g., claude_desktop_config.json or .cursor/mcp.json).

Which AI clients work with MCP Mail?

MCP Mail works with all major MCP-compatible AI clients including Claude Desktop, Claude Code, Cursor, VS Code (GitHub Copilot), Windsurf, and Cline.

Is MCP Mail free to use?

Yes, MCP Mail is open source and available under the MIT License license. You can use it freely in both personal and commercial projects.

Browse More Communication MCP Servers

Explore all communication servers available in the MCPgee directory. Each server includes setup guides for Claude, Cursor, and VS Code.

Quick Config Preview

{ "mcpServers": { "mcp-mail-server": { "command": "npx", "args": ["-y", "mcp-mail-server"] } } }

Add this to your claude_desktop_config.json or .cursor/mcp.json

Read the full setup guide →

Ready to use MCP Mail?

Browse our complete directory of 33,000+ MCP servers, read setup guides for your editor, and start building with the Model Context Protocol.

33,000+ ServersFree & Open SourceStep-by-Step Guides