Back to MCP directory
publicPublicdnsLocal runtime

mcp-send-email

一个基于Resend API的MCP服务器,用于通过Cursor或Claude Desktop直接发送电子邮件,无需手动复制粘贴内容。支持纯文本、HTML邮件、定时发送、CC/BCC等功能。

article

README

🚀 用于发送电子邮件的 MCP 💌

这是一个简单的 MCP 服务器,借助 Resend 的 API 来发送电子邮件。有了它,你能让 Cursor 或 Claude Desktop 撰写电子邮件,并且无需复制粘贴邮件内容,即可立即发送。

例如,你可以用它运行本地脚本、与 Claude 聊天、处理数据,然后将结果发送给自己或团队。

本项目使用以下技术构建:

🚀 快速开始

目前,你需要本地构建该项目才能使用此 MCP 服务器。然后在 CursorClaude Desktop 中添加它,以便在任何 Cursor 或 Claude Desktop 聊天中使用。

✨ 主要特性

  • 支持发送纯文本和 HTML 格式的电子邮件
  • 可安排将来的电子邮件交付
  • 能够添加 CC 和 BCC 收件人
  • 可配置回邮地址
  • 支持自定义发件人电子邮件(需要验证)

📺 演示

https://github.com/user-attachments/assets/8c05cbf0-1664-4b3b-afb1-663b46af3464

📦 安装指南

克隆项目

git clone https://github.com/resend/mcp-send-email.git

构建项目

npm install
npm run build

设置 Resend

创建一个免费的 Resend 账户并生成 API Key。要发送到其他地址,还需要验证你的域名

⚠️ 重要提示

有关如何使用 Resend 发送电子邮件的信息,请参阅 文档

💻 使用示例

在 Cursor 中使用

打开 Cursor 设置

打开命令面板 (cmd + shift + p 在 macOS 或 ctrl + shift + p 在 Windows) 并选择 "Cursor Settings"。

添加 MCP 服务器

从左侧边栏中选择 "MCP",然后点击 "添加新的全局 MCP 服务器"。

添加以下配置:

{
  "mcpServers": {
    "resend": {
      "type": "command",
      "command": "node 绝对路径到 MFC 发送电子邮件项目的构建/index.js --key=YOUR_RESEND_API_KEY"
    }
  }
}

你可以通过在 Cursor 中右键点击 /build/index.js 文件并选择 复制路径 来获取构建脚本的绝对路径。

可能的参数

  • --key: 你的 Resend API 密钥(必需)
  • --sender: 你从已验证域中获得的发件人电子邮件地址(可选)
  • --reply-to: 回邮电子邮件地址(可选)

⚠️ 重要提示

如果你不提供发件人电子邮件地址,MCP 服务器每次调用工具时都会要求你提供。

测试发送

现在你可以通过测试发送电子邮件来测试。将以下内容替换到 email.md 中:

  • 将 to: 电子邮件地址替换为你的地址
  • 在 Cursor 聊天中选择所有文本,按 cmd + l
  • 告诉 cursor 将其作为电子邮件发送(确保在下侧左下角下拉菜单中选择 "Agent" 模式)。

Cursor 聊天中选中 email.md 文件并启用 Agent 模式的截图

在 Claude Desktop 中使用

打开 Claude Desktop 设置

Claude Desktop 开发者设置中显示 Resend MCP 服务器的截图

测试发送

关闭并重新打开 Claude Desktop。验证 resend 工具是否在 Claude 开发者设置中可用。

聊天时告诉 Claude 使用 resend 工具发送电子邮件。

READY-TO-PASTE CONFIG

MCP client config generator

Choose your client, fill the required environment variables, then copy a config generated from this server's published metadata

terminal
checkNo environment variables required
Claude Desktop
{
  "mcpServers": {
    "resend": {
      "command": "node ABSOLUTE_PATH_TO_MCP_SEND_EMAIL_PROJECT/build/index.js --key=YOUR_RESEND_API_KEY"
    }
  }
}
Save toclaude_desktop_config.json
help

Runtime guide

cloud

Hosted runtime

Hosted servers run from a provider-managed environment. You usually connect the MCP client to the hosted endpoint or follow the provider's authorization flow, without keeping a local process alive

  1. Open provider connection page
  2. Authorize or copy endpoint
  3. Connect from your MCP client
terminal

Local runtime / other methods

Local servers run on your own machine or infrastructure. You normally copy the server_config into your MCP client, install the required package, and provide env variables from env_schema when needed

  1. Copy server_config
  2. Install required package
  3. Fill env variables and restart client