runware-image-mcp
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., "@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: Runware 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 installed
Maintenance
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
Latest Blog Posts
- Your AI Chatbot Just Exposed Your CEO's Salary to an InternBy Om-Shree-0709 on .Agent IdentityMCP SecurityOAuth Delegation
- Why MCP Servers Need Execution Sandboxing (And Why Your Current Stack Isn't Enough)By Om-Shree-0709 on .Agentic AiPrompt InjectionWebAssembly
MCP directory API
We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/Oriolshhh/runware-image-mcp'
If you have feedback or need assistance with the MCP directory API, please join our Discord server