← 返回 Skills 市场
adjia

Mail Mcp

作者 AdJIa · GitHub ↗ · v0.1.0 · MIT-0
cross-platform ⚠ suspicious
317
总下载
0
收藏
0
当前安装
1
版本数
在 OpenClaw 中安装
/install mail-mcp
功能描述
自动安装并使用 mail-mcp 发送、搜索、管理邮箱邮件和文件夹,支持附件和多种邮件操作。
使用说明 (SKILL.md)

Mail MCP Skill

帮助用户使用邮件 MCP 服务,自动检查和安装 mail-mcp。

触发词

  • 发邮件
  • 收邮件
  • 查邮件
  • 邮箱
  • email
  • mail
  • SMTP
  • IMAP
  • 附件

功能

  1. 自动安装: 检查 mail-mcp 是否已安装,未安装则自动从 GitHub 安装
  2. 发送邮件: 支持纯文本、HTML、附件
  3. 搜索邮件: 按 folder、条件搜索邮件
  4. 管理文件夹: 列出、创建、删除、重命名文件夹
  5. 邮件操作: 标记已读/未读、星标、移动、复制、删除

安装检查

方式一: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": "错误描述"
}

注意事项

  1. Gmail 需要使用 App Password
  2. QQ邮箱需要在设置中开启 IMAP/SMTP 并获取授权码
  3. 附件通过 base64 编码传输
  4. 建议使用 SSL 加密连接

项目地址

https://github.com/AdJIa/mail-mcp-server

安全使用建议
This skill appears to do what it claims (install and use a mail MCP tool) but there are two things to weigh before installing: - Sensitive credentials: The runtime instructions require putting your email username/password (or other IMAP/SMTP credentials) into ~/.mcporter/mcporter.json or environment variables. The skill metadata does not declare these required secrets. Only install if you are comfortable storing credentials in that location and understand who will have access. Prefer creating a dedicated account or using App Passwords/least-privilege credentials rather than your primary mailbox password. - Installing code from GitHub: The install uses 'pip install git+https://github.com/AdJIa/mail-mcp-server.git' which will execute code from that repository on your machine. Review the repository source (and its maintainer) before installing. To reduce risk, run the install inside a Python virtual environment or sandbox, and inspect the package contents first. Recommended next steps before proceeding: 1) Inspect the GitHub repo (AdJIa/mail-mcp-server) and confirm its trustworthiness and activity. 2) Use an app-specific password or a dedicated mailbox account for automation. 3) Install in a virtualenv or isolated environment rather than system-wide; avoid '--break-system-packages'. 4) If you need stronger guarantees, ask the author to declare required env vars in metadata and provide documentation about how credentials are used/stored and whether any telemetry or external endpoints are contacted. If you want, I can fetch and summarize the GitHub repository files (setup.py/pyproject, main code) so you can better judge whether the package is safe to install.
功能分析
Type: OpenClaw Skill Name: mail-mcp Version: 0.1.0 The skill automates the installation of a third-party package directly from a GitHub repository (https://github.com/AdJIa/mail-mcp-server.git) using pip in install.sh. Furthermore, SKILL.md instructs the agent to store sensitive email credentials, including plaintext passwords, in a local configuration file (~/.mcporter/mcporter.json). While these capabilities are functional for an email management tool, the reliance on an unverified external source and the handling of high-value secrets represent significant security risks and potential for supply chain exploitation.
能力评估
Purpose & Capability
Name/description map to the provided SKILL.md: it installs mail-mcp from GitHub and provides IMAP/SMTP mail operations. No unexpected capabilities (e.g., cloud administration) are present. Minor note: the skill metadata lacks a homepage and has an unknown owner, reducing traceability.
Instruction Scope
SKILL.md instructs the agent/user to create a ~/.mcporter/mcporter.json containing IMAP/SMTP credentials (EMAIL_USER, EMAIL_PASSWORD, IMAP_HOST, SMTP_HOST, etc.). The skill metadata declares no required environment variables, yet the runtime instructions require storing and using sensitive credentials. The instructions do not explicitly exfiltrate data, but they instruct the user to place plaintext credentials in a config file and use pip to install code from a third-party GitHub repo.
Install Mechanism
No formal install spec in registry; the SKILL.md and install.sh perform 'pip install git+https://github.com/AdJIa/mail-mcp-server.git'. Installing from a GitHub repo via pip is common but executes arbitrary code from that repo. The install script uses '--break-system-packages', which can affect system package management on some distros — a moderate risk and a point to prefer virtualenv or user installs.
Credentials
Registry lists no required env vars or primary credential, yet the skill expects IMAP/SMTP credentials (including EMAIL_PASSWORD) to be provided in ~/.mcporter/mcporter.json or as env vars. This is a mismatch: sensitive secrets are needed for core functionality but are not documented as required in the skill metadata, and there's no guidance about secure storage or least-privilege credentials (e.g., app passwords).
Persistence & Privilege
always:false and default autonomous invocation are set (normal). The included install.sh does not modify other skills or system-wide agent config beyond running pip and checking a config file; it does not persistently enable itself or other skills. No evidence of elevated platform privileges.
如何使用
  1. 确保已安装 OpenClaw(本地或 Docker 部署)
  2. 在对话框中输入安装命令:/install mail-mcp
  3. 安装完成后,直接呼叫该 Skill 的名称或使用 /mail-mcp 触发
  4. 根据 Skill 的参数说明提供必要输入,即可获得结构化输出
版本历史
v0.1.0
Mail MCP Skill 0.1.0 — 首发版本 - 支持自动检查并安装 mail-mcp 邮件服务 - 实现邮件发送(文本、HTML、附件)、收件、邮件搜索和文件夹管理 - 提供常见邮箱配置及详细环境变量说明 - 支持邮件操作:标记状态、星标、移动、复制、删除等 - 全面 CLI/接口调用示例与出错返回格式说明
元数据
Slug mail-mcp
版本 0.1.0
许可证 MIT-0
累计安装 0
当前安装数 0
历史版本数 1
常见问题

Mail Mcp 是什么?

自动安装并使用 mail-mcp 发送、搜索、管理邮箱邮件和文件夹,支持附件和多种邮件操作。 它是一个面向 Claude Code / OpenClaw 的 AI Agent Skill 插件,目前累计下载 317 次。

如何安装 Mail Mcp?

在 OpenClaw 或 Claude Code 对话框中运行命令「/install mail-mcp」即可一键安装,无需额外配置。

Mail Mcp 是免费的吗?

是的,Mail Mcp 完全免费,采用 MIT-0 许可证,可自由下载、安装和使用。

Mail Mcp 支持哪些平台?

Mail Mcp 跨平台运行,可在任意部署了 OpenClaw / Claude Code 的环境中使用(cross-platform)。

谁开发了 Mail Mcp?

由 AdJIa(@adjia)开发并维护,当前版本 v0.1.0。

💬 留言讨论