内容
# 重发 MCP 服务器
通过 Claude Cowork 使用 [Resend](https://resend.com) API 发送电子邮件。
Resend 提供了官方的 MCP 服务器,可在 https://github.com/resend/resend-mcp 获取。
## 工具列表
| 工具 | 功能描述 |
|---|---|
| `resend_send_email` | 发送电子邮件(HTML 或纯文本,抄送/密送,附件,定时发送) |
| `resend_get_email` | 通过 ID 查询已发送电子邮件的投递状态 |
| `resend_list_emails` | 列出最近发送的电子邮件 |
| `resend_list_domains` | 列出已验证的发送域名 |
---
## 设置步骤
### 1. 获取 Resend API 密钥
前往 [resend.com/api-keys](https://resend.com/api-keys) 并创建一个具有**完全访问权限**的密钥。
### 2. 验证发送域名(或使用测试域名)
如果您尚未验证域名,可以使用 `onboarding@resend.dev` 作为发件地址,测试发送**给您自己的电子邮件地址**。Resend 提供了此功能用于测试。
要发送给其他人,请在 [resend.com/domains](https://resend.com/domains) 添加并验证您的域名。
### 3. 构建服务器
```bash
cd resend-mcp-server
npm install
npm run build
```
### 4. 添加到 Claude Cowork
打开您的 Claude Cowork 设置(或 `claude_desktop_config.json`)并添加:
```json
{
"mcpServers": {
"resend": {
"command": "node",
"args": ["/ABSOLUTE/PATH/TO/resend-mcp-server/dist/index.js"],
"env": {
"RESEND_API_KEY": "re_xxxxxxxxx"
}
}
}
}
```
将 `/ABSOLUTE/PATH/TO/resend-mcp-server` 替换为该文件夹在您机器上的实际路径,并将 `re_xxxxxxxxx` 替换为您的实际 API 密钥。
保存后重启 Claude Cowork。
---
## 使用示例
**发送简单电子邮件:**
> "向 alice@example.com 发送主题为 'Hello' 和内容为 'Hi Alice, just checking in!' 的电子邮件"
**发送 HTML 电子邮件:**
> "向 bob@example.com 发送带有精美 HTML 布局的欢迎消息"
**定时发送:**
> "明天 9 点向团队发送跟进电子邮件"
**检查投递状态:**
> "我之前发送的电子邮件是否已投递?"