Gmail MCP

使用 Gmail MCP 发送邮件,支持从本地工作目录发送附件

5 stars

Best use case

Gmail MCP is best used when you need a repeatable AI agent workflow instead of a one-off prompt.

使用 Gmail MCP 发送邮件,支持从本地工作目录发送附件

Teams using Gmail MCP 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

$curl -o ~/.claude/skills/gmail-mcp/SKILL.md --create-dirs "https://raw.githubusercontent.com/RayLee1997/Shared-Workspace/main/.agent/skills/gmail-mcp/SKILL.md"

Manual Installation

  1. Download SKILL.md from GitHub
  2. Place it in .claude/skills/gmail-mcp/SKILL.md inside your project
  3. Restart your AI agent — it will auto-discover the skill

How Gmail MCP Compares

Feature / AgentGmail MCPStandard Approach
Platform SupportNot specifiedLimited / Varies
Context Awareness High Baseline
Installation ComplexityUnknownN/A

Frequently Asked Questions

What does this skill do?

使用 Gmail 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.

SKILL.md Source

# Gmail MCP Skill

使用 GongRzhe/Gmail-MCP-Server 发送邮件,支持附件功能。

## 前置条件

确保已完成 OAuth 配置,参考:[发送邮件mcp工具.md](file:///Users/ray/Obsidian/05_Technology/Anthropic/MCP/%E5%8F%91%E9%80%81%E9%82%AE%E4%BB%B6mcp%E5%B7%A5%E5%85%B7.md)

---

## 发送邮件(带附件)

### 1. 确认附件存在

发送附件前,先确认文件存在:

```bash
ls -la <附件绝对路径>
```

### 2. 调用 send_email

参数格式:

```json
{
  "to": ["recipient@example.com"],
  "subject": "邮件主题",
  "body": "邮件正文",
  "cc": ["cc@example.com"],
  "bcc": ["bcc@example.com"],
  "mimeType": "text/plain",
  "attachments": ["/absolute/path/to/file.pdf"]
}
```

### 参数说明

| 参数 | 类型 | 必填 | 说明 |
|------|------|:----:|------|
| `to` | string[] | ✅ | 收件人列表 |
| `subject` | string | ✅ | 邮件主题 |
| `body` | string | ✅ | 邮件正文 |
| `cc` | string[] | | 抄送列表 |
| `bcc` | string[] | | 密送列表 |
| `mimeType` | string | | `text/plain` / `text/html` / `multipart/alternative` |
| `htmlBody` | string | | HTML 正文(multipart 时使用) |
| `attachments` | string[] | | 附件**绝对路径**列表 |

---

## 常见场景

### 场景 1:发送工作目录中的文件

```
用户:把 report.pdf 发给 boss@company.com

执行步骤:
1. find_by_name 搜索 "report.pdf"
2. 确认绝对路径如 /Users/ray/Projects/report.pdf
3. 调用 send_email:
   {
     "to": ["boss@company.com"],
     "subject": "今日报告",
     "body": "请查收附件",
     "attachments": ["/Users/ray/Projects/report.pdf"]
   }
```

### 场景 2:发送 HTML 邮件

```json
{
  "to": ["marketing@example.com"],
  "subject": "季度报告",
  "mimeType": "text/html",
  "body": "<h1>Q4 报告</h1><p>详见附件</p>",
  "attachments": ["/Users/ray/Documents/Q4_Report.pdf"]
}
```

---

## 其他常用工具

### 搜索邮件

```json
{"tool": "search_emails", "arguments": {"query": "from:sender@example.com", "maxResults": 10}}
```

### 读取邮件

```json
{"tool": "read_email", "arguments": {"messageId": "182ab45cd67ef"}}
```

### 下载附件

```json
{"tool": "download_attachment", "arguments": {"messageId": "182ab45cd67ef", "attachmentId": "ANGjdJ9...", "savePath": "/Users/ray/Downloads"}}
```

Related Skills

imf-data

5
from RayLee1997/Shared-Workspace

使用 IMF Data MCP 工具查询全球宏观经济数据,进行跨国对比、趋势追踪和风险评估。 覆盖 8 大核心数据集(IFS/BOP/DOT/FSI/GFS/MFS/CDIS/CPIS),190 个成员国, 支持 GDP、CPI、汇率、国际收支、贸易、金融稳健性等全维度宏观指标查询。 适用于:宏观经济分析、国家风险评估、贸易结构分析、货币政策追踪、投资宏观研判。 当用户提及"GDP、CPI、汇率、贸易、国际收支、宏观经济、IMF、通胀、利率、外汇储备"时触发。

web-research

5
from RayLee1997/Shared-Workspace

使用 Brave Search MCP 工具联网检索,引用来源,再基于证据推理回答。适用于需要最新信息、事实核查、引用来源的场景。

us-stock-analysis

5
from RayLee1997/Shared-Workspace

美股个股深度分析技能。拆解用户意图,通过 Brave Search MCP 检索公司公开资料、重大新闻、 过去4个季度的财报电话会议纪要(含CEO Q&A解读),结合 EdgarTools MCP 获取 SEC 监管文件, 并通过 Yahoo Finance MCP 获取实时行情、机构持仓、分析师评级等市场数据, 输出长篇深度分析报告,包含季度关键业务数据表格、财务健康评估、业务基本面分析、 股价走势综合分析和投资洞察。 适用于:个股研究、财报解读、公司尽调、投资决策支持。

mermaid-chart

5
from RayLee1997/Shared-Workspace

生成美观的 Mermaid 图表,采用治愈梦幻风 (Healing Dream) 设计系统。 支持折线图、柱状图、饼状图、流程图、概念图、桑基图等所有 Mermaid 图表类型。 适用于:数据可视化、流程图、架构图、关系图、结构占比、趋势分析。 当用户提及"图表、可视化、流程图、架构图、饼图、折线图、Mermaid、diagram"时触发。

fred-data

5
from RayLee1997/Shared-Workspace

使用 FRED MCP Server 查询美联储经济数据(Federal Reserve Economic Data)。 提供 840,000+ 条经济时间序列的浏览、搜索与数据获取能力,覆盖利率、通胀、就业、GDP、 货币供应、金融市场等全维度宏观经济数据。 适用于:宏观经济分析、投资研报宏观环境评估、经济周期判断、量化因子构建、数据探索。 当用户提及"宏观经济、利率、通胀、CPI、PCE、GDP、失业率、非农、美联储、FRED、 联邦基金利率、国债收益率、收益率曲线、货币供应、M2、经济周期、金融条件"时触发。

gmail

9
from orthogonal-sh/skills

Send, read, and manage emails via Gmail. Use when asked to send an email, check inbox, read messages, draft emails, or manage Gmail.

gmail-oauth

7
from Demerzels-lab/elsamultiskillagent

Set up Gmail API access via gog CLI with manual OAuth flow.

gmail-tool

7
from Demerzels-lab/elsamultiskillagent

Send and read emails via Gmail using App Password.

gmail-sender

7
from Demerzels-lab/elsamultiskillagent

Send emails via Gmail SMTP using Google App Password.

gmail-label-manager

7
from Demerzels-lab/elsamultiskillagent

This skill automates the organization of unread Gmail messages by applying labels, removing unnecessary labels.

gmail-cleaner

7
from Demerzels-lab/elsamultiskillagent

Clean and organize Gmail accounts in bulk.

gmail

7
from Demerzels-lab/elsamultiskillagent

Gmail API integration with managed OAuth. Read, send, and manage emails, threads, labels, and drafts. Use this skill when users want to interact with Gmail. For other third party apps, use the api-gateway skill (https://clawhub.ai/byungkyu/api-gateway).