resend-mcp
MCP 服务配置
复制以下 JSON 到 OPClaw 或其他 MCP 客户端的配置文件中即可使用
{
"mcpServers": {
"resend-mcp": {
"args": [
"-y",
"@pidanmoe/resend-mcp"
],
"command": "npx",
"env": {
"EMAIL_HOST": "\u003cYOUR_EMAIL_HOST\u003e",
"RESEND_API_KEY": "\u003cYOUR_RESEND_API_KEY\u003e"
}
}
}
}
服务介绍
resend-mcp
这是一个基于 FastMCP 框架构建的 MCP (Model Context Protocol) 工具包
功能
当前实现了一个邮件发送工具
sendEmail: 使用 Resend 服务发送邮件
安装依赖
bun install
运行项目
bun run dev
调试项目
bun run inspect
构建项目
bun run build
部署 MCP
{
"mcpServers": {
"resend-mcp": {
"args": ["-y","@pidanmoe/resend-mcp"],
"command": "npx",
"env": {
"RESEND_API_KEY": "<YOUR_RESEND_API_KEY>",
"EMAIL_HOST": "<YOUR_EMAIL_HOST>"
}
}
}
}
环境变量
RESEND_API_KEY: Resend API 密钥EMAIL_HOST: 邮件域名例如example.com
项目结构
- index.ts: 主入口文件初始化并启动 FastMCP 服务器
- tools/sendEmail.ts: 实现了
sendEmail工具支持通过 Resend 发送邮件 - utils/logger.ts: 日志工具模块
使用说明
该项目遵循 Model Context Protocol 规范可以通过标准 I/O 或其他传输方式与支持 MCP 的客户端进行通信
技术栈
- Bun - JavaScript/TypeScript 运行时
- FastMCP - MCP 框架
- Resend - 邮件发送服务
- Zod - TypeScript-first schema declaration and validation library
此项目使用 bun v1.2.19 创建Bun 是一个快速的一体化 JavaScript 运行时