Skip to main content
Glama
SH20RAJ

Cloudflare Email MCP

by SH20RAJ

Cloudflare Email MCP & API Wrapper 📧

Visitors Cloudflare Workers MCP Endpoint Wrangler License: MIT Deploy Target

An open-source, production-ready Cloudflare Worker that exposes a JSON API and a Model Context Protocol (MCP) server for sending emails via Cloudflare's Email Service.

Features

  • MCP Server: Connect directly to AI agents (Claude, Gemini, etc.) to send emails.

  • REST API: Simple JSON endpoint for traditional application integration.

  • Advanced Email Support: HTML bodies, multiple recipients (To, CC, BCC), and attachments.

  • Edge Performance: Built on Cloudflare Workers for global low-latency.

  • Secure: Bearer token authentication for both API and MCP endpoints.

Related MCP server: email-mcp

Quick Start (Deploy Once)

1. Prerequisites

  • A Cloudflare account with a domain configured for Email Routing.

  • bun or npm installed.

2. Installation

git clone https://github.com/sh20raj/cf-email-mcp-api.git
cd cf-email-mcp-api
bun install

3. Configuration

Copy .dev.vars.example to .dev.vars and fill in your local values:

  • API_TOKEN: A secure token for endpoint authentication.

  • DEFAULT_SENDER: An authorized email address from your Email Routing domain.

  • DEFAULT_FROM_NAME: Optional sender display name.

4. Deploy

bun run deploy

🤖 AI Agent Integration (MCP)

Adding to Claude Desktop

Add the following to your claude_desktop_config.json:

{
  "mcpServers": {
    "cf-email": {
      "transport": "http",
      "url": "https://your-worker.workers.dev/mcp",
      "headers": {
        "Authorization": "Bearer YOUR_API_TOKEN"
      }
    }
  }
}

Adding to Gemini / Antigravity

Add to your mcp_config.json:

{
  "mcpServers": {
    "cf-email": {
      "transport": "http",
      "url": "https://your-worker.workers.dev/mcp",
      "headers": {
        "Authorization": "Bearer YOUR_API_TOKEN"
      }
    }
  }
}

🛠️ API Reference

Send Email

POST /api/send

Headers:

  • Authorization: Bearer YOUR_API_TOKEN

  • Content-Type: application/json

Body:

{
  "to": "recipient@example.com",
  "replyTo": "support@example.com",
  "subject": "Hello from API",
  "html": "<h1>Professional Email</h1><p>Sent via Cloudflare Workers.</p>",
  "attachments": [
    {
      "name": "report.pdf",
      "type": "application/pdf",
      "data": "BASE64_ENCODED_DATA"
    }
  ]
}

License

MIT

A
license - permissive license
-
quality - not tested
D
maintenance

Maintenance

Maintainers
Response time
Release cycle
Releases (12mo)
Commit activity

Resources

Unclaimed servers have limited discoverability.

Looking for Admin?

If you are the server author, to access and configure the admin panel.

Related MCP Servers

  • A
    license
    A
    quality
    A
    maintenance
    An MCP server for EmailJS that enables AI agents to send emails, validate configurations, and query email history through natural language.
    Last updated
    3
    12
    2
    MIT
  • A
    license
    -
    quality
    D
    maintenance
    A production-ready MCP server that empowers AI agents to securely send emails via SMTP, supporting plain text, HTML, and attachments.
    Last updated
    MIT
  • A
    license
    -
    quality
    B
    maintenance
    MCP server that provides email communication tools (send email, health check, list providers) via SMTP, accessible over HTTP/SSE for remote AI clients like Claude Desktop.
    Last updated
    14
    MIT
  • A
    license
    -
    quality
    C
    maintenance
    An MCP server that enables AI agents to validate email addresses and send emails via SMTP with zero external dependencies.
    Last updated
    MIT

View all related MCP servers

Related MCP Connectors

  • Shipmail MCP server for AI agent custom-domain email inboxes with REST API and webhooks.

  • Hosted email MCP for AI agents with inboxes, send/receive, memory, recovery, and credits.

  • Email for AI agents: send mail, manage contacts, automations & webhooks. Zero-DNS first send.

View all MCP Connectors

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/SH20RAJ/cloudflare-email-mcp-api-wrapper'

If you have feedback or need assistance with the MCP directory API, please join our Discord server