A Model Context Protocol (MCP) server implementation for the Resend email service.
- Send emails using Resend through a standardized MCP interface
- TypeScript support
- A Resend API key (get one at resend.com)
- Node.js 18 or later
- Clone the repository
- Install dependencies:
npm install
Create a .env
file in the root directory with your Resend API key:
RESEND_API_KEY=your_api_key_here
PORT=3000 # Optional, defaults to 3000
The server implementation is currently blocked by TypeScript type issues with the MCP SDK. The following issues need to be resolved:
- The
Server
class from@modelcontextprotocol/sdk
is not properly exposing its request handling methods in the TypeScript types. - The exact method name for handling requests needs to be determined (tried:
handleRequest
,handle
,receiveMessage
,receive
,processRequest
).
- Check the MCP SDK documentation or source code for the correct method name
- Update the TypeScript types in the SDK if they are incorrect
- Consider using JavaScript temporarily until the types are fixed
bun run dev
bun run start
bun run build
The server exposes the following MCP function:
Sends an email using Resend.
Parameters:
from
(required): Sender email addressto
(required): Recipient email addresssubject
(required): Email subjecthtml
(optional): Email content in HTML formattext
(optional): Email content in plain text format
Example request:
{
"method": "send-email",
"params": {
"from": "you@example.com",
"to": "recipient@example.com",
"subject": "Hello from MCP",
"html": "<h1>Hello</h1><p>This is a test email.</p>"
}
}
MIT