Home / Email for Cloudflare Workers
For Cloudflare WorkersCloudflare Email Routing catches mail for a domain and forwards it somewhere else - useful, but one-directional, and there's no mailbox to reply from. Mektup gives a Worker a real mailbox instead: send and receive on your own domain, reachable with the same fetch() the Workers runtime already gives you.
Email Routing is a genuinely useful Cloudflare feature for catching mail at a domain and forwarding it to an existing address - but it only moves mail in one direction, into an inbox you already have elsewhere. It can't send, and there's nothing to check, reply from, or grant a teammate (or an agent) access to on the domain itself. Mektup runs real mail infrastructure behind a plain REST API, so the same domain gets a real mailbox: inbound and outbound, IMAP/SMTP/webmail for a person, and a REST API or MCP server for a Worker or an AI agent.
// worker.js export default { async fetch(request, env) { const { to, subject, text } = await request.json(); const res = await fetch("https://api.usemektup.com/v1/emails", { method: "POST", headers: { Authorization: `Bearer ${env.MEKTUP_API_KEY}`, "Content-Type": "application/json", }, body: JSON.stringify({ from: "hello@yourdomain.com", to, subject, text, }), }); return new Response(await res.text(), { status: res.status }); }, };
Nothing here is Node-specific - the Workers runtime's built-in fetch() is the entire integration, so there's no bundle-size cost and no compatibility flag to enable.
Add the domain to Mektup and get back the exact MX, SPF, DKIM, and DMARC records.
If the domain's DNS is already on Cloudflare, this is a few entries in the same zone you're already managing. It only adds MX and TXT records - any Worker routes, A/CNAME records, or Email Routing rules on the domain are untouched.
Create a mailbox, generate an API key, then run wrangler secret put MEKTUP_API_KEY so the Worker reads it from env at runtime instead of hardcoding it.
Use the snippet above from any Worker handler, Durable Object, or Queue consumer. Replies land in the same mailbox - readable in Mektup's webmail, over IMAP/SMTP in a normal mail client, or through the API from another Worker.
Getting started is free - 1 domain, 3,000 emails a month with no daily cap, and 3GB of storage, no credit card. See the full pricing.
Yes. Mektup is a plain HTTPS REST API, and the Workers runtime's built-in fetch() talks to it exactly like any other JSON API - no Node-only SDK, no polyfills.
Email Routing only forwards inbound mail on a domain to an existing address - it can't send, and there's no mailbox to reply from. Mektup gives a full mailbox: send, receive, IMAP/SMTP, webmail, and the same REST API a Worker calls.
Yes. Mektup's MCP server is itself a remote Streamable HTTP server (mcp.usemektup.com), the same shape a Workers-hosted agent or MCP client already talks to - no separate stdio process required.