Integrates with Cloudflare Workers AI to generate images using models like SDXL, Flux, and Dreamshaper, supporting high-speed production environments.
Uses Cloudflare Workers AI as a provider for fast image generation with support for SDXL and Flux models.
Provides access to a wide variety of hosted image generation models on Hugging Face, including specialized models for pixel art and photorealistic styles.
Enables high-quality image generation through Replicate's API, supporting advanced models like Flux Pro and SDXL.
Click on "Install Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@Image Generation MCP Servergenerate a 64x64 pixel art sprite of a forest spirit in NES style"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
Image Generation MCP Server
Multi-provider image generation for AGI visual communication.
Features
Multi-Provider Support: Automatic fallback across 5 providers
FREE Default: Pollinations.ai requires no API key
Pixel Art Mode: Specialized generation for sprites and game assets
Auto-Save: Generated images automatically saved to disk
Cost Tracking: Monitor usage and costs per provider
Providers
Provider | Cost | API Key | Best For |
Pollinations.ai | FREE | None | Default, general use |
Cloudflare Workers AI | 10K neurons/day FREE | Required | Fast, production |
Together AI | ~$0.003/image | Required | Bulk generation |
Hugging Face | Free tier | Required | Model variety |
Replicate | 50/mo free | Required | High quality |
Installation
Configuration
Add to ~/.claude.json:
Environment Variables
Variable | Required | Description |
| No | Where to save images (default: |
| For CF | Cloudflare API token |
| For CF | Cloudflare account ID |
| For HF | Hugging Face token |
| For Together | Together AI key |
| For Replicate | Replicate token |
MCP Tools
generate_image
Generate an image from a text prompt.
generate_pixel_art
Specialized pixel art generation.
Styles: nes, snes, gameboy, modern, isometric
list_providers
List all providers with status.
list_models
List models for a provider.
get_provider_status
Health check for a provider.
save_image
Save base64 image to file.
Models by Provider
Pollinations.ai
flux(default) - High qualityflux-realism- Photorealisticflux-anime- Anime styleflux-3d- 3D rendersturbo- Fast generation
Cloudflare Workers AI
sdxl- Stable Diffusion XLsdxl-lightning- Fast 4-step SDXLflux-schnell- Fast Fluxdreamshaper- Photorealistic
Hugging Face
sdxl- Stable Diffusion XLsdxl-turbo- Fast SDXLflux-dev- Flux developmentflux-schnell- Fast Fluxplayground-v2.5- Aestheticrealvisxl- Photorealisticpixel-art- Pixel art specialized
Together AI
flux-schnell- FREE tier availableflux-dev- Higher qualityflux-pro- Best qualitysd3- Stable Diffusion 3
Replicate
flux-schnell- Fast Fluxflux-dev- Higher qualityflux-pro- Best qualitysdxl- Stable Diffusion XLplayground-v2.5- Aesthetic
Usage Examples
Basic Image Generation
Pixel Art for Sprites
With Specific Provider
Output
Images are saved to IMAGE_GEN_OUTPUT_DIR with format:
Example: 20241128_143022_mountain_landscape_pollinations.png
Error Handling
The server automatically falls back through providers if one fails:
Try requested provider (or Pollinations)
If failed, try Cloudflare
If failed, try Together AI
If failed, try Hugging Face
If failed, try Replicate
Return error with all attempted providers
Future Enhancements
Local GPU support (Flux/ComfyUI) when 12GB GPU available
Image-to-image generation
Inpainting and outpainting
Upscaling
Style transfer
Animation generation
License
MIT