sendmcp
Provides tools for running transactional email on the user's Cloudflare account, including managing domains and DNS, sending and reading emails, inbound mail, API keys, webhooks, templates, suppressions, request logs, quotas, and setup checks.
This server does not currently have a deployable release on Glama. Follow the repository's setup instructions to install and configure it for your MCP client, including any required credentials and local dependencies.
Why sendmcp
Resend's free plan stops at 3 domains, and the fourth project costs $20 a month even if it sends ten emails. sendmcp runs in your Cloudflare account instead, so every side project gets email from its own domain, and an app that already uses the Resend SDK only needs a new base URL.
Unlimited domains and projects from one deploy.
Resend-compatible API: same paths, error names and
re_keys. Keep your code.Your agent runs it: Claude Code, Cursor or Codex sends and reads email, creates keys, webhooks and templates and checks delivery over MCP.
Your data stays in your account: D1 for metadata, R2 for bodies, Cloudflare Access for the dashboard. No passwords, no third-party service.
Related MCP server: cfmail
Features
Feature | What you get |
Sending | single and batch sends (up to 100), scheduled sends, cancel, idempotency keys, test keys |
Domains | add in the dashboard or with |
Inbound mail | receiving addresses per domain, delivered to your webhooks as |
Webhooks | Resend's event names, Svix-style signatures, replay |
Templates | drafts, publish, |
Deliverability | bounce and complaint suppressions, delivery events, a daily limit per project |
Observability | request logs, email history, setup checks with a link to fix each problem |
Dashboard | every setting has a page, behind Cloudflare Access |
MCP server | 31 tools over OAuth, each running the same route as the dashboard |
Transactional email only (sign-up, magic links, receipts, alerts). No marketing or bulk mail: Cloudflare Email Sending does not allow it.
How it works
flowchart LR
app["Your app<br>(Resend SDK)"] -->|REST API| worker
agent["Your agent<br>(Claude Code, Cursor, Codex)"] -->|MCP over OAuth| worker
you["You"] -->|Dashboard behind Access| worker
subgraph cf["Your Cloudflare account"]
worker["sendmcp Worker"]
worker --> d1[("D1<br>metadata")]
worker --> r2[("R2<br>bodies")]
worker --> send["Email Sending"]
routing["Email Routing"] -->|inbound| worker
send -->|delivery events| queue["Queues"] --> worker
endBefore you deploy
Workers Paid plan on the Cloudflare account. Queues and Email Sending need it.
Zero Trust organization. Open Zero Trust once and pick a team name. The free plan is enough; Cloudflare asks for payment details even on Free.
Email Sending turned on for the account (Email Service in the dashboard).
No secrets and no API token: the one value you paste is the ID of an OAuth client you create yourself.
Deploy
Click Deploy to Cloudflare above. Cloudflare copies the repo into your GitHub account and creates the D1 database, R2 bucket and queue. It asks for nothing else.
Create an OAuth client in your Cloudflare account: Manage Account → OAuth clients → Create (docs).
Type: public client, Authorization Code with PKCE (no secret).
Redirect URI:
https://sendmcp.<your-subdomain>.workers.dev/oauth/cloudflare/callback.Scopes: the ones in
CF_OAUTH_SCOPESinwrangler.jsonc, listed below.
In the repo copy from step 1, put the client ID in
CF_OAUTH_CLIENT_IDinwrangler.jsoncand commit. Workers Builds redeploys the Worker.Open the Worker URL (
https://sendmcp.<your-subdomain>.workers.dev) and click Sign in with Cloudflare. Pick the account the Worker runs in and approve what sendmcp asks for. sendmcp checks that this account runs the Worker, makes you the owner and creates a Cloudflare Access application that lets in your Cloudflare email only.Sign in to Access with the one-time code it emails you. The Get started page runs the setup checks and tells you what is missing, with a link to fix each one.
The first sign-in has to use the workers.dev URL: that is how sendmcp proves the account owns it. Revoke sendmcp any time in your Cloudflare profile under OAuth authorizations, then sign in again.
Permission | Used for |
User details · Read | your email, the dashboard owner |
Account · Read, Workers · Read | proving the account runs this Worker |
Email Sending · Edit | sending and quota checks |
Access: Apps and Policies · Edit | protecting the dashboard |
Access: Organizations · Read | finding your Zero Trust team domain |
Zone · Read | listing the domains you can send from |
DNS · Edit | writing DKIM, SPF and DMARC records |
Email Routing · Edit | receiving mail |
Zone Settings · Edit | turning on the receiving subdomain |
Queues · Edit | delivery events (delivered, bounced) |
Offline access | refreshing the sign-in token |
Prefer a hand-made API token? Set it with wrangler secret put CLOUDFLARE_API_TOKEN (same
permissions, plus CLOUDFLARE_ACCOUNT_ID if it sees several accounts). It overrides the sign-in token.
Set CF_OAUTH_CLIENT_ID in wrangler.jsonc first (step 2 above).
pnpm installpnpm build && pnpm run deploypnpm run deploy applies the D1 migrations, then runs wrangler deploy. Use pnpm run deploy, not
pnpm deploy, which is a different pnpm command.
Use the API
Point the Resend SDK at your Worker and use a key from the dashboard (API keys):
RESEND_BASE_URL=https://sendmcp.<your-subdomain>.workers.dev
RESEND_API_KEY=re_...import { Resend } from 'resend';
const resend = new Resend(process.env.RESEND_API_KEY);
await resend.emails.send({
from: 'hello@yourdomain.com',
to: 'you@example.com',
subject: 'It works',
html: '<p>Sent through sendmcp.</p>',
});The Python SDK reads RESEND_API_URL instead. A test key (re_test_...) accepts sends and never
delivers them.
Area | Same as Resend | Different or missing |
Emails | send, batch of up to 100, retrieve, list, update, cancel, | attachments are base64 |
Requests | bodies, error shape, cursor pagination, | no rate-limit headers; a daily limit per project plus Cloudflare's account quota |
Domains, API keys | same endpoints; a domain's id is its name | full access keys only; Cloudflare writes the DNS records into your zone |
Templates | drafts, publish, | none |
Webhooks | Resend's event names, Svix-style signature headers | no |
Suppressions, logs | dashboard and MCP only | |
Marketing |
|
Errors use Resend's shape: { "statusCode": 403, "name": "invalid_api_key", "message": "..." }.
Use it from your agent
Add https://sendmcp.<your-subdomain>.workers.dev/mcp to Claude, Cursor, ChatGPT or Codex as a remote MCP
server and approve access once in the browser (OAuth). In Claude Code:
claude mcp add --transport http sendmcp https://sendmcp.<your-subdomain>.workers.dev/mcpThe server has 31 tools: projects, domains and tracking, API keys, sending and reading emails, inbound mail, webhooks with replay, templates, suppressions, request logs, the daily quota and the setup checks. Each tool runs the same route as the dashboard.
Update
The setup page and GET /version say when a new release is out. The Deploy button created your own copy
of the repo, so pull the new release into it (or merge the upstream tag) and Workers Builds redeploys.
Migrations run as part of the deploy.
Develop
Requires Node 24+ and pnpm.
pnpm installcp .dev.vars.example .dev.varsLOCAL_DEV=1 in .dev.vars lets wrangler dev on localhost skip Cloudflare Access. It has no effect on
any other host. Put an API token in CLOUDFLARE_API_TOKEN there, since OAuth sign-in only
returns to workers.dev URLs.
pnpm -C apps/worker db:migrate && pnpm -C apps/worker devVITE_DATA=live pnpm devWithout VITE_DATA=live the dev server runs on mock data; production builds always use the Worker API.
If the Worker is not on port 8787, set WORKER_URL=http://localhost:<port>.
pnpm checkpnpm check runs Biome, the TypeScript checks and the Worker tests.
Path | What |
| the Worker: Hono, D1 migrations, Access, public API, MCP server |
| the dashboard SPA (React, Vite), served by the Worker at |
| Worker config, at the root so the Deploy button builds the whole workspace |
Contributing
Bug reports and pull requests are welcome. Open an issue
first for anything larger than a fix, and run pnpm check before you push.
Security
Please report vulnerabilities privately through GitHub security advisories, not in a public issue.
License
MIT. Built by agentfirsthq: tools that your agent can set up and run.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
This server cannot be deployed
Maintenance
Related MCP Connectors
Email for AI agents — send, receive as a webhook, manage domains, templates, routing.
Email on your own domains for AI agents: read, search, draft, reply and send from real mailboxes.
Email for AI agents: send mail, manage contacts, automations & webhooks. Zero-DNS first send.
Email infrastructure for AI agents: send, read replies as threads, campaigns, per-key limits.
Related MCP Servers
- AlicenseNot gradedqualityDmaintenanceDeploys a self-hosted Cloudflare email service providing short-lived mailboxes with a JSON API and MCP endpoint for automated testing and AI agent signup, verification, and magic-link flows.1MIT
- AlicenseNot gradedqualityDmaintenanceEnables AI agents to autonomously receive, search, read, reply to, and forward email through a self-hosted Cloudflare service accessible via MCP or CLI, with no web interface.MIT
- FlicenseNot gradedqualityBmaintenanceEnables AI agents to autonomously create email accounts, verify domains, send and receive emails, and monitor delivery events without requiring human sign-up or payment.1-
- AlicenseNot gradedqualityBmaintenanceGives AI agents a self-hosted Cloudflare mailbox they can use to receive, search, wait for, read, send, reply to and forward email, with attachments and threads, over MCP or REST behind a single bearer token.5MIT