Runware Image
БесплатноНе проверенEnables 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.
Описание
Enables 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.
README
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).
Tools
| Tool | What it does |
|---|---|
generate_image |
Text→image (and img2img / inpainting) with any Runware model. Params: prompt, negative_prompt, model (AIR id), width/height or aspect_ratio (e.g. "16:9"), steps, cfg_scale, scheduler, seed, number_results, lora, seed_image + strength, mask_image, output_format, output_quality, vae, clip_skip, check_nsfw, return_image, extra_params (raw Runware passthrough). Returns local file path, seed, and exact USD cost. |
search_models |
Search Runware's 30k+ model catalog; returns AIR ids plus recommended defaults and trigger words. |
upscale_image |
AI upscale 2–4× via Runware (local path, URL, or previous imageUUID). Costs money; enhances detail. |
resize_image |
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; contain/cover/fill/inside/outside fit modes. For AI quality enlargement use upscale_image. |
remove_background |
Background removal (result is PNG with alpha). |
list_generated_images |
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 |
|---|---|---|
RUNWARE_API_KEY |
— | Required for generation; without it, tools return setup instructions |
IMAGE_GEN_DIR |
~/.image-gen-mcp |
Images + manifest location (shared across sessions) |
GALLERY_PORT |
7788 |
Gallery port |
GALLERY |
on |
off disables the gallery |
DEFAULT_MODEL |
runware:101@1 (FLUX.1 dev) |
Model when the agent doesn't pick one |
MAX_RESULTS_PER_CALL |
4 |
Cap on number_results |
IMAGE_GEN_ALLOWED_DIRS |
— | Extra colon-separated dirs allowed as local seed_image sources |
RUNWARE_TIMEOUT_MS |
120000 |
API request timeout |
RUNWARE_CDN_HOST_SUFFIX |
.runware.ai |
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).
Установка Runware Image
У этого сервера нет опубликованного пакета — он собирается из исходников. Открой репозиторий и следуй инструкции в README.
▸ github.com/Oriolshhh/runware-image-mcpFAQ
Runware Image MCP бесплатный?
Да, Runware Image MCP бесплатный — установка в пару кликов через Unyly без оплаты.
Нужен ли API-ключ для Runware Image?
Нет, Runware Image работает без API-ключей и переменных окружения.
Runware Image — hosted или self-hosted?
Self-hosted: сервер запускается локально на твоей машине командой из раздела установки.
Как установить Runware Image в Claude Desktop, Claude Code или Cursor?
Открой Runware Image на unyly.org, выбери вкладку своего клиента (Claude Desktop, Claude Code, Cursor) и нажми Install — конфиг сгенерируется автоматически, без правки JSON.
Похожие MCP
GitHub
PRs, issues, code search, CI status
автор: GitHubFilesystem
Secure file operations with configurable access controls.
Memory
Knowledge graph-based persistent memory system.
Template MCP Server
A CLI tool to create a new Model Context Protocol server project with TypeScript support, dual transport options, and an extensible structure
автор: mcpdotdirectCompare Runware Image with
Не уверен что выбрать?
Найди свой стек за 60 секунд
Автор?
Embed-бейдж для README
Похожее
Все в категории development
