home / mcp / resend mcp server
Streamable HTTP MCP server for email and newsletter management via Resend.
Configuration
View docs{
"mcpServers": {
"iceener-resend-streamable-mcp-server": {
"url": "http://127.0.0.1:3000/mcp",
"headers": {
"PORT": "3000",
"BEARER_TOKEN": "your-random-auth-token",
"RESEND_API_KEY": "re_your_resend_api_key",
"RESEND_DEFAULT_FROM": "[email protected]"
}
}
}
}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.
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.
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 installConfigure 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
[email protected]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/mcpConfiguration 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
Add or update contacts in bulk. Creates if email doesn't exist, updates if it does.
Permanently delete contacts from your list.
Search and filter contacts with pagination.
Manage segments and their members.
Send individual emails or broadcast to segments.
View and manage broadcast campaigns.
Manage topic preferences for contacts.
List available email templates.