MCP server for Cloudflare Workers AI image generation. Supports multiple models including FLUX, SDXL, and Dreamshaper.
- Multiple Models: flux-1-schnell, flux-2-dev, sdxl, dreamshaper
- Multi-Reference Support: flux-2-dev supports up to 4 reference images
- Free Tier: Cloudflare Workers AI offers 10,000 free requests per day
- Text Generation: flux models support English text in images
| Model | Description | Text Support | Quality |
|---|---|---|---|
flux-1-schnell |
Fast generation | ✅ English OK | ⭐⭐⭐⭐ |
flux-2-dev |
High quality, multi-reference | ✅ English OK | ⭐⭐⭐⭐⭐ |
sdxl |
Stability AI classic | ❌ | ⭐⭐⭐ |
dreamshaper |
Realistic, good for portraits | ❌ | ⭐⭐⭐ |
npm installAdd to your OpenClaw openclaw.json:
{
"plugins": {
"entries": {
"mcporter": {
"config": {
"servers": {
"cloudflare-flux": {
"command": "node",
"args": ["/path/to/cloudflare-flux/index.js"],
"env": {
"CLOUDFLARE_ACCOUNT_ID": "your-account-id",
"CLOUDFLARE_API_TOKEN": "your-api-token"
}
}
}
}
}
}
}
}mcporter call cloudflare-flux.generate_image \
prompt="a cute cat wearing a hat" \
model="flux-1-schnell"mcporter call cloudflare-flux.generate_image \
prompt="add a sailboat to the sea in image 0" \
model="flux-2-dev" \
input_image_0="/path/to/your/image.jpg"| Parameter | Type | Required | Description |
|---|---|---|---|
prompt |
string | ✅ | Image description (English works better, max 2048 chars) |
model |
string | ❌ | Model selection (default: flux-1-schnell) |
steps |
integer | ❌ | Diffusion steps (default: 4, max: 8, flux only) |
width |
integer | ❌ | Image width (flux-2-dev only, default: 1024) |
height |
integer | ❌ | Image height (flux-2-dev only, default: 1024) |
output_path |
string | ❌ | Save path (default: /tmp/generated-image.png) |
input_image_0 |
string | ❌ | Reference image 0 path (flux-2-dev only) |
input_image_1 |
string | ❌ | Reference image 1 path (flux-2-dev only) |
input_image_2 |
string | ❌ | Reference image 2 path (flux-2-dev only) |
input_image_3 |
string | ❌ | Reference image 3 path (flux-2-dev only) |
- Go to Cloudflare Dashboard
- Get your Account ID from the right sidebar
- Create an API Token with
Workers AIpermissions - Set environment variables or pass in config
MIT