← Back to Skills Marketplace
387
Downloads
0
Stars
0
Active Installs
1
Versions
Install in OpenClaw
/install mail-skill
Description
支持发送、接收和管理邮件,自动安装 mail-mcp,支持附件、邮箱文件夹操作及邮件标记功能。
README (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 加密连接
项目地址
Usage Guidance
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.
Capability Analysis
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.
Capability Assessment
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.
How to Use
- Make sure OpenClaw is installed (local or Docker)
- Run the install command in chat:
/install mail-skill - After installation, invoke the skill by name or use
/mail-skill - Provide required inputs per the skill's parameter spec and get structured output
Version History
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.
Metadata
Frequently Asked Questions
What is Mail Skill?
支持发送、接收和管理邮件,自动安装 mail-mcp,支持附件、邮箱文件夹操作及邮件标记功能。 It is an AI Agent Skill for Claude Code / OpenClaw, with 387 downloads so far.
How do I install Mail Skill?
Run "/install mail-skill" in the OpenClaw or Claude Code chat to install it in one step — no extra setup required.
Is Mail Skill free?
Yes, Mail Skill is completely free, licensed under MIT-0. You can download, install and use it at no cost.
Which platforms does Mail Skill support?
Mail Skill is cross-platform and runs anywhere OpenClaw / Claude Code is available (cross-platform).
Who created Mail Skill?
It is built and maintained by AdJIa (@adjia); the current version is v0.1.0.
More Skills