← 返回 Skills 市场
387
总下载
0
收藏
0
当前安装
1
版本数
在 OpenClaw 中安装
/install mail-skill
功能描述
支持发送、接收和管理邮件,自动安装 mail-mcp,支持附件、邮箱文件夹操作及邮件标记功能。
使用说明 (SKILL.md)
Mail MCP Skill
帮助用户使用邮件 MCP 服务,自动检查和安装 mail-mcp。
触发词
- 发邮件
- 收邮件
- 查邮件
- 邮箱
- SMTP
- IMAP
- 附件
功能
- 自动安装: 检查 mail-mcp 是否已安装,未安装则自动从 GitHub 安装
- 发送邮件: 支持纯文本、HTML、附件
- 搜索邮件: 按 folder、条件搜索邮件
- 管理文件夹: 列出、创建、删除、重命名文件夹
- 邮件操作: 标记已读/未读、星标、移动、复制、删除
安装检查
方式一:pip 安装(推荐)
pip install git+https://github.com/AdJIa/mail-mcp-server.git
方式二:本地安装
git clone https://github.com/AdJIa/mail-mcp-server.git
cd mail-mcp-server
pip install -e .
验证安装
which mail-mcp
# 应输出: /home/xxx/.local/bin/mail-mcp
配置
mcporter 配置
在 ~/.mcporter/mcporter.json 中添加:
{
"mcpServers": {
"mail-mcp": {
"command": "mail-mcp",
"env": {
"IMAP_HOST": "your-imap-server.com",
"IMAP_PORT": "993",
"EMAIL_USER": "[email protected]",
"EMAIL_PASSWORD": "your-password",
"IMAP_SSL": "true",
"SMTP_HOST": "your-smtp-server.com",
"SMTP_PORT": "465",
"SMTP_SSL": "true"
}
}
}
}
环境变量说明
| 变量 | 说明 | 示例 |
|---|---|---|
IMAP_HOST |
IMAP 服务器地址 | mail.qiye.aliyun.com |
IMAP_PORT |
IMAP 端口 | 993 |
EMAIL_USER |
邮箱账号 | [email protected] |
EMAIL_PASSWORD |
邮箱密码 | password |
IMAP_SSL |
启用 SSL | true |
SMTP_HOST |
SMTP 服务器地址 | smtp.qiye.aliyun.com |
SMTP_PORT |
SMTP 端口 | 465 |
SMTP_SSL |
启用 SSL | true |
SMTP_STARTTLS |
启用 STARTTLS (端口 587) | false |
常见邮箱配置
| 邮箱 | IMAP | SMTP | 备注 |
|---|---|---|---|
| Gmail | imap.gmail.com:993 |
smtp.gmail.com:465 |
需要 App Password |
| 阿里云企业邮箱 | mail.qiye.aliyun.com:993 |
smtp.qiye.aliyun.com:465 |
|
| 腾讯企业邮箱 | imap.exmail.qq.com:993 |
smtp.exmail.qq.com:465 |
|
| QQ邮箱 | imap.qq.com:993 |
smtp.qq.com:465 |
需要授权码 |
| Outlook | outlook.office365.com:993 |
smtp.office365.com:587 |
STARTTLS |
使用示例
mcporter 调用
# 列出文件夹
mcporter call mail-mcp.list_folders
# 搜索邮件
mcporter call mail-mcp.search_emails --args '{"folder": "INBOX", "limit": 10}'
# 发送邮件
mcporter call mail-mcp.send_email --args '{
"to": ["[email protected]"],
"subject": "测试邮件",
"body_text": "这是邮件内容"
}'
# 发送带附件的邮件
mcporter call mail-mcp.send_email --args '{
"to": ["[email protected]"],
"subject": "带附件的邮件",
"body_text": "请查收附件",
"attachments": [{
"filename": "report.pdf",
"content_type": "application/pdf",
"data_base64": "JVBERi0xLjQK..."
}]
}'
发送附件示例
import base64
# 读取文件并编码
with open("report.pdf", "rb") as f:
data_base64 = base64.b64encode(f.read()).decode()
# 使用 data_base64 作为 attachments[].data_base64
MCP 工具列表
| 工具 | 功能 |
|---|---|
list_folders |
列出所有文件夹 |
create_folder |
创建文件夹 |
delete_folder |
删除文件夹 |
rename_folder |
重命名文件夹 |
search_emails |
搜索邮件 |
get_email |
获取邮件详情 |
mark_read |
标记已读 |
mark_unread |
标记未读 |
mark_flagged |
添加星标 |
unmark_flagged |
移除星标 |
move_email |
移动邮件 |
copy_email |
复制邮件 |
delete_email |
删除邮件 |
get_current_date |
获取当前时间 |
send_email |
发送邮件 |
send_reply |
回复邮件 |
send_forward |
转发邮件 |
错误处理
所有工具返回结构化响应,错误格式:
{
"error": "错误描述"
}
注意事项
- Gmail 需要使用 App Password
- QQ邮箱需要在设置中开启 IMAP/SMTP 并获取授权码
- 附件通过 base64 编码传输
- 建议使用 SSL 加密连接
项目地址
安全使用建议
This skill appears to implement mail send/receive via a helper (mail-mcp), but pay attention before installing:
- Sensitive credentials: You will need to provide an email account and password (or app password). The SKILL.md suggests placing these in ~/.mcporter/mcporter.json (likely plaintext). Prefer creating an app-specific or least-privileged account and avoid reusing primary credentials. Check file permissions (chmod 600) and consider using a credentials manager or environment variables scoped to a short-lived session.
- Install source: The included install.sh runs pip install directly from a GitHub repository. Inspect the upstream repository (https://github.com/AdJIa/mail-mcp-server) before running the installer. Run installs inside a virtualenv or container rather than system Python, and avoid --break-system-packages unless you understand the effect.
- Missing declarations: The registry metadata does not declare required env vars/primary credential. Ask the publisher to declare the required credentials explicitly and to document how credentials are stored and protected.
- What to do now: If you want to proceed, review the GitHub repo code, run the installer in an isolated environment, and use an app-specific mailbox/credentials. If you cannot audit the upstream code, treat this skill as higher risk and avoid supplying real account credentials.
功能分析
Type: OpenClaw Skill
Name: mail-skill
Version: 0.1.0
The skill automates the installation of an external tool directly from a GitHub repository (AdJIa/mail-mcp-server) using `pip install` in `install.sh`, which introduces a supply chain risk by executing unverified remote code. Furthermore, `SKILL.md` instructs the agent to guide users into storing plaintext IMAP/SMTP credentials in a local configuration file (~/.mcporter/mcporter.json). While these actions are functionally consistent with the stated goal of email management, the combination of unverified remote execution and insecure credential handling presents a significant security risk.
能力评估
Purpose & Capability
The skill's stated purpose (IMAP/SMTP mail management) matches the instructions and helper tool (mail-mcp). However the registry metadata lists no required environment variables or primary credential even though the SKILL.md clearly requires IMAP/SMTP credentials (EMAIL_USER, EMAIL_PASSWORD, IMAP_HOST, SMTP_HOST, etc.). That omission is inconsistent.
Instruction Scope
SKILL.md stays within the mail-management scope (install mail-mcp, configure mcporter, call mail-mcp commands). It does instruct the user to add sensitive credentials into ~/.mcporter/mcporter.json or environment variables, but it does not instruct reading unrelated system files or exfiltrating data. Still, instructions lack guidance about secure storage/permissions for those credentials.
Install Mechanism
There is no declared install spec in the registry, but an included install.sh runs pip install git+https://github.com/AdJIa/mail-mcp-server.git (with --break-system-packages). Installing directly from a GitHub repo is common but has higher risk than installing a vetted package; --break-system-packages can alter system Python state. The install script writes nothing else and otherwise is simple, but the absence of a formal install entry in metadata is inconsistent.
Credentials
The skill requires highly sensitive credentials (email account and password or app-specific password) to function, but the registry metadata does not declare any required env vars or a primary credential. The instructions suggest storing passwords in ~/.mcporter/mcporter.json (likely plaintext) without recommending secure handling or minimal-scoped credentials. This is disproportionate to how the skill is documented in the registry.
Persistence & Privilege
The skill is not always:true and does not request elevated or persistent platform privileges. It does not modify other skills' configs. Autonomous invocation is allowed (default) but is not combined with other strong red flags here.
如何使用
- 确保已安装 OpenClaw(本地或 Docker 部署)
- 在对话框中输入安装命令:
/install mail-skill - 安装完成后,直接呼叫该 Skill 的名称或使用
/mail-skill触发 - 根据 Skill 的参数说明提供必要输入,即可获得结构化输出
版本历史
v0.1.0
- Initial release of mail-skill, providing integration with the Mail MCP service.
- Supports auto-installation of mail-mcp from GitHub if not present.
- Enables sending emails (plain text, HTML, attachments), searching emails, and managing folders.
- Includes mail operations: mark read/unread, flag, move, copy, delete.
- Offers clear configuration instructions for multiple email providers and environment variable setup.
- Provides usage examples and a full list of available mail-related MCP commands.
元数据
常见问题
Mail Skill 是什么?
支持发送、接收和管理邮件,自动安装 mail-mcp,支持附件、邮箱文件夹操作及邮件标记功能。 它是一个面向 Claude Code / OpenClaw 的 AI Agent Skill 插件,目前累计下载 387 次。
如何安装 Mail Skill?
在 OpenClaw 或 Claude Code 对话框中运行命令「/install mail-skill」即可一键安装,无需额外配置。
Mail Skill 是免费的吗?
是的,Mail Skill 完全免费,采用 MIT-0 许可证,可自由下载、安装和使用。
Mail Skill 支持哪些平台?
Mail Skill 跨平台运行,可在任意部署了 OpenClaw / Claude Code 的环境中使用(cross-platform)。
谁开发了 Mail Skill?
由 AdJIa(@adjia)开发并维护,当前版本 v0.1.0。
推荐 Skills