Mail MCP Tool
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.
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
Maintainer
Works with
Installation
Manual Installation
npx mail-mcp-toolConfiguration
Configuration Details
claude_desktop_config.json
Performance
Response Metrics
Resource Usage
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
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 buildGather 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.
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]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]"
}
}
}
}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.
Mail MCP Tool Alternatives — Similar Communication Servers
Looking for alternatives to Mail MCP Tool? Here are other popular communication servers you can use with Claude, Cursor, and VS Code.
Slack
★ 86.1kEnables interaction with Slack workspaces through comprehensive channel management, messaging, user management, file uploads, and Block Kit formatting. Features secure credential storage via macOS Keychain and supports all major Slack operations incl
LibreChat
★ 37.3kEnhanced ChatGPT Clone: Features Agents, MCP, DeepSeek, Anthropic, AWS, OpenAI, Responses API, Azure, Groq, o1, GPT-5, Mistral, OpenRouter, Vertex AI, Gemini, Artifacts, AI model switching, message search, Code Interpreter, langchain, DALL-E-3, OpenA
Note Gen
★ 11.9kA cross-platform Markdown AI note-taking software.
DeepChat
★ 5.8k🐬DeepChat - A smart assistant that connects powerful AI to your personal world
WhatsApp MCP
★ 5.7kConnects AI assistants to the official Meta WhatsApp Cloud API for managing conversations and sending various message types through natural language. It provides tools for media management, template messages, and real-time webhook processing without
Apple
★ 3.1kEnables interaction with Apple apps like Messages, Notes, and Contacts through the MCP protocol to send messages, search, and open app content using natural language.
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.
Set Up Mail MCP Tool in Your Editor
Choose your AI client for step-by-step setup instructions.
Quick Config Preview
Add this to your claude_desktop_config.json or .cursor/mcp.json
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.