Mail MCP Tool

v1.0.0Communicationstable

An MCP-based email tool that enables AI models to access email services through standardized interfaces, allowing AI assistants to perform various email operations like sending emails, reading inboxes, and handling attachments.

aiai-toolsanthropicautomationchatgpt
Share:
48
Stars
0
Downloads
0
Weekly
0/5

What is Mail MCP Tool?

Mail MCP Tool is a Model Context Protocol (MCP) server that allows AI assistants like Claude, Cursor, and VS Code to mcp-based email tool that enables ai models to access email services through standardized interfaces, allowing ai assistants to perform various email operations like sending emails, reading inboxes, a...

An MCP-based email tool that enables AI models to access email services through standardized interfaces, allowing AI assistants to perform various email operations like sending emails, reading inboxes, and handling attachments.

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

Features

  • An MCP-based email tool that enables AI models to access ema

Use Cases

Email operations across AI platforms
Attachment and inbox management
shuakami

Maintainer

LicenseMIT
Languagetypescript
Versionv1.0.0
UpdatedMay 8, 2026
Statushealthy
Maintenanceactive

Works with

ClaudeOpenAIwindowsmacoslinux

Installation

Manual Installation

npx mail-mcp-tool

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 Mail MCP Tool

Mail MCP Tool (mcp-mail) connects AI assistants to your personal or corporate email accounts via SMTP and IMAP protocols, enabling full inbox management without leaving your AI client. It supports sending text and HTML emails with attachments, reading and searching messages across folders, managing read/unread state, moving or deleting messages, and browsing contacts. Developers and power users who want to automate email workflows — drafting replies, triaging inboxes, or forwarding specific threads — will find this server the fastest path to email automation from Claude or Cursor.

Prerequisites

  • Node.js 18+ and npm installed (the bridge script also requires Python 3.8+)
  • An email account with SMTP and IMAP access enabled (Gmail, Outlook, QQ Mail, etc.)
  • SMTP and IMAP server credentials: host, port, username, and app password
  • An MCP-compatible client such as Claude Desktop or Cursor
1

Clone and install the repository

Clone the mcp-mail repository from GitHub, then install Node.js dependencies and build the TypeScript source.

git clone https://github.com/shuakami/mcp-mail.git
cd mcp-mail
npm install
npm run build
2

Gather your SMTP and IMAP credentials

You need outgoing (SMTP) and incoming (IMAP) server details. For Gmail use smtp.gmail.com:587 and imap.gmail.com:993 with an App Password. For QQ Mail use smtp.qq.com:465 and imap.qq.com:993. Never use your main account password — generate an app-specific password in your provider's security settings.

3

Configure environment variables

The server reads all credentials from environment variables. Prepare these values; you will inject them via the MCP client config. SMTP_SECURE and IMAP_SECURE accept 'true' for TLS or 'false' for STARTTLS.

SMTP_HOST=smtp.gmail.com
SMTP_PORT=587
SMTP_SECURE=false
[email protected]
SMTP_PASS=your-app-password
IMAP_HOST=imap.gmail.com
IMAP_PORT=993
IMAP_SECURE=true
[email protected]
IMAP_PASS=your-app-password
DEFAULT_FROM_NAME=Your Name
[email protected]
4

Add the server to your MCP client config

Edit your Claude Desktop or Cursor MCP config file to launch the bridging Python script with all credentials set in the env block. On macOS/Linux the config is at ~/Library/Application Support/Claude/claude_desktop_config.json.

{
  "mcpServers": {
    "mail-mcp": {
      "command": "python3",
      "args": ["/absolute/path/to/mcp-mail/bridging_mail_mcp.py"],
      "env": {
        "SMTP_HOST": "smtp.gmail.com",
        "SMTP_PORT": "587",
        "SMTP_SECURE": "false",
        "SMTP_USER": "[email protected]",
        "SMTP_PASS": "your-app-password",
        "IMAP_HOST": "imap.gmail.com",
        "IMAP_PORT": "993",
        "IMAP_SECURE": "true",
        "IMAP_USER": "[email protected]",
        "IMAP_PASS": "your-app-password",
        "DEFAULT_FROM_NAME": "Your Name",
        "DEFAULT_FROM_EMAIL": "[email protected]"
      }
    }
  }
}
5

Restart your MCP client and test

Restart Claude Desktop or Cursor so it picks up the new server configuration. Then ask the AI to list your mailbox folders as a quick connectivity test.

Mail MCP Tool Examples

Client configuration

Full Claude Desktop config for mcp-mail with Gmail credentials injected via environment variables.

{
  "mcpServers": {
    "mail-mcp": {
      "command": "python3",
      "args": ["/Users/yourname/mcp-mail/bridging_mail_mcp.py"],
      "env": {
        "SMTP_HOST": "smtp.gmail.com",
        "SMTP_PORT": "587",
        "SMTP_SECURE": "false",
        "SMTP_USER": "[email protected]",
        "SMTP_PASS": "your-app-password",
        "IMAP_HOST": "imap.gmail.com",
        "IMAP_PORT": "993",
        "IMAP_SECURE": "true",
        "IMAP_USER": "[email protected]",
        "IMAP_PASS": "your-app-password",
        "DEFAULT_FROM_NAME": "Your Name",
        "DEFAULT_FROM_EMAIL": "[email protected]"
      }
    }
  }
}

Prompts to try

Sample prompts that exercise the server's email sending, reading, search, and attachment capabilities.

- "List all my mailbox folders"
- "Show the 5 most recent unread emails in my inbox"
- "Send an email to [email protected] with the subject 'Project Update' and summarise the key points from our last conversation"
- "Search my inbox for emails containing the word 'invoice' from the last 30 days"
- "Download all attachments from the email with UID 1042"
- "Mark all emails in the Promotions folder as read"

Troubleshooting Mail MCP Tool

Authentication failed or connection refused on SMTP/IMAP

Make sure you are using an app-specific password, not your regular account password. For Gmail, enable 2FA and generate an App Password under Google Account > Security > App passwords. Also verify SMTP_PORT/IMAP_PORT and SMTP_SECURE/IMAP_SECURE match your provider's requirements.

Python not found or bridging script fails to start

Ensure Python 3.8+ is installed and accessible at the path used in the command field. On macOS run 'which python3' to find the correct path, and use that absolute path in the config. Also confirm you ran 'npm run build' after cloning.

Emails are sent but not appearing in Sent folder

Some providers (notably Gmail) do not auto-save SMTP-sent mail to the Sent folder when accessed via third-party apps. Enable 'save sent mail via IMAP' in your provider's settings, or use the tool to manually move the sent message to the Sent folder.

Frequently Asked Questions about Mail MCP Tool

What is Mail MCP Tool?

Mail MCP Tool is a Model Context Protocol (MCP) server that mcp-based email tool that enables ai models to access email services through standardized interfaces, allowing ai assistants to perform various email operations like sending emails, reading inboxes, and handling attachments. It connects AI assistants to external tools and data sources through a standardized interface.

How do I install Mail MCP Tool?

Follow the installation instructions on the Mail MCP Tool GitHub repository. Clone the repo, install dependencies, and add the server config to your AI client.

Which AI clients work with Mail MCP Tool?

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

Is Mail MCP Tool free to use?

Yes, Mail MCP Tool is open source and available under the MIT 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": { "mail-mcp-tool": { "command": "npx", "args": ["-y", "mail-mcp-tool"] } } }

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

Read the full setup guide →

Ready to use Mail MCP Tool?

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