163 Email MCP Server
Enables interaction with 163 email accounts through IMAP/SMTP protocols. Supports reading unread emails, sending text/HTML emails with attachments, and saving email attachments through natural language commands.
README
163邮箱 MCP 服务器
这是一个基于Gradio的163邮箱MCP服务器,可以作为LLM的工具,用于获取和处理电子邮件。
功能
- 获取最新的未读邮件
- 检查指定类型和数量的邮件
- 保存邮件附件
- 发送纯文本邮件
- 发送HTML格式邮件
- 发送带附件的邮件
安装依赖
使用requirements.txt安装
pip install -r requirements.txt
手动安装
pip install gradio[mcp] bs4 python-dotenv
启动服务器
直接启动
python email_mcp_server.py
使用环境变量启动
可以通过环境变量来配置邮箱账号信息:
chmod +x start_with_env.sh
./start_with_env.sh
或者手动设置环境变量:
export EMAIL_IMAP_SERVER=imap.163.com
export EMAIL_SMTP_SERVER=smtp.163.com
export EMAIL_ACCOUNT=your_email@163.com
export EMAIL_PASSWORD=your_password
python email_mcp_server.py
MCP工具
服务器提供以下MCP工具:
get_newest_email- 获取最新的未读邮件(可选覆盖参数:imap_server、account、password)check_emails- 检查指定类型和数量的邮件(可选覆盖参数:imap_server、account、password)save_attachment- 保存指定的附件(可选覆盖参数:imap_server、account、password)send_text_email- 发送纯文本邮件(可选覆盖参数:smtp_server、account、password)send_html_email- 发送HTML格式邮件(可选覆盖参数:smtp_server、account、password)send_email_with_attachment- 发送带附件的邮件(可选覆盖参数:smtp_server、account、password)
发送示例:自定义发送者账号
curl -X POST http://localhost:7860/gradio_api/mcp/run/send_text_email \
-H "Content-Type: application/json" \
-d '{
"to_addr": "someone@example.com",
"subject": "自定义发件人测试",
"content": "这是一封从自定义发件人发送的测试邮件",
"account": "your_email@163.com",
"password": "your_app_password",
"smtp_server": "smtp.163.com"
}'
读取示例:自定义接收账号
curl -X POST http://localhost:7860/gradio_api/mcp/run/get_newest_email \
-H "Content-Type: application/json" \
-d '{
"account": "your_email@163.com",
"password": "your_app_password",
"imap_server": "imap.163.com"
}'
连接到MCP客户端
MCP服务器启动后,可以通过以下URL连接:
http://localhost:7860/gradio_api/mcp/sse
Clone with HTTP
git clone https://www.modelscope.cn/studios/s3219521aa/email_mcp.git
推荐服务器
Baidu Map
百度地图核心API现已全面兼容MCP协议,是国内首家兼容MCP协议的地图服务商。
Playwright MCP Server
一个模型上下文协议服务器,它使大型语言模型能够通过结构化的可访问性快照与网页进行交互,而无需视觉模型或屏幕截图。
Magic Component Platform (MCP)
一个由人工智能驱动的工具,可以从自然语言描述生成现代化的用户界面组件,并与流行的集成开发环境(IDE)集成,从而简化用户界面开发流程。
Audiense Insights MCP Server
通过模型上下文协议启用与 Audiense Insights 账户的交互,从而促进营销洞察和受众数据的提取和分析,包括人口统计信息、行为和影响者互动。
VeyraX
一个单一的 MCP 工具,连接你所有喜爱的工具:Gmail、日历以及其他 40 多个工具。
graphlit-mcp-server
模型上下文协议 (MCP) 服务器实现了 MCP 客户端与 Graphlit 服务之间的集成。 除了网络爬取之外,还可以将任何内容(从 Slack 到 Gmail 再到播客订阅源)导入到 Graphlit 项目中,然后从 MCP 客户端检索相关内容。
Kagi MCP Server
一个 MCP 服务器,集成了 Kagi 搜索功能和 Claude AI,使 Claude 能够在回答需要最新信息的问题时执行实时网络搜索。
e2b-mcp-server
使用 MCP 通过 e2b 运行代码。
Neon MCP Server
用于与 Neon 管理 API 和数据库交互的 MCP 服务器
Exa MCP Server
模型上下文协议(MCP)服务器允许像 Claude 这样的 AI 助手使用 Exa AI 搜索 API 进行网络搜索。这种设置允许 AI 模型以安全和受控的方式获取实时的网络信息。