使用说明
重新发送电子邮件MCP服务器
一个小型的零配置MCP(模型上下文协议)服务器,允许LLM通过它发送电子邮件 重发.
将其插入Claude Desktop、Cursor或任何其他MCP客户端,并在几秒钟内开始发送消息。
演示
已部署MCP服务器链接
快速启动
-
获取代码
git clone https://github.com/HamnaCh456/Resend_MCP_server.git cd resend-email-mcp -
安装deps
pip install -r requirements.txt # or: uv pip install fastmcp resend python-dotenv httpx -
设置重新发送API密钥
export RESEND_API=re_YOUR_RESEND_KE -
运行服务器
After configuring the settings.json(in case you are using Gemini CLI) file ,give command to LLM to send an email with other specifications.
⚙️ 环境变量
| 变量 | 默认值 | 用途 |
|---|---|---|
RESEND_API |
— | 必需 重新发送API密钥 |
PORT |
10000 | 在HTTP模式下运行时要绑定的端口 |
🔧 外露工具
send_email
发送一封HTML电子邮件。
{
"subject": "Hello from MCP",
"to": "friend@example.com",
"from_email": "you@yourdomain.com",
"content": "<h1>Hi!</h1><p>Sent by an LLM 🤖</p>"
}
返回值: "Email sent successfully" 或错误消息。
🧪 Claude Desktop中的示例会话
- 克劳德: “发送电子邮件至alice@example.com主题为“会议笔记”和聊天中的笔记。”
- 您键入:
@send_email
Claude填写参数并调用工具。 - 电子邮件已送达,无需复制粘贴。
需求
- Python 3.9+
fastmcp,resend,python-dotenv,httpx
通过以下方式快速安装:
pip install fastmcp resend python-dotenv httpx
故障排除
| 问题 | 修复 |
|---|---|
| “导入错误:重新发送” | pip install resend |
| “401未经授权” | 检查 RESEND_API 重新发送仪表板中的密钥和域验证 |
| 端口已在使用中 | export PORT=10001 或任何自由港 |
愉快的电子邮件!
