runware-image-mcp
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., "@runware-image-mcpgenerate an image of a golden retriever puppy playing in a field"
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.
runware-image-mcp — Runware image generation for Claude agents
A self-hosted MCP server that lets Claude Code agents generate images directly via the Runware API — full parameter control, exact per-image USD cost reporting, every image saved locally, and a live localhost gallery to browse everything your agents create.
Typical cost: $0.0013/image (FLUX.1 schnell) to $0.0038/image (FLUX.1 dev, the default) at 1024×1024 — versus ~$0.50/image on hosted image-MCP subscriptions.
Setup (3 commands)
Get an API key at my.runware.ai (pay-per-use, new accounts get free credits).
Build:
npm install && npm run buildRegister with Claude Code (either way):
claude mcp add runware -e RUNWARE_API_KEY=<your-key> -- node "$PWD/dist/index.js"…or copy
.mcp.json.exampleto.mcp.jsonin your project and fill in the absolute path + key. Restart your Claude Code session afterwards.
The gallery is then live at http://127.0.0.1:7788 while any session with the server is open.
Runtime dependencies are kept minimal: the MCP SDK,
zod, andsharp(for localresize_image; ships prebuilt binaries, sonpm installneeds no build tools on macOS/Linux/Windows).
Related MCP server: SeeDream MCP Server
Tools
Tool | What it does |
| Text→image (and img2img / inpainting) with any Runware model. Params: |
| Search Runware's 30k+ model catalog; returns AIR ids plus recommended defaults and trigger words. |
| AI upscale 2–4× via Runware (local path, URL, or previous imageUUID). Costs money; enhances detail. |
| Resize a local image to exact pixel dimensions — local, instant, free (no API call). Exact icon sizes, @1x/@2x retina pairs, precise widths, PNG→WEBP conversion; preserves transparency; |
| Background removal (result is PNG with alpha). |
| Query the local generation history (prompt/model/project/date filters). |
Dimensions are auto-adjusted to Runware's grid (multiples of 64 within 128–2048) and the response tells you when that happened. Seeds are always returned so agents can reproduce or vary a result.
Gallery
Live grid of all generations (newest first) with prompt, model, seed, cost, and a running total spend; updates automatically as agents generate.
Lightbox with copy-prompt / copy-seed buttons; filter by prompt text, model, or the project the image was generated from; failures view.
Binds 127.0.0.1 only (not configurable), Host-header allowlisted, CSP'd.
Multiple concurrent Claude sessions share one gallery: the first instance owns the port, all instances write to the same image dir.
Configuration (env vars)
Var | Default | Purpose |
| — | Required for generation; without it, tools return setup instructions |
|
| Images + manifest location (shared across sessions) |
|
| Gallery port |
|
|
|
|
| Model when the agent doesn't pick one |
|
| Cap on |
| — | Extra colon-separated dirs allowed as local |
|
| API request timeout |
|
| Download host pin |
Privacy & security notes
~/.image-gen-mcp/manifest.jsonland the images are plaintext on disk (dir0700, files0600); prompts may contain project context.The only outbound connections are
api.runware.aiand the Runware CDN. No telemetry.Local
seed_imagefiles must be real images (extension + magic bytes) inside allowlisted directories — a prompt-injected agent can't feed~/.ssh/id_rsato the API.The API key lives only in your MCP registration (
.mcp.jsonis gitignored here); it is never logged, stored in the manifest, or shown in the gallery.
Development
npm run build # tsc + copy gallery assets (run before tests)
npm run typecheck
npm run test # offline suite — no network, no key, no spend
npm run test:live # opt-in real-API smoke (~$0.003, needs a key)Tests cover the Runware client (retry/error mapping/contract drift), storage crash-consistency, path-safety guards, the gallery's HTTP surface, an in-memory MCP protocol round-trip, and stdio purity (nothing but JSON-RPC may touch stdout).
This server cannot be deployed
Maintenance
Related MCP Connectors
- lightgenOAuthapp.lightgen
Generate and edit images and create short videos inside Claude. Prepaid credits, no subscription.
Generate images, GIFs, videos, and PDFs from HTML, URLs, or templates — from your AI agent.
AI image + video generation for agents: --flag prompt DSL, async generate/poll, x402 pay-per-use.
AI image and video generation, talking avatars, consistent characters and photo packs from Claude.
Related MCP Servers
AlicenseNot gradedqualityFmaintenanceEnables lightning fast image and video generation using the Runware API, with tools for inference, upscaling, background removal, and more.9MIT- AlicenseAqualityDmaintenanceEnables Claude Code to generate, edit, blend, and create variations of images using BytePlus SeeDream AI models, with streaming and Firebase sync.6MIT
- AlicenseAqualityBmaintenanceConnects Claude Code to image generation models (OpenAI GPT Image 2, Google Nano Banana) for generating, editing, and converting images via natural language.638 npmMIT
- AlicenseNot gradedqualityBmaintenanceEnables Claude Code to generate and edit raster images through OpenRouter, including image-to-image editing with up to 16 ordered references, text-to-image generation, and balance/credit checks.MIT