一个基于 MCP (Model Context Protocol) 的邮件服务,支持 LLM 发送带附件的电子邮件及在指定目录中搜索文件。提供安全的 SMTP 传输、多收件人支持和附件模式匹配搜索功能,适用于 Gmail、Outlook、Yahoo、QQ 邮箱和网易 126 邮箱等主流邮箱服务。
Config is the same across clients — only the file and path differ.
{
"mcpServers": {
"email": {
"env": {
"SENDER": "2593666979q@gmail.com",
"PASSWORD": "tuogk......."
},
"args": [
"C:\\Users\\YourUserName\\Desktop\\servers\\src\\email\\src\\mcp_server_email",
"--dir",
"C:\\Users\\YourUserName\\Desktop"
],
"command": "D:\\conda\\envs\\mcp\\python.exe"
}
}
}Are you the author?
Add this badge to your README to show your security score and help users find safe servers.
A Model Context Protocol server that provides email functionality. This server enables LLMs to compose and send emails, as well as search for attachments within specified directories.
Run this in your terminal to verify the server starts. Then let us know if it worked — your result helps other developers.
uvx 'pydantic' 2>&1 | head -1 && echo "✓ Server started successfully"
After testing, let us know if it worked:
Five weighted categories — click any category to see the underlying evidence.
Pydantic regular expression denial of service
Regular expression denial of service in Pydantic < 2.4.0, < 1.10.13 allows remote attackers to cause denial of service via a crafted email string.
PYSEC-2021-47
Pydantic is a data validation and settings management using Python type hinting. In affected versions passing either `'infinity'`, `'inf'` or `float('inf')` (or their negatives) to `datetime` or `date` fields causes validation to run forever with 100% CPU usage (on one CPU). Pydantic has been patched with fixes available in the following versions: v1.8.2, v1.7.4, v1.6.2. All these versions are available on pypi(https://pypi.org/project/pydantic/#history), and will be available on conda-forge(htt
Be the first to review
Have you used this server?
Share your experience — it helps other developers decide.
Sign in to write a review.
Others in communication
An MCP server that securely interfaces with your iMessage database via the Model Context Protocol (MCP), allowing LLMs to query and analyze iMessage conversations. It includes robust phone number validation, attachment processing, contact management, group chat handling, and full support for sending and receiving messages.
Asynchronous coordination layer for AI coding agents: identities, inboxes, searchable threads, and advisory file leases over FastMCP + Git + SQLite
MCP server for Kaseya Autotask PSA — 39 tools for companies, tickets, projects, time entries, and more
Email & SMS infrastructure for AI agents — send and receive real email and text messages programmatically
MCP Security Weekly
Get CVE alerts and security updates for Mcp Server Email and similar servers.
Start a conversation
Ask a question, share a tip, or report an issue.
Sign in to join the discussion.
A Model Context Protocol server that provides email functionality. This server enables LLMs to compose and send emails, as well as search for attachments within specified directories.
send_email - Sends emails based on the provided subject, body, and receiver.
receiver (array of strings, required): List of recipient email addressesbody (string, required): The main content of the emailsubject (string, required): The subject line of the emailattachments (array of strings or string, optional): Email attachments (filenames)search_attachments - Searches for files in a specified directory that match a given pattern.
pattern (string, required): The text pattern to search for in file namessend_email
receiver (required): The list of recipient email addressesbody (required): The main content of the emailsubject (required): The subject line of the emailattachments (optional): Email attachmentssearch_attachments
pattern (required): The text pattern to search for in file namesInstall the required dependencies:
pip install pydantic python-dotenv
An email.json file with SMTP server configurations:
[
{
"domain": "@gmail.com",
"server": "smtp.gmail.com",
"port": 587
},
{
"domain": "@outlook.com",
"server": "smtp.office365.com",
"port": 587
},
{
"domain": "@yahoo.com",
"server": "smtp.mail.yahoo.com",
"port": 587
}
]
Start the MCP Email Server with:
python -m mcp_email_server (--dir /path/to/attachment/directory)
Add to your Claude settings:
{
"mcpServers": {
"email": {
"command": "D:\\conda\\envs\\mcp\\python.exe",
"args": [
"C:\\Users\\YourUserName\\Desktop\\servers\\src\\email\\src\\mcp_server_email",
"--dir",
"C:\\Users\\YourUserName\\Desktop"
],
"env": {
"SENDER": "2593666979q@gmail.com",
"PASSWORD": "tuogk......."
}
}
}
}
{
"mcpServers": {
"email": {
"command": "uv",
"args": [
"~\\servers\\src\\email\\src\\mcp_server_email",
"--dir",
"C:\\Users\\YourUserName\\Desktop"
],
"env": {
"SENDER": "2593666979q@gmail.com",
"PASSWORD": "tuogk......."
}
}
}
}
The server supports the following attachment file types:
{
"receiver": ["recipient@example.com"],
"subject": "Test Email from MCP Server",
"body": "This is a test email sent via the MCP Email Server.",
"attachments": ["document.pdf", "image.jpg"]
}
{
"pattern": "report"
}
We encourage contributions to help expand and improve the MCP Email Server. Whether you want to add new tools, enhance existing functionality, or improve documentation, your i