MCP Email Server
MCP 电子邮件服务器
提供电子邮件功能的模型上下文协议 (MLM) 服务器。该服务器支持 LLM 撰写和发送电子邮件,以及在指定目录中搜索附件。
特征
向多个收件人发送电子邮件
支持电子邮件附件
根据模式匹配在目录中搜索文件
使用 SMTP 进行安全电子邮件传输
可用工具
send_email- 根据提供的主题、正文和收件人发送电子邮件。receiver(字符串数组,必需):收件人电子邮件地址列表body(字符串,必需):电子邮件的主要内容subject(字符串,必需):电子邮件的主题行attachments(字符串或字符串数组,可选):电子邮件附件(文件名)
search_attachments- 在指定目录中搜索与给定模式匹配的文件。pattern(字符串,必需):在文件名中搜索的文本模式
提示
发送电子邮件
发送带有可选附件的电子邮件
参数:
receiver(必需):接收者电子邮件地址列表body(必填):电子邮件的主要内容subject(必填):电子邮件的主题行attachments(可选):电子邮件附件
搜索附件
搜索与模式匹配的文件
参数:
pattern(必需):在文件名中搜索的文本模式
Related MCP server: MCP Mail Server
安装
使用 pip
安装所需的依赖项:
pip install pydantic python-dotenv电子邮件配置
带有 SMTP 服务器配置的email.json文件:
[
{
"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
}
]用法
运行服务器
使用以下命令启动 MCP 电子邮件服务器:
python -m mcp_email_server (--dir /path/to/attachment/directory)为 Claude.app 配置
添加到您的 Claude 设置:
康达
{
"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......."
}
}
}
}安全说明
对于 Gmail 和其他服务,您可能需要使用应用专用密码
出于安全原因,服务器仅支持有限的附件文件类型
支持的文件类型
服务器支持以下附件文件类型:
文档:doc、docx、xls、xlsx、ppt、pptx、pdf
档案:zip、rar、7z、tar、gz
文本文件:txt、log、csv、json、xml
图像:jpg、jpeg、png、gif、bmp
其他:md
示例用法
发送电子邮件
{
"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"
}贡献
我们鼓励您为扩展和改进 MCP 电子邮件服务器做出贡献。无论您是想添加新工具、增强现有功能还是改进文档,您的贡献都弥足珍贵。
有关其他 MCP 服务器和实现模式的示例,请参阅: https://github.com/modelcontextprotocol/servers
欢迎提交 Pull 请求!欢迎贡献新想法、错误修复或功能增强,让 MCP 电子邮件服务器更加强大、实用。
执照
MCP 电子邮件服务器遵循 MIT 许可证。这意味着您可以自由使用、修改和分发该软件,但须遵守 MIT 许可证的条款和条件。
This server cannot be deployed
Maintenance
Related MCP Connectors
A comprehensive Model Context Protocol (MCP) server that enables AI assistants to interact with yo…
Email infrastructure for AI agents — send, receive, search, and reply to email over MCP.
A Model Context Protocol server for Wix AI tools
Email inboxes for AI agents: send, receive, reply, search, and manage threaded email over MCP.
Related MCP Servers
- AlicenseAqualityDmaintenanceA Model Context Protocol server that provides a seamless email management interface through Claude, allowing users to search, read, and send emails directly through natural language conversations.4114MIT
- AlicenseNot gradedqualityAmaintenanceA Model Context Protocol server that enables email operations through POP3 and SMTP protocols in Cursor AI, allowing users to send, receive, list, and manage emails using natural language commands.468 npm52MIT
- AlicenseNot gradedqualityDmaintenanceA Model Context Protocol server that enables AI assistants to search, read, and send emails with attachment support through the Gmail API. It also provides tools for comprehensive label management and uses secure OAuth2 authentication for mailbox access.181 npmMIT
- AlicenseNot gradedqualityNot gradedmaintenanceA Model Context Protocol server that provides email access via IMAP and SMTP, enabling AI agents to read, search, send, and manage emails. It features specialized tools for folder management, message retrieval, and replying to threads through a standardized HTTP/SSE interface.MIT