Version 3.0.0 | Stateless Workers Architecture
This is a Model Context Protocol (MCP) server for AI-powered image generation using Cloudflare Workers AI. Built with a stateless architecture for instant startup and reliable operation.
Generate up to 20 images simultaneously with the count parameter!
Perfect for batch generation, variations, or rapid prototyping. Performance scales amazingly:
Generate one or more images using AI. Returns immediately with job ID(s) for async processing.
{
"prompt": "sunset over mountains",
"model": "flux-schnell", // optional: flux-schnell | sdxl-lightning | sdxl-base
"count": 5 // optional: 1-20 images (default: 1)
}
job_id if count=1, or job_ids array if count>1.
Returns: job_id or job_ids[] in pending status
Check the status of an image generation job. Poll this to get results.
{
"job_id": "abc123-def456-..."
}
Returns: Job details with status (pending/processing/completed/failed) and image_url when done
Wait for job(s) to complete automatically. No manual polling needed!
{
"job_id": "abc123-..." // Single job
// OR
"job_ids": ["abc", "def", ...] // Multiple jobs (up to 20)
}
Behavior: Polls every 3 seconds. Timeout scales with count (60s + 3s per job). Perfect for AI clients without timing capabilities.
One-call convenience: Generate and wait for completion automatically. Supports parallel generation!
{
"prompt": "futuristic city at night",
"model": "flux-schnell", // optional
"count": 10 // optional: 1-20 images
}
Returns: Completed image(s) with URL(s) when ready. Blocks until done (timeout scales with count).
Browse successfully completed images (gallery view) with pagination.
{
"limit": 10, // optional (1-50, default: 10)
"offset": 0 // optional (default: 0)
}
Returns: Array of completed generations with metadata, sorted by creation time (newest first)
List all jobs with optional status filtering and pagination.
{
"status": "all", // optional: all | pending | processing | completed | failed
"limit": 10, // optional (1-50, default: 10)
"offset": 0 // optional (default: 0)
}
Returns: Array of jobs matching the filter, sorted by creation time (newest first)
POST /mcp (JSON-RPC 2.0)POST /sse (Server-Sent Events)Authorization headerhttps://mcp-image-generator-v3.webfonts.workers.dev
Add to your claude_desktop_config.json:
{
"mcpServers": {
"image-generator": {
"command": "curl",
"args": [
"-X", "POST",
"https://mcp-image-generator-v3.webfonts.workers.dev/mcp",
"-H", "Content-Type: application/json",
"-H", "Authorization: Bearer YOUR_AUTH_TOKEN"
]
}
}
}
Add the server to your config:
claude mcp add image-generator \ --url https://mcp-image-generator-v3.webfonts.workers.dev/mcp \ --header "Authorization: Bearer YOUR_AUTH_TOKEN"
Then use prompts like: "Generate 5 variations of a mountain landscape"
Launch the inspector for debugging:
npx @modelcontextprotocol/inspector \ https://mcp-image-generator-v3.webfonts.workers.dev/sse \ -H "Authorization: Bearer YOUR_AUTH_TOKEN"
Add to Cursor's MCP settings (Cursor → Settings → MCP):
{
"image-generator": {
"url": "https://mcp-image-generator-v3.webfonts.workers.dev/mcp",
"headers": {
"Authorization": "Bearer YOUR_AUTH_TOKEN"
}
}
}
Configure in your Better Chatbot settings:
{
"url": "https://mcp-image-generator-v3.webfonts.workers.dev/mcp",
"headers": {
"Authorization": "Bearer YOUR_AUTH_TOKEN"
}
}
Call directly as an HTTP API:
// Node.js example
const response = await fetch('https://mcp-image-generator-v3.webfonts.workers.dev/mcp', {
method: 'POST',
headers: {
'Content-Type': 'application/json',
'Authorization': 'Bearer YOUR_AUTH_TOKEN'
},
body: JSON.stringify({
jsonrpc: '2.0',
id: 1,
method: 'tools/call',
params: {
name: 'generate_image_and_wait',
arguments: { prompt: 'cyberpunk city', count: 5 }
}
})
});
Single image: "Generate an image of a sunset over the ocean"
Parallel generation: "Generate 10 different abstract patterns"
With specific model: "Generate 3 images of a mountain landscape using sdxl-lightning"
Async workflow: "Start generating 5 images, I'll check back later"
✅ Server is running
✅ All 6 tools registered
✅ Parallel generation enabled (up to 20 images)
✅ Database connected
✅ Queue consumer active
✅ Dual transport support (HTTP + SSE)