loading…
Search for a command to run...
loading…
Enables AI agents to send emails via Cloudflare's Email Service. Provides both MCP server integration for AI tools and a REST API for traditional applications w
Enables AI agents to send emails via Cloudflare's Email Service. Provides both MCP server integration for AI tools and a REST API for traditional applications with support for HTML content, attachments, and secure authentication.
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.
bun or npm installed.git clone https://github.com/sh20raj/cf-email-mcp-api.git
cd cf-email-mcp-api
bun install
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.bun run deploy
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"
}
}
}
}
Add to your mcp_config.json:
{
"mcpServers": {
"cf-email": {
"transport": "http",
"url": "https://your-worker.workers.dev/mcp",
"headers": {
"Authorization": "Bearer YOUR_API_TOKEN"
}
}
}
}
POST /api/send
Headers:
Authorization: Bearer YOUR_API_TOKENContent-Type: application/jsonBody:
{
"to": "[email protected]",
"replyTo": "[email protected]",
"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"
}
]
}
MIT
Добавь это в claude_desktop_config.json и перезапусти Claude Desktop.
{
"mcpServers": {
"cloudflare-email-mcp": {
"command": "npx",
"args": []
}
}
}