使用说明
重新发送mcp
MCP服务器 重发 电子邮件API。公开了49种用于发送电子邮件、管理域、联系人、模板、广播、Webhook等的工具。
安装
来源
cargo install --path .
码头工人
docker pull ghcr.io/psu3d0/resend-mcp:latest
docker run -p 8080:8080 -e RESEND_API_KEY=re_xxx ghcr.io/psu3d0/resend-mcp:latest
预构建二进制文件
下载自 GitHub 发布.
用法
# Start server with stdio transport (default)
RESEND_API_KEY=re_xxx resend-mcp
# Or via CLI flag
resend-mcp --api-key re_xxx
# Use HTTP transport
resend-mcp --api-key re_xxx --transport http
# Custom bind address (HTTP mode)
resend-mcp --api-key re_xxx --transport http --bind-address 0.0.0.0 --port 3000
# Custom base URL (for proxies or testing)
resend-mcp --api-key re_xxx --base-url https://custom.api.com
# Disable startup health check
resend-mcp --api-key re_xxx --no-health-check
# Debug logging
RESEND_MCP_LOG=debug resend-mcp --api-key re_xxx
MCP客户端配置
克劳德桌面
{
"mcpServers": {
"resend": {
"command": "resend-mcp",
"env": {
"RESEND_API_KEY": "re_xxx"
}
}
}
}
码头工人
{
"mcpServers": {
"resend": {
"command": "docker",
"args": ["run", "--rm", "-p", "8080:8080", "-e", "RESEND_API_KEY=re_xxx", "ghcr.io/psu3d0/resend-mcp:latest"]
}
}
}
可用工具
电子邮件
sendEmail-发送电子邮件sendBatchEmails-一次最多发送100封电子邮件getEmail-检索一封电子邮件updateEmail-更新预定电子邮件cancelScheduledEmail-取消已安排的电子邮件listEmailAttachments-列出已发送电子邮件的附件getEmailAttachment-获取单个附件
收到的电子邮件
listReceivedEmails-列出收到的电子邮件getReceivedEmail-收到一封电子邮件listReceivedEmailAttachments-列出收到的电子邮件的附件getReceivedEmailAttachment-获取收到的电子邮件附件
领域
createDomain-创建新域listDomains-列出所有域getDomain-获取单个域updateDomain-更新域deleteDomain-删除域verifyDomain-验证域
API密钥
createApiKey-创建新的API密钥listApiKeys-列出所有API密钥deleteApiKey-删除API密钥
受众
createAudience-创建受众listAudiences-列出所有受众getAudience-获得单一受众deleteAudience-删除受众
联系人
createContact-创建联系人listContacts-列出受众中的联系人getContactByEmail/getContactById-联系我们updateContactByEmail/updateContactById-更新联系人deleteContactByEmail/deleteContactById-删除联系人
广播
createBroadcast-创建广播listBroadcasts-列出所有广播getBroadcast-获取单个广播deleteBroadcast-删除广播草稿sendBroadcast-发送或安排广播
模板
createTemplate-创建模板listTemplates-列出所有模板getTemplate-获取单个模板updateTemplate-更新模板deleteTemplate-删除模板duplicateTemplate-复制模板publishTemplate-发布模板
网络钩子
createWebhook-创建webhooklistWebhooks-列出所有WebhookgetWebhook-获取单个webhookupdateWebhook-更新webhookdeleteWebhook-删除webhook
配置
所有选项都可以通过CLI标志或环境变量进行设置。
| CLI标志 | 环境变量 | 默认值 | 描述 |
|---|---|---|---|
--api-key |
RESEND_API_KEY |
必需的 | 重新发送API密钥 |
--transport |
TRANSPORT |
stdio |
运输方式(stdio 或 http) |
--base-url |
RESEND_BASE_URL |
https://api.resend.com |
重新发送API基本URL |
--bind-address |
BIND_ADDRESS |
127.0.0.1 |
服务器绑定地址(HTTP模式) |
--port |
PORT |
8080 |
服务器端口(HTTP模式) |
--no-health-check |
- | false |
禁用启动健康检查 |
| - | RESEND_MCP_LOG |
info |
日志级别(error, warn, info, debug, trace) |
健康检查
启动时,服务器调用 listDomains 以验证API密钥的有效性。这可以通过以下方式禁用 --no-health-check。健康检查失败会记录警告,但不会阻止启动。
发展
# Build
cargo build
# Run with debug logging
RESEND_MCP_LOG=debug cargo run -- --api-key re_xxx
# Format and lint
cargo fmt && cargo clippy
# Update OpenAPI spec from upstream
python scripts/transform_spec.py /path/to/upstream/resend.yaml src/specs/resend.yaml
OpenAPI规范更新
规格将从以下位置自动同步 重新发送/重新发送openapi 每天通过GitHub Actions。转换脚本添加 operationId 字段,并修复了YAML解析问题。
许可证
阿帕奇-2.0