MCP Mail
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.
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
Maintainer
Works with
Installation
NPM
npx -y mcp-mail-serverManual Installation
npx -y mcp-mail-serverConfiguration
Configuration Details
claude_desktop_config.json
Performance
Response Metrics
Resource Usage
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
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-serverGather 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.
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"
}
}
}
}Restart your MCP client
Fully quit and relaunch Claude Desktop or Cursor so the new server configuration is loaded and the connection is established.
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.
MCP Mail Alternatives — Similar Communication Servers
Looking for alternatives to MCP Mail? 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 MCP Mail 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 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.