Do I have to change my code?
Not if you use the Resend SDK the usual way. In the Node SDK, the constructor takes the API key, or reads RESEND_API_KEY when you pass none. The base URL comes from the baseUrl option, or else from RESEND_BASE_URL, or else it is https://api.resend.com. That is why two environment variables are the whole change.
One catch: the SDK only reads those variables when process.env exists. On a runtime without it, pass baseUrl in the constructor options. The same variable works in the Go, PHP and Ruby SDKs, and Python reads RESEND_API_URL. See the compatible API page.
How do I deploy sendmcp?
sendmcp is one Worker on your own Cloudflare account. You need Workers Paid ($5 a month, 3,000 emails included, then $0.35 per 1,000). The steps are on the self-host page. When it is up, you have a Worker URL such as https://mail.acme.com and an MCP server your agent can connect to.
How do I add my domains?
Each domain needs a zone on your Cloudflare account. Then ask your agent to add it. It creates the domain, writes the SPF, DKIM and DMARC records on Cloudflare, verifies them and sends you a test email. There is no per-domain fee.
Leave Resend running while you do this. One thing to watch: a name may have only one SPF record, because a second one makes the SPF check fail with a permanent error (RFC 7208, section 4.5). If the agent finds an existing SPF record, merge the two instead of adding another. SPF, DKIM and DMARC on Cloudflare shows how.
How do I switch each project?
Create one sendmcp key per project, scoped to its domain, and put it where the Resend key was. Then set the base URL:
# .env
RESEND_BASE_URL=https://mail.acme.com
RESEND_API_KEY=your_sendmcp_key_for_acme_com
The application code stays as it is:
import { Resend } from "resend";
// Reads RESEND_API_KEY and RESEND_BASE_URL from the environment
const resend = new Resend();
await resend.emails.send({
from: "Acme <hi@acme.com>",
to: ["user@example.com"],
subject: "Welcome to Acme",
html: "<p>Your account is ready.</p>",
});
If you would rather name the variable SENDMCP_KEY, pass it as new Resend(process.env.SENDMCP_KEY). Keep the old Resend key until the project has sent a test, then delete it. sendmcp serves /emails, not /v1/emails, which matches Resend's own paths.
How do I test the first send?
- Send one email from the project to your own address and check it arrives and passes SPF and DKIM.
- Change any
resend.devtest addresses in your tests to@test.sendmcp.dev. Test keys never send. - Look at the email in the sendmcp logs. If something bounced, ask your agent:
bounce_explainreads the event and tells you what to fix. - Switch one project at a time and watch it for a few days before the next.
What happens to my webhooks?
Handlers keep working. sendmcp sends the same event names and the same Svix-style headers (svix-id, svix-timestamp, svix-signature), so the code that verifies a Resend webhook verifies a sendmcp one. Two changes: register your endpoint in sendmcp (your agent can do it with webhooks_upsert), and use the signing secret sendmcp gives you, not the one from Resend.
| Resend event | In sendmcp |
|---|---|
email.sent, email.delivered, email.delivery_delayed, email.bounced, email.complained, email.failed | Same names |
domain.created, domain.updated, domain.deleted | Same names |
contact.created, contact.updated, contact.deleted | Not sent: there are no contacts |
email.opened, email.clicked | Cloudflare Email Sending has no tracking itself; check your domain's tracking setting before you rely on these |
What works the same and what differs?
| Area | Same as Resend | Different or missing |
|---|---|---|
| Sending | Send, batch of up to 100, retrieve, list, update, cancel; html, text, cc, bcc, reply_to, attachments, headers, tags, scheduled_at | No share link; no topic_id |
| Requests | Request and response bodies, error body, cursor pagination, Idempotency-Key, ratelimit-* headers | sendmcp's own rate limit, plus Cloudflare's daily account quota (Resend's default is 10 requests a second) |
| Domains | Create, retrieve, list, update, delete, verify | DNS records are written for you, not only shown |
| API keys | Same scopes: full access or sending access, one domain or all | Created in your own deployment; a Resend key does not work there |
| Templates, suppressions, logs | Same endpoints | Your existing Resend templates are not imported |
| Webhooks | Event names and signature headers for email and domain events | No contact.* events |
| Test mode | Test addresses | @test.sendmcp.dev replaces resend.dev; test keys never send |
| Marketing | Not applicable | No contacts, segments, broadcasts or automations |
What does not carry over?
- Broadcasts, audiences and contacts. Cloudflare allows transactional email only, so sendmcp has none of these. If you send newsletters, keep them on Resend or move them to a newsletter tool such as listmonk. The open source alternatives post compares them.
- Dashboard history. Resend's pricing page lists 30 days of data retention on Free and Pro. Your sent emails and logs stay in Resend and do not appear in sendmcp. If you need them, pull them through Resend's List Sent Emails API before you cancel. sendmcp starts a new history in your D1.
- Templates. Recreate the ones you use in sendmcp. Inline HTML sent from your code needs nothing.
- Resend API keys. They only work against Resend's API.
- Support and the Resend dashboard. Help is GitHub issues, and you read logs in your own deployment or ask your agent.
How do I cancel Resend?
After every project has sent a real email through sendmcp and its webhooks fire, delete the Resend keys. Then follow Resend's own steps: open the Billing page, click the three dots next to your plan and choose Cancel Subscription. Cloudflare then bills you for sending at $0.35 per 1,000 emails after the first 3,000 a month, in place of Resend's $20 a month Pro plan.
Two honest caveats before you commit. Cloudflare Email Sending is a public beta, and sendmcp has no hosted version, so you run the Worker. See Resend vs sendmcp for when staying on Resend is the better call.
Sources
- resend-node: src/resend.ts (base URL and key handling) checked
- Resend: Webhook event types checked
- Resend: Pricing (data retention, plans) checked
- Resend: Managing Billing (cancel a subscription) checked
- Resend: API reference and rate limits checked
- Cloudflare: Email Service pricing checked
- RFC 7208: Sender Policy Framework, section 4.5 checked