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

CloudflareのEmail Service経由でメールを送信するための、JSON APIおよび**Model Context Protocol (MCP)**サーバーを公開する、オープンソースで本番環境対応のCloudflare Workerです。

特徴

  • MCPサーバー: AIエージェント(Claude、Geminiなど)に直接接続してメールを送信します。

  • REST API: 従来のアプリケーション統合のためのシンプルなJSONエンドポイント。

  • 高度なメールサポート: HTML本文、複数の宛先(To、CC、BCC)、および添付ファイルをサポート。

  • エッジパフォーマンス: 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 install

3. 設定

.dev.vars.example を .dev.vars にコピーし、ローカルの値を入力してください:

  • API_TOKEN: エンドポイント認証用の安全なトークン。

  • DEFAULT_SENDER: Email Routingドメインの承認済みメールアドレス。

  • 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_TOKEN

  • Content-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

Related MCP Connectors

Related MCP Servers

  • A
    license
    Not graded
    quality
    D
    maintenance
    A production-ready MCP server that empowers AI agents to securely send emails via SMTP, supporting plain text, HTML, and attachments.
    MIT
  • A
    license
    Not graded
    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.
    12 npm
    MIT
  • A
    license
    Not graded
    quality
    C
    maintenance
    An MCP server that enables AI agents to validate email addresses and send emails via SMTP with zero external dependencies.
    MIT
  • A
    license
    Not graded
    quality
    B
    maintenance
    MCP 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.
    1
    AGPL 3.0