Submit

MCP Resend Email

@gdli6177

a year ago
MCP server for sending email by Resend
Overview

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 address
  • to: Recipient's email address, multiple recipients can be separated by commas
  • cc: (Optional) CC email address
  • bcc: (Optional) BCC email address
  • replyTo: (Optional) Reply-to email address
  • subject: Email subject
  • text: Plain text content of the email

2. Send HTML Email

send_html_email

Parameters:

  • from: Sender's email address
  • to: Recipient's email address
  • cc: (Optional) CC email address
  • bcc: (Optional) BCC email address
  • replyTo: (Optional) Reply-to email address
  • subject: Email subject
  • html: HTML format content of the email

3. Send Email with Attachment

send_with_attachment

Parameters:

  • from: Sender's email address
  • to: Recipient's email address
  • subject: Email subject
  • text: (Optional) Plain text content of the email
  • html: (Optional) HTML format content of the email
  • attachments: List of attachments, each attachment includes:
    • filename: File name
    • content: File content (Base64 encoded)
    • contentType: File MIME type

4. Send Customer Service Email

send_customer_service_email

Parameters:

  • from: Sender's email address
  • to: Recipient's email address
  • subject: Email subject
  • customerName: Customer name
  • ticketId: Ticket ID
  • responseText: Response content
  • agentName: Customer service agent name

5. Send Marketing Email

send_marketing_email

Parameters:

  • from: Sender's email address
  • to: Recipient's email address
  • subject: Email subject
  • recipientName: (Optional) Recipient name
  • campaignTitle: Marketing campaign title
  • campaignContent: Marketing campaign content
  • ctaUrl: Call-to-action URL
  • ctaText: Call-to-action text
  • unsubscribeUrl: Unsubscribe URL

6. Send Welcome Email

send_welcome_email

Parameters:

  • from: Sender's email address
  • to: Recipient's email address
  • subject: Email subject
  • firstName: Recipient's first name
  • product: Product name
  • welcomeMessage: Welcome message
  • callToActionUrl: Call-to-action URL
  • callToActionText: 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"
      ]
    }
  }
}
© 2025 MCP.so. All rights reserved.

Build with ShipAny.