- Home
- MCP servers
- Resend
Resend
- typescript
3
GitHub Stars
typescript
Language
5 months ago
First Indexed
2 months ago
Catalog Refreshed
Documentation & install
Readme and setup notes from the catalogue, plus a client-ready config you can copy for your MCP host.
You run a streamable HTTP MCP server that connects AI-enabled clients to Resend for email and newsletter management. It lets you manage contacts, segments, campaigns, templates, and subscriptions, while keeping control over sender identities and delivery status through a simple MCP interface.
How to use
You interact with the MCP server via a client that supports MCP JSON-RPC over HTTP or a streamable HTTP transport. The server handles authentication, routes actions to Resend, and returns structured results with summaries and next steps.
Typical workflows you can perform include discovering existing data, adding or updating subscribers in bulk, creating and managing segments, sending individual emails or broadcasts, and monitoring campaigns. You can format messages for multipart delivery and personalize content using templates or variables. Segment names are case-insensitive, and broadcasts reference segments by name. Templates must be published in the Resend dashboard before use.
To start, run the server locally or in a supported environment, then connect your MCP client using a Bearer token for authentication. Provide your Resend API key and a verified sender address to enable sending. Your client will use the MCP URL to issue commands such as upsert_contacts, segments, send, campaigns, subscriptions, and templates, and you can track delivery with campaigns status.
How to install
Prerequisites you need before installing: a recent Node.js runtime or Bun, and a Resend account with a verified domain. The server uses a Bearer token for client authentication and requires a Resend API key and a verified default sender.
Install the server dependencies
- Bun or Node.js 20+
Clone or download the MCP server package and install dependencies
bun install
Configure environment variables with values you control. You will provide a bearer token for clients, your Resend API key, and a verified default sender address.
PORT=3000 AUTH_ENABLED=true AUTH_STRATEGY=bearer BEARER_TOKEN=your-random-auth-token RESEND_API_KEY=re_your_resend_api_key RESEND_DEFAULT_FROM=newsletter@yourdomain.com
Start the MCP server in development mode and open the MCP endpoint to verify it runs correctly.
bun dev
MCP endpoint: http://127.0.0.1:3000/mcp
## Additional sections
Configuration and security matter for safe operation. The server uses a Bearer token to authenticate clients and forwards requests to Resend using your Resend API key. Ensure the Bearer token is kept private and that clients review actions before sending, especially for bulk operations or broadcasts.
Environment variables you’ll configure corely include:
- RESEND\_API\_KEY: your Resend API key
- RESEND\_DEFAULT\_FROM: a verified sender address
- BEARER\_TOKEN: a random token to authenticate MCP clients
- PORT: server port (default 3000)
- HOST: server host (default 127.0.0.1)
- AUTH\_ENABLED: enable or disable authentication
- AUTH\_STRATEGY: authentication strategy (default bearer)
- LOG\_LEVEL: debug, info, warn, or error (default info)
Deployment options include running locally with Bun or Node.js, or deploying to a Cloudflare Worker. Local development runs on http://127.0.0.1:3000/mcp, while production deployments expose a public endpoint such as https://<worker>.<account>.workers.dev/mcp.
Health and troubleshooting tips:
- 401 Unauthorized: verify BEARER\_TOKEN on both server and client
- Missing RESEND\_API\_KEY or RESEND\_DEFAULT\_FROM: ensure all required env vars are set
- Segment or template issues: list segments and publish templates before use
- Rate limits: respect API limits and retry-after headers
- Stale sessions: reconnect clients after server restarts
## Available tools
### upsert\_contacts
Add or update contacts in bulk. Creates if email doesn't exist, updates if it does.
### remove\_contacts
Permanently delete contacts from your list.
### find\_contacts
Search and filter contacts with pagination.
### segments
Manage segments and their members.
### send
Send individual emails or broadcast to segments.
### campaigns
View and manage broadcast campaigns.
### subscriptions
Manage topic preferences for contacts.
### templates
List available email templates.