Cloudflare Email MCP
Cloudflare Email MCP & API Wrapper 📧
一个开源、生产就绪的 Cloudflare Worker,它公开了一个 JSON API 和一个模型上下文协议 (MCP) 服务器,用于通过 Cloudflare 的电子邮件服务发送邮件。
功能
MCP 服务器:直接连接到 AI 智能体(Claude、Gemini 等)以发送电子邮件。
REST API:用于传统应用程序集成的简单 JSON 端点。
高级电子邮件支持:HTML 正文、多个收件人(收件人、抄送、密送)和附件。
边缘性能:基于 Cloudflare Workers 构建,实现全球低延迟。
安全:API 和 MCP 端点均支持 Bearer 令牌身份验证。
Related MCP server: communication-mcp-server
快速入门(一次部署)
1. 先决条件
一个配置了电子邮件路由 (Email Routing) 的 Cloudflare 账户。
已安装
bun或npm。
2. 安装
git clone https://github.com/sh20raj/cf-email-mcp-api.git
cd cf-email-mcp-api
bun install3. 配置
将 .dev.vars.example 复制到 .dev.vars 并填入您的本地值:
API_TOKEN:用于端点身份验证的安全令牌。DEFAULT_SENDER:来自您电子邮件路由域名的已授权电子邮件地址。DEFAULT_FROM_NAME:可选的发件人显示名称。
4. 部署
bun run deploy🤖 AI 智能体集成 (MCP)
添加到 Claude Desktop
将以下内容添加到您的 claude_desktop_config.json 中:
{
"mcpServers": {
"cf-email": {
"transport": "http",
"url": "https://your-worker.workers.dev/mcp",
"headers": {
"Authorization": "Bearer YOUR_API_TOKEN"
}
}
}
}添加到 Gemini / Antigravity
添加到您的 mcp_config.json 中:
{
"mcpServers": {
"cf-email": {
"transport": "http",
"url": "https://your-worker.workers.dev/mcp",
"headers": {
"Authorization": "Bearer YOUR_API_TOKEN"
}
}
}
}🛠️ API 参考
发送电子邮件
POST /api/send
请求头:
Authorization: Bearer YOUR_API_TOKENContent-Type: application/json
请求体:
{
"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"
}
]
}许可证
MIT
This server cannot be deployed
Maintenance
Related MCP Connectors
Email infrastructure for AI agents — send, receive, search, and reply to email over MCP.
Hosted email for AI agents: create inboxes, send, receive, and reply over MCP with scoped API keys
MCP server for e-mail testing: create disposable inboxes, wait for delivery, and extract e-mail content or links - all from your AI agent or test automation workflow. Get a free API key on https://app.zyntra.app/
Hosted email MCP for AI agents with inboxes, send/receive, memory, recovery, and credits.
Related MCP Servers
- AlicenseNot gradedqualityDmaintenanceA production-ready MCP server that empowers AI agents to securely send emails via SMTP, supporting plain text, HTML, and attachments.MIT
- AlicenseNot gradedqualityBmaintenanceMCP 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.12 npmMIT
- AlicenseNot gradedqualityCmaintenanceAn MCP server that enables AI agents to validate email addresses and send emails via SMTP with zero external dependencies.MIT
- AlicenseNot gradedqualityBmaintenanceMCP server that acts as an email gateway for Gmail and Microsoft 365, enabling AI agents to send and read emails via MCP tools, with SMTP/IMAP and REST APIs for email sequencing and automation.1AGPL 3.0