ClawKit Logo
ClawKitReliability Toolkit
Back to Registry
Official Verified

Mail Mcp

Skill by adjia

skill-install — Terminal

Install via CLI (Recommended)

clawhub install openclaw/skills/skills/adjia/mail-mcp
Or

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_HOSTIMAP 服务器地址mail.qiye.aliyun.com
IMAP_PORTIMAP 端口993
EMAIL_USER邮箱账号[email protected]
EMAIL_PASSWORD邮箱密码password
IMAP_SSL启用 SSLtrue
SMTP_HOSTSMTP 服务器地址smtp.qiye.aliyun.com
SMTP_PORTSMTP 端口465
SMTP_SSL启用 SSLtrue
SMTP_STARTTLS启用 STARTTLS (端口 587)false

常见邮箱配置

邮箱IMAPSMTP备注
Gmailimap.gmail.com:993smtp.gmail.com:465需要 App Password
阿里云企业邮箱mail.qiye.aliyun.com:993smtp.qiye.aliyun.com:465
腾讯企业邮箱imap.exmail.qq.com:993smtp.exmail.qq.com:465
QQ邮箱imap.qq.com:993smtp.qq.com:465需要授权码
Outlookoutlook.office365.com:993smtp.office365.com:587STARTTLS

使用示例

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 工具列表

Metadata

Author@adjia
Stars4473
Views1
Updated2026-05-01
View Author Profile
AI Skill Finder

Not sure this is the right skill?

Describe what you want to build — we'll match you to the best skill from 16,000+ options.

Find the right skill
Add to Configuration

Paste this into your clawhub.json to enable this plugin.

{
  "plugins": {
    "official-adjia-mail-mcp": {
      "enabled": true,
      "auto_update": true
    }
  }
}
Safety NoteClawKit audits metadata but not runtime behavior. Use with caution.