- Home
- MCP servers
- CF-MCP-Server
CF-MCP-Server
- javascript
0
GitHub Stars
javascript
Language
7 months ago
First Indexed
3 months ago
Catalog Refreshed
Documentation & install
Readme and setup notes from the catalogue, plus a client-ready config you can copy for your MCP host.
You can run an MCP-based image generation service at the edge with Cloudflare Workers. This setup provides a standardized MCP interface to request image generation, leverages an efficient Flux-1-Schnell model, and returns results quickly as Base64-encoded PNGs. It’s designed to be easily extended with new tools and resources while taking advantage of edge deployment for low latency.
How to use
You interact with the MCP server using an MCP client to request image generation. Start a request by supplying a prompt and a desired number of generation steps within the supported range. The server responds with a Base64-encoded PNG image you can render directly in your application or convert to a usable image file.
How to install
# Prerequisites
node -v # ensure Node.js 18+ is installed
pnpm -v # ensure pnpm is installed
wrangler --version # ensure Wrangler CLI is installed (see steps below)
# 1) Install dependencies
pnpm install
# 2) Configure environment variables
cp .env.example .env
# 3) Deploy the Worker
pnpm deploy
Additional setup notes
Key MCP configuration is exposed for requesting image generation from an MCP client. The server offers an HTTP endpoint for remote access and a stdio-based local command for development workflows. Ensure the remote URL is reachable from your client when using the HTTP method, and use the provided local command for testing and integration in your development environment.
Configuration and endpoints
{
"mcpServers": {
"generateImage": {
"type": "http",
"name": "generate_image",
"url": "https://mcp-image-generation.turinhub.com",
"args": []
}
}
}
Tools and capabilities
This MCP server exposes a focused image generation capability and a stable interface for extension. The core tool accelerates image generation via a Cloudflare Worker and a Flux-1-Schnell model, delivering 4–8 generation steps per request and returning a PNG image encoded as Base64.
Troubleshooting and notes
If deployment or HTTP access encounters issues, verify that Node.js 18+ and the Wrangler CLI are correctly installed, environment variables are properly configured, and the deployed Worker is reachable at the given URL. For local testing, use the stdio command provided to run the MCP worker with the expected arguments.
Security considerations
Keep environment secrets in your secure environment and avoid exposing sensitive prompts or API keys in client code. When using the HTTP MCP endpoint, implement appropriate authentication and access controls as needed for your application.
Available tools
image_generation
MCP-compliant image generation service powered by a Cloudflare Worker and Flux-1-Schnell model, returning Base64 PNG with 4–8 steps.
mcp_interface
Provides a standard MCP API surface for initiating image generation requests and handling responses.