TY

tan-yong-sheng/cloudflare-image-mcp

开发工具

本页由 AI 翻译,技术细节请以原文为准。 查看原文

5 stars 47 forks 质量 70 趋势 33

OpenAI-compatible image generation API + Streamable HTTP MCP server powered by Cloudflare Workers AI.

概览

OpenAI-compatible image generation API + Streamable HTTP MCP server powered by Cloudflare Workers AI. - : /v1/images/generations + /v1/images/edits endpoints - : HTTP transport with SSE (streamable) - : FLUX, SDXL, Stable Diffusion, and more - : Text-to-image, image-to-image (masked edits supported) - : React SPA for image generation and provider credentials - : Auto-expiring image storage with CDN 1. to your Cloudflare account (takes 5 minutes): 👉 2. Note your worker URL after deployment: 3. If you set API_KEYS during deployment, you'll need the key for authentication. Below are the configuration guides for different MCP clients. This server uses (not stdio) since it runs on Cloudflare Workers. This server implements the . Configure your client with: - : HTTP/SSE (streamable) - : https://your-worker.workers.dev/mcp - (if API_KEYS set): send Authorization: Bearer YOUR_KEY header

README

以下为原文 README 节选,完整内容请查看原文。

Cloudflare Image MCP

OpenAI-compatible image generation API + Streamable HTTP MCP server powered by Cloudflare Workers AI.

🌟 Features

  • OpenAI-Compatible API: /v1/images/generations + /v1/images/edits endpoints
  • MCP Protocol Support: HTTP transport with SSE (streamable)
  • 10 Image Generation Models: FLUX, SDXL, Stable Diffusion, and more
  • Multiple Tasks: Text-to-image, image-to-image (masked edits supported)
  • Web Frontend: React SPA for image generation and provider credentials
  • R2 Storage: Auto-expiring image storage with CDN

📦 What’s Included

cloudflare-image-mcp/
├── workers/           # Cloudflare Worker (API + MCP)
├── client/            # React SPA (Vite + Tailwind + TanStack Query)
└── e2e/               # Playwright E2E tests

🚀 Quick Start

Prerequisites

  1. Deploy this MCP server to your Cloudflare account (takes 5 minutes): 👉 Deployment Guide

  2. Note your worker URL after deployment:

    https://cloudflare-image-workers..workers.dev
    
  3. If you set API_KEYS during deployment, you’ll need the key for authentication.

MCP Client Configuration

Below are the configuration guides for different MCP clients. This server uses HTTP/SSE transport (not stdio) since it runs on Cloudflare Workers.

This server implements the MCP HTTP/SSE transport. Configure your client with:

在 GitHub 查看完整 README

安装

This server does not publish a one-line install command.

Open the repository installation guide 新手?先看 mcpskill.org 教程 →

配置

{ "mcpServers": { "cloudflare-image": { "url": "https://your-worker.workers.dev/mcp" } } }