MCP Resend Email
This is an MCP Server based on the Resend API, providing convenient email sending functionality. It can be used for customer service replies, marketing emails, notification emails, and other scenarios.
Features
- Send plain text emails
- Send HTML format emails
- Send emails with attachments
- Send customer service reply emails using predefined templates
- Send marketing emails using predefined templates
- Send welcome emails using predefined templates
Installation
npm install
Configuration
Using Environment Variables
Create a .env file and set the following environment variables:
RESEND_API_KEY=your_resend_api_key
PORT=3001
Using Command Line Arguments
You can also pass the API key via command line arguments, which is especially useful in stdio mode:
node src/server.js --api-key=your_resend_api_key
Usage
Using with Various MCP Clients
Windsurf Configuration
In Windsurf configuration file, add:
{
"mcpServers": {
"mcp-resend-email": {
"command": "npx",
"args": ["mcp-resend-email", "--api-key=your_resend_api_key"]
}
}
}
Cursor Configuration
In your project's .cursor/mcp.json or global ~/.cursor/mcp.json file, add:
{
"mcpServers": {
"mcp-resend-email": {
"command": "npx",
"args": ["mcp-resend-email", "--api-key=your_resend_api_key"],
"env": {
"NODE_ENV": "production"
}
}
}
}
Claude Configuration
In Claude's MCP configuration, add:
{
"servers": [
{
"name": "mcp-resend-email",
"command": "npx mcp-resend-email --api-key=your_resend_api_key"
}
]
}
This will always use the latest published version without local installation.
Start the Server (stdio mode)
npm start
Or pass the API key via command line:
npm run start:with-key
Remember to replace YOUR_API_KEY with your actual API key.
Development mode:
npm run dev
Start the Server (SSE mode)
npm run start:http
Or in development mode:
npm run dev:http
Custom Port
PORT=8080 npm run start:http
Configure Windsurf to Connect to the MCP Server
stdio mode
Add to Windsurf configuration:
{
"mcpServers": {
"mcp-resend-email": {
"command": "npx",
"args": ["mcp-resend-email", "--api-key=your_resend_api_key"]
}
}
}
SSE mode
Add to Windsurf configuration:
{
"mcpServers": {
"mcp-resend-email": {
"transport": "sse",
"url": "http://localhost:3001/sse"
}
}
}
Available Tools
1. Send Plain Text Email
send_email
Parameters:
from: Sender's email addressto: Recipient's email address, multiple recipients can be separated by commascc: (Optional) CC email addressbcc: (Optional) BCC email addressreplyTo: (Optional) Reply-to email addresssubject: Email subjecttext: Plain text content of the email
2. Send HTML Email
send_html_email
Parameters:
from: Sender's email addressto: Recipient's email addresscc: (Optional) CC email addressbcc: (Optional) BCC email addressreplyTo: (Optional) Reply-to email addresssubject: Email subjecthtml: HTML format content of the email
3. Send Email with Attachment
send_with_attachment
Parameters:
from: Sender's email addressto: Recipient's email addresssubject: Email subjecttext: (Optional) Plain text content of the emailhtml: (Optional) HTML format content of the emailattachments: List of attachments, each attachment includes:filename: File namecontent: File content (Base64 encoded)contentType: File MIME type
4. Send Customer Service Email
send_customer_service_email
Parameters:
from: Sender's email addressto: Recipient's email addresssubject: Email subjectcustomerName: Customer nameticketId: Ticket IDresponseText: Response contentagentName: Customer service agent name
5. Send Marketing Email
send_marketing_email
Parameters:
from: Sender's email addressto: Recipient's email addresssubject: Email subjectrecipientName: (Optional) Recipient namecampaignTitle: Marketing campaign titlecampaignContent: Marketing campaign contentctaUrl: Call-to-action URLctaText: Call-to-action textunsubscribeUrl: Unsubscribe URL
6. Send Welcome Email
send_welcome_email
Parameters:
from: Sender's email addressto: Recipient's email addresssubject: Email subjectfirstName: Recipient's first nameproduct: Product namewelcomeMessage: Welcome messagecallToActionUrl: Call-to-action URLcallToActionText: Call-to-action text
FAQ
Q: How do I upgrade to the latest version?
A: Just run with npx again. npx will always fetch the latest version automatically.
Q: How do I get a Resend API Key?
A: You can obtain a Resend API Key by signing up at Resend's website. After registration, navigate to the API Keys section in your dashboard to create a new API key. For more information, visit Resend's documentation.
Contributing
Feel free to submit issues or pull requests to help improve MCP Resend Email!
Contact
For questions, contact the author: gdli gtq6177@outlook.com
License
MIT
Server Config
{
"mcpServers": {
"mcp-resend-email": {
"command": "npx",
"args": [
"mcp-resend-email",
"--api-key=your-resend-api-key"
]
}
}
}