Image Forge
Uses Cloudflare Workers AI to generate and edit images with FLUX.2 Klein, including quota-aware budgeting and disk output of generated PNG/JPG files.
Click on "Deploy 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 Forge make a 1024x1024 cover image of a lighthouse at dusk, muted blues"
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 Forge
An MCP server that lets your coding agent generate or edit images on Cloudflare Workers AI and save them to disk, keeping base64 out of the conversation.
It runs on Cloudflare's free daily allowance, so an agent can draw without a paid API key.
Why this one
No card, no per-image bill. Cloudflare gives 10,000 Neurons/day free. At roughly 104–126 Neurons per 1024px image, that is about 80 images a day, resetting at 00:00 UTC.
Files, not payloads. Every call writes a PNG/JPG to disk and returns its path, size and seed. Your context window never absorbs an image.
A budget guard, not a surprise invoice. Each call is estimated before it runs; the server warns at 8,000 Neurons and refuses to cross 9,500.
One tool surface for both directions.
generate_imagefor text,edit_imageto rework an existing file, URL orfile://path.Honest trade-off.
flux-2-klein-4bis fast and cheap, not a frontier image model: it handles style, palette and composition well, and struggles with long legible text. There is no mask-based inpainting and no upscaling.
Alternatives such as the OpenAI or Gemini image MCP servers buy stronger instruction following and text rendering, paid per image with an API key. Pick those when that is the requirement; pick this when you want many images a day for free and the results stored on disk.
Related MCP server: runware-image-mcp
Quickstart
Requires Node.js >= 20.6 (the server uses --env-file).
git clone https://github.com/JORDANROBERTO74/image-forge-mcp.git
cd image-forge-mcp
pnpm install && pnpm build
cp .env.example .envFill two values in .env:
CLOUDFLARE_ACCOUNT_ID— right sidebar of Workers & Pages in the Cloudflare dashboard.CLOUDFLARE_API_TOKEN— a custom token with permission Account → Workers AI → Read.
Then register the server with absolute paths. OpenCode (~/.config/opencode/opencode.jsonc):
"image-forge": {
"type": "local",
"command": [
"node",
"--env-file=/absolute/path/to/image-forge-mcp/.env",
"/absolute/path/to/image-forge-mcp/build/index.js"
]
}Claude Desktop (%APPDATA%\Claude\claude_desktop_config.json on Windows):
"image-forge": {
"command": "node",
"args": [
"--env-file=/absolute/path/to/image-forge-mcp/.env",
"/absolute/path/to/image-forge-mcp/build/index.js"
]
}Use double backslashes for Windows paths inside JSON (C:\\tools\\image-forge-mcp\\...).
Use it
Ask your agent in plain language: "generate a 1024x1024 cover image of a lighthouse at dusk, muted blues". It calls:
{ "prompt": "a lighthouse at dusk, muted blue palette, soft haze", "width": 1024, "height": 1024 }and gets back a path plus metadata:
✅ 1 imagen(es) · flux-2-klein-4b · 1024x1024
1. /home/you/Downloads/image-forge-20261029-101500.png (1024x1024, 581 KB, seed n/a)
costo: ~104 neurons (hoy: ~104 de ~10.000)For a variant, the agent calls edit_image with the original path and a prompt that describes
what to keep and what to change. Reusing the seed reproduces an earlier result.
Tools
Tool | Input | Use |
|
| Text to image. |
|
| Existing image plus instructions; local path, |
|
| Dimensions, format, size. Reads headers only; no API call, no quota. |
Shared parameters: model, width/height (256–2048), steps (1–20), seed, count (1–4,
each image uses seed + index), out_dir. strength and negative_prompt exist but only
affect sd15-img2img, which most accounts cannot access — see Limits.
Skills
Two Agent Skills are included so an agent knows how to drive the server without being told the parameters:
Skill | What it encodes |
Prompt shaping, size, variants, quota discipline. | |
Cloning an existing image while changing one named thing, without losing composition or lighting. |
npx skills add JORDANROBERTO74/image-forge-mcpOr copy them yourself: cp -r skills/* ~/.config/opencode/skills/ (or ~/.claude/skills/ for
Claude-compatible agents), then restart the client.
Configuration
Set in .env. Defaults work for a first run.
Variable | Default | Purpose |
| — | Required to generate. |
| — | Required to generate. |
|
| Output folder, created if missing. |
|
| Model when a call omits one. |
|
| Cap on |
|
| Max input image size. |
|
| Warning threshold. |
|
| Hard stop before the daily limit. |
|
| Per-request timeout. |
|
| Generation log. |
|
| Multipart field name for FLUX.2. |
Limits and status
Version 1.0.0, single maintainer. Built and tested on Windows with Node 24; no npm package yet, install from source. Expectations are set by what the source and the live API show, not by a roadmap.
flux-2-klein-4bis the only dependable model here. It is verified for editing (10.5 s at 1024x1024, ~580 KB PNG) and text-to-image (20.7 s) against the live API on 2026-10-22.sd15-img2imgis registered for itsstrengthcontrol and $0.00 steps, but returned HTTP 403 / error 5018 ("account is not allowed to access") on the test account and cannot do text-to-image at all. Treat it as unavailable unless your account says otherwise.Cloudflare does not itemise the multipart schema for FLUX.2; the verified field name is
input_image, override withIMAGE_FORGE_MULTIPART_IMAGE_FIELDif that changes.Output is written atomically (
.tmpthen rename); partial files are never left behind.Tool output and error messages are in Spanish; the tool names and parameters are English.
One provider today. Adding another means one file under
src/providers/; the tool surface stays the same.
Development commands: pnpm test:local (image I/O, naming, history, budget math) and
pnpm test:mcp (handshake, tool list, error paths) run without credentials. pnpm spike
reports which models your account can actually reach.
License
MIT. See LICENSE.
Available Tools
3 toolsedit_imageA
Genera una nueva imagen a partir de otra imagen + un prompt. Guarda el resultado en disco y devuelve la ruta.
Inputs: image (required), prompt (required), seed, count, +7 more.
generate_imageA
Genera una imagen desde texto. Guarda el resultado en disco y devuelve la ruta.
Inputs: prompt (required), seed, count, model, +5 more.
get_image_infoA
Lee dimensiones, formato y tamaño de un archivo de imagen local. No consume API ni cuota.
Inputs: path (required).
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 3 tools
Each tool targets a clearly distinct operation: text-to-image (generate_image), image+prompt-to-image (edit_image), and local metadata inspection (get_image_info). There is no plausible overlap; the descriptions explicitly contrast the source of input (text vs. existing image) and note that get_image_info consumes no API quota, further separating it.
All three names follow a strict verb_noun snake_case pattern (edit_image, generate_image, get_image_info), with verbs that accurately match the action. No camelCase mixing or vague verbs.
Three tools is a small but coherent surface for an image generation server — one per core action (generate, edit, inspect). It is slightly thin (no listing, batch, or transform operations), but nothing feels redundant or unearned.
The generate/edit/inspect cycle covers the primary workflow, but common adjacent operations are absent: resize/crop/convert, upscaling or variations, inpainting with masks, and any way to list or clean up previously written files. An agent can produce and inspect images but hits dead ends for post-processing or asset management.
Maintenance
Related MCP Connectors
AI image + video generation for agents: --flag prompt DSL, async generate/poll, x402 pay-per-use.
LLM chat, text tools, image generation, editing, batch image jobs, and asynchronous video generation
Image & PDF tools for AI agents: compress, convert, resize, PDF, AI vision, pipeline.
Generate images, video, and audio with Glif's media-generation agent
Related MCP Servers
- AlicenseNot gradedqualityDmaintenanceProvides AI agents and coding assistants with image generation and editing capabilities using OpenAI's GPT-image-1 model, with support for local or Supabase storage.54 PyPI3MIT
- AlicenseNot gradedqualityDmaintenanceEnables Claude Code agents to generate images via the Runware API with full parameter control, exact USD cost reporting, local image saving, and a live gallery.MIT
- AlicenseAqualityCmaintenanceEnables coding agents to generate and edit images using Gemini and OpenAI image models, saving files directly into the project with configurable providers, models, and security restrictions.389 npm1MIT
- AlicenseNot gradedqualityCmaintenanceEnables coding agents and other MCP clients to generate images from text prompts and edit, restyle, or extend existing images through an OpenAI-compatible /v1/images API. Results are returned both inline as image content blocks and as files saved to disk, so agents can view and reuse them within a normal task.264 npm1MIT