openclaw 网盘下载
OpenClaw

技能详情(站内镜像,无评论)

首页 > 技能库 > Mail Mcp

自动安装并使用 mail-mcp 发送、搜索、管理邮箱邮件和文件夹,支持附件和多种邮件操作。

通信与消息

许可证:MIT-0

MIT-0 ·免费使用、修改和重新分发。无需归因。

版本:v0.1.0

统计:⭐ 0 · 98 · 0 current installs · 0 all-time installs

0

安装量(当前) 0

🛡 VirusTotal :可疑 · OpenClaw :可疑

Package:adjia/mail-mcp

安全扫描(ClawHub)

  • VirusTotal :可疑
  • OpenClaw :可疑

OpenClaw 评估

The skill's stated purpose (installing and using mail-mcp) matches its instructions, but it asks the user to store and use sensitive email credentials (EMAIL_PASSWORD, etc.) in a local config without declaring any required secrets and installs code directly from a GitHub repo — these mismatches and sensitive operations warrant caution.

目的

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.

说明范围

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 i…

安装机制

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.

证书

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).

持久

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.

安装(复制给龙虾 AI)

将下方整段复制到龙虾中文库对话中,由龙虾按 SKILL.md 完成安装。

请把本段交给龙虾中文库(龙虾 AI)执行:为本机安装 OpenClaw 技能「Mail Mcp」。简介:自动安装并使用 mail-mcp 发送、搜索、管理邮箱邮件和文件夹,支持附件和多种邮件操作。。
请 fetch 以下地址读取 SKILL.md 并按文档完成安装:https://raw.githubusercontent.com/openclaw/skills/refs/heads/main/skills/adjia/mail-mcp/SKILL.md
(来源:yingzhi8.cn 技能库)

SKILL.md

打开原始 SKILL.md(GitHub raw)

# Mail MCP Skill

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

## 触发词

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

## 功能

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

## 安装检查

### 方式一:pip 安装(推荐)

```bash
pip install git+https://github.com/AdJIa/mail-mcp-server.git
```

### 方式二:本地安装

```bash
git clone https://github.com/AdJIa/mail-mcp-server.git
cd mail-mcp-server
pip install -e .
```

### 验证安装

```bash
which mail-mcp
# 应输出: /home/xxx/.local/bin/mail-mcp
```

## 配置

### mcporter 配置

在 `~/.mcporter/mcporter.json` 中添加:

```json
{
  "mcpServers": {
    "mail-mcp": {
      "command": "mail-mcp",
      "env": {
        "IMAP_HOST": "your-imap-server.com",
        "IMAP_PORT": "993",
        "EMAIL_USER": "your-email@example.com",
        "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` | 邮箱账号 | `user@example.com` |
| `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 调用

```bash
# 列出文件夹
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": ["recipient@example.com"],
  "subject": "测试邮件",
  "body_text": "这是邮件内容"
}'

# 发送带附件的邮件
mcporter call mail-mcp.send_email --args '{
  "to": ["recipient@example.com"],
  "subject": "带附件的邮件",
  "body_text": "请查收附件",
  "attachments": [{
    "filename": "report.pdf",
    "content_type": "application/pdf",
    "data_base64": "JVBERi0xLjQK..."
  }]
}'
```

### 发送附件示例

```python
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` | 转发邮件 |

## 错误处理

所有工具返回结构化响应,错误格式:

```json
{
  "error": "错误描述"
}
```

## 注意事项

1. Gmail 需要使用 [App Password](https://support.google.com/accounts/answer/185833)
2. QQ邮箱需要在设置中开启 IMAP/SMTP 并获取授权码
3. 附件通过 base64 编码传输
4. 建议使用 SSL 加密连接

## 项目地址

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