Best use case
Mail MCP Skill is best used when you need a repeatable AI agent workflow instead of a one-off prompt.
帮助用户使用邮件 MCP 服务,自动检查和安装 mail-mcp。
Teams using Mail MCP Skill should expect a more consistent output, faster repeated execution, less prompt rewriting.
When to use this skill
- You want a reusable workflow that can be run more than once with consistent structure.
When not to use this skill
- You only need a quick one-off answer and do not need a reusable workflow.
- You cannot install or maintain the underlying files, dependencies, or repository context.
Installation
Claude Code / Cursor / Codex
Manual Installation
- Download SKILL.md from GitHub
- Place it in
.claude/skills/mail-skill/SKILL.mdinside your project - Restart your AI agent — it will auto-discover the skill
How Mail MCP Skill Compares
| Feature / Agent | Mail MCP Skill | Standard Approach |
|---|---|---|
| Platform Support | Not specified | Limited / Varies |
| Context Awareness | High | Baseline |
| Installation Complexity | Unknown | N/A |
Frequently Asked Questions
What does this skill do?
帮助用户使用邮件 MCP 服务,自动检查和安装 mail-mcp。
Where can I find the source code?
You can find the source code on GitHub using the link provided at the top of the page.
Related Guides
AI Agents for Marketing
Discover AI agents for marketing workflows, from SEO and content production to campaign research, outreach, and analytics.
AI Agents for Startups
Explore AI agent skills for startup validation, product research, growth experiments, documentation, and fast execution with small teams.
AI Agents for Coding
Browse AI agent skills for coding, debugging, testing, refactoring, code review, and developer workflows across Claude, Cursor, and Codex.
SKILL.md Source
# 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-serverRelated Skills
Cold Email Writer
Writes personalized cold emails that actually get replies
email-triager
Triage, categorize, and draft responses to emails. Sorts by urgency, flags action items, and generates context-aware reply drafts.
afrexai-email-to-calendar
Extract calendar events, deadlines, action items, and follow-ups from emails. Works with any calendar provider (Google, Outlook, Apple, Notion, etc.). No external dependencies — pure agent intelligence. Use when the user forwards an email, asks to check inbox for events, or wants to extract structured scheduling data from any text.
Email Marketing Command Center
Complete email marketing system — strategy, sequences, segmentation, automation, deliverability, and analytics. Build campaigns that convert.
Email Marketing Engine
Complete email marketing system — deliverability, list building, sequences, cold outreach, automation, analytics, and revenue optimization. Zero dependencies.
email-daily-summary
Automatically logs into email accounts (Gmail, Outlook, QQ Mail, etc.) and generates daily email summaries. Use when the user wants to get a summary of their emails, check important messages, or create daily email digests.
email-summary
Fetches recent emails from Gmail and provides concise summaries. Use when the user wants to check emails, get email summaries, or review their inbox.
Skill: Gmail Auto-Reply for Client
## Purpose
Email management and automation. Send, read, search, and organize emails across multiple providers.
email-outreach-ops
Draft and manage vendor outreach emails for quotes/availability, follow-up cadence, and response summarization into structured decision tables. Use when contacting hotels, transport vendors, or activity providers.
email-triage
AI-powered email triage with calendar sync and response drafting
openmail
Gives the agent a dedicated email address for sending and receiving email. Use when the agent needs to send email to external services, receive replies, sign up for services, handle support tickets, or interact with any human institution via email.