# MCPmail **Repository Path**: Slayedxx/mcpmail ## Basic Information - **Project Name**: MCPmail - **Description**: A mail manager based on Model Context Protocal - **Primary Language**: Python - **License**: Not specified - **Default Branch**: master - **Homepage**: None - **GVP Project**: No ## Statistics - **Stars**: 0 - **Forks**: 0 - **Created**: 2025-10-15 - **Last Updated**: 2026-03-27 ## Categories & Tags **Categories**: Uncategorized **Tags**: MCP ## README # MCPmail 一个基于模型上下文协议(Model Context Protocal)轻量级的邮件集成与分析工具集合的MCP Server ## 快速开始 ### 克隆本仓库到你的本地环境 ```cmd git clone https://gitee.com/Slayedxx/mcpmail ``` ### 创建并激活虚拟环境: ```cmd python -m venv .venv .venv\Scripts\activate ``` ### 安装依赖(项目根的 `requirements.txt`): ```cmd pip install -r requirements.txt ``` ### 使用项目根的configs.yaml.exapmle文件配置你的configs.yaml: ``` llm: provider: "your_llm_name" api_key: "your_api_key" base_url: "llm_url" model: "your_llm_model" email: imap_server: "imap.example.com" imap_port: imap_port_number smtp_server: "smtp.example.com" smtp_port: smtp_port_number email_address: "your_email_address" email_password: "your_password" user_name: "Default_User_Name" ``` - config.yaml中配置的`email_password`并不是你所使用的邮件系统的登陆密码,而是该邮件系统的**认证码(或授权码)** ### 手动启动 MCP 服务(在项目根目录运行): ```cmd D:\MCPmail\.venv\Scripts\python.exe mcpserver.py ``` **同时,我们强烈建议使用如 Cherry Studio 或 Cline 等MCP客户端运行MCPmail。** ### MCP config 文件配置信息(以Cline 3.40.1为例) ``` { mcpServers{ "mcpmail": { "disabled": false, "timeout": 90, "type": "stdio", "command": "uv", "args": [ "--directory", "path/to/tour/file", "run", "mcpserver.py" ] } } } ``` ## mcptools概述 该项目的部分 MCP 工具(mcptools)如下: - 自动撰写邮件(`auto_write_email`) - 发送邮件(`email_sender`) - 获取与导出操作日志(`operation_logs`) - 邮件内容与结构分析组件(`analyze_email_content`, `comprehensive_analysis`) - 邮箱连接与邮件读取(`connect_email`, `get_recent_emails`, `get_mailboxes`, `disconnect_email`) - 垃圾邮件过滤与发件人信誉统计检测组件 (`batch_check_spam`,`mark_suspicious_sender`,`get_reputation_info`,`check_recent_emails_spam`) 所有的MCP tools和MCP Resources可以在docs目录下的Toolset.md中查看! ## 注意事项 - 运行脚本时请确保当前工作目录为项目根目录,以便 Python 能正确解析 `src` 包路径。 - 如果遇到 `ModuleNotFoundError`,可检查 `sys.path`、`__init__.py` 或使用模块运行: ```cmd .venv\Scripts\python -m src.server.mcpserver ``` ## 贡献 欢迎提出 issue 或 pull request。