Cloudflare Edge Services
About
Provides image generation, URL content extraction, and web search capabilities through Cloudflare Workers deployed globally on edge networks for high performance and scalability.
Details
- Author
- turinhub
- Repository
- turinhub/cf-mcp-server
- License
- MIT License
- Categories
- Developer Tools, Design, AI, Media, Search, Frontend, Cloud Service
- Tags
- #integration, #web
Jump to
Setting up with Highlight
This MCP is not yet compatible with Highlight’s one-click setup. However, you can still use it with Highlight by following these steps:
- Download and install Highlight from highlightai.com/download
- Navigate to the plugins tab and select "Add Custom Plugin"
-
Configure the plugin with the settings below
Plugin Name
Cloudflare Edge ServicesCommand (node, npx, python, etc.)/Users/zhangxudong/Gits/turinhub/cf-mcp-server/mcp-image-generation/node_modules/.bin/workers-mcpArguments-
Argument 1
run -
Argument 2
generateImage -
Argument 3
https://mcp-image-generation.turinhub.com -
Argument 4
/Users/zhangxudong/Gits/turinhub/cf-mcp-server/mcp-image-generation
Please refer to the README for specific instructions on how to obtain API keys or other required environment variables.
-
Argument 1
- Enable "Start Automatically" if you want the plugin to start when Highlight launches
Claude Desktop / Cursor
Paste into your MCP client config file to install this server.
{
"mcpServers": {
"cloudflare edge services": {
"env": {},
"args": [
"run",
"generateImage",
"https://mcp-image-generation.turinhub.com",
"/Users/zhangxudong/Gits/turinhub/cf-mcp-server/mcp-image-generation"
],
"command": "/Users/zhangxudong/Gits/turinhub/cf-mcp-server/mcp-image-generation/node_modules/.bin/workers-mcp"
}
}
}
Linux
{
"env": [],
"args": [
"run",
"generateImage",
"https://mcp-image-generation.turinhub.com",
"/Users/zhangxudong/Gits/turinhub/cf-mcp-server/mcp-image-generation"
],
"command": "/Users/zhangxudong/Gits/turinhub/cf-mcp-server/mcp-image-generation/node_modules/.bin/workers-mcp"
}
Macos
{
"env": [],
"args": [
"run",
"generateImage",
"https://mcp-image-generation.turinhub.com",
"/Users/zhangxudong/Gits/turinhub/cf-mcp-server/mcp-image-generation"
],
"command": "/Users/zhangxudong/Gits/turinhub/cf-mcp-server/mcp-image-generation/node_modules/.bin/workers-mcp"
}
Windows
{
"env": [],
"args": [
"run",
"generateImage",
"https://mcp-image-generation.turinhub.com",
"/Users/zhangxudong/Gits/turinhub/cf-mcp-server/mcp-image-generation"
],
"command": "/Users/zhangxudong/Gits/turinhub/cf-mcp-server/mcp-image-generation/node_modules/.bin/workers-mcp"
}
CF-MCP-Server
基于 Model Context Protocol (MCP) 的图像生成服务实现,采用 Cloudflare Workers 构建。
核心功能
- 🖼️ 基于 MCP 协议的标准化服务接口
- 🚀 开箱即用的图像生成 Worker 模块
- 🔧 支持快速扩展自定义工具和资源
- ⚡ 边缘计算优化部署
模块构成
mcp-image-generation
graph LR
subgraph mcp-image-generation
A[Cloudflare Worker] --> B[Flux-1-Schnell 模型]
A --> C[图像生成API]
C --> D((4-8 steps))
end
- 支持步骤数范围:4-8 steps
- 响应格式:Base64 编码的 PNG 图像
- 部署方式:Cloudflare Workers
快速开始
环境要求
- Node.js 18+ - Wrangler CLI - NPM安装部署
# 安装依赖
pnpm install
配置环境变量
cp .env.example .env
部署Worker
pnpm deploy
API 文档
图像生成接口
配置示例:{
"mcpServers": {
"generateImage": {
"command": "/Users/zhangxudong/Gits/turinhub/cf-mcp-server/mcp-image-generation/node_modules/.bin/workers-mcp",
"args": [
"run",
"generateImage",
"https://mcp-image-generation.turinhub.com",
"/Users/zhangxudong/Gits/turinhub/cf-mcp-server/mcp-image-generation"
],
"env": {}
}
}
}
参数说明:
| 参数 | 类型 | 约束 | 说明 |
|--------|--------|--------------|------------------|
| prompt | string | 1-500字符 | 英文描述提示词 |
| steps | number | 4 ≤ steps ≤ 8 | 生成迭代步数 |
开发指南
添加新工具
参考在线文档 官方案例代码库1. 使用 MCP SDK 创建新 Worker:
npx create-cloudflare@latest my-new-worker
cd my-new-worker # I always forget this bit
npm install workers-mcp
npx workers-mcp setup
注意:不要在项目本地 package.json 安装 wrangler,直接使用全局管理。
2. 实现工具逻辑后更新主服务配置
3. 使用 @modelcontextprotocol/inspector 测试 MCP
npx @modelcontextprotocol/inspector
贡献说明
欢迎通过 Issue 和 PR 参与贡献,请遵循现有代码风格。许可证
MIT License © 2025 TurinhubSign in to leave a review
Use Google, GitHub, or an email account so ratings stay tied to real people.
No reviews posted yet.




