邮件发送MCP服务器

一个无需配置的MCP服务器,允许LLM通过Resend发送电子邮件,适用于Claude Desktop、Cursor等MCP客户端。

  • by HamnaCh456
  • Python
  • 本地部署
  • 4 星标
  • 更新于
在 GitHub 查看 hamnach456/resend_mcp_server

使用说明

重新发送电子邮件MCP服务器

一个小型的零配置MCP(模型上下文协议)服务器,允许LLM通过它发送电子邮件 重发.
将其插入Claude Desktop、Cursor或任何其他MCP客户端,并在几秒钟内开始发送消息。


演示

观看演示


已部署MCP服务器链接

链接


快速启动

  1. 获取代码

    git clone https://github.com/HamnaCh456/Resend_MCP_server.git
    cd resend-email-mcp
    
  2. 安装deps

    pip install -r requirements.txt        # or: uv pip install fastmcp resend python-dotenv httpx
    
  3. 设置重新发送API密钥

    export RESEND_API=re_YOUR_RESEND_KE
    
  4. 运行服务器

    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中的示例会话

  1. 克劳德: “发送电子邮件至alice@example.com主题为“会议笔记”和聊天中的笔记。”
  2. 您键入: @send_email
    Claude填写参数并调用工具。
  3. 电子邮件已送达,无需复制粘贴。

需求

  • Python 3.9+
  • fastmcp, resend, python-dotenv, httpx

通过以下方式快速安装:

pip install fastmcp resend python-dotenv httpx

故障排除

问题 修复
“导入错误:重新发送” pip install resend
“401未经授权” 检查 RESEND_API 重新发送仪表板中的密钥和域验证
端口已在使用中 export PORT=10001 或任何自由港

愉快的电子邮件!