openrouter-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., "@openrouter-image-mcp Generate a product photo of a ceramic mug on a wooden table, warm lighting"
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.
openrouter-image-mcp
Give your AI assistant the ability to generate and edit images. One install, multiple models, no vendor lock-in.
Works with Claude Code, Claude Desktop, Cursor, VS Code, Windsurf, and any MCP client.
Why This
One API key, every image model. Gemini, GPT-5, and more through OpenRouter. Switch models with a word, not a code change.
Generate, edit, and batch. Text-to-image, image editing with references, and batch operations (up to 20 parallel tasks).
Style presets. Say "in watercolor style" or "as pixel art" and get consistent results. 8 built-in styles.
Variations. Generate up to 4 takes from one prompt. Pick the best one.
Smart file output. Save to a path or a directory. Files get descriptive names automatically.
Pay for what you use. OpenRouter's per-token and per-image pricing means no subscriptions.
Related MCP server: openrouter-image-gen-mcp
How to Install
Get an OpenRouter API key, then add the server to your client.
Claude Code
# macOS / Linux
claude mcp add openrouter-image-mcp -s user -e OPENROUTER_API_KEY=YOURAPIKEY -- npx -y openrouter-image-mcp@latest
# Windows
claude mcp add openrouter-image-mcp -s user -e OPENROUTER_API_KEY=YOURAPIKEY -- cmd /c npx -y openrouter-image-mcp@latestClaude Desktop / Cursor / VS Code / Windsurf
Add to your MCP config JSON:
{
"mcpServers": {
"openrouter-image-mcp": {
"command": "npx",
"args": ["-y", "openrouter-image-mcp@latest"],
"env": {
"OPENROUTER_API_KEY": "YOURAPIKEY"
}
}
}
}What You Can Do
Simply chat with your assistant:
Generate a product photo of a ceramic mug on a wooden table, warm lightingGenerate 3 variations of a logo concept for a coffee brand, pixel-art styleEdit /path/to/headshot.png: make the background a gradient, keep the subjectBatch generate 5 social media banners: summer sale, back to school, holiday promo,
new arrivals, free shipping. All in illustration style, 16:9, save to ./banners/List image models. What's cheapest for quick drafts?Quality Presets
Skip the model IDs. Just say "fast", "balanced", or "quality":
Preset | Model | When to use |
| Gemini 2.5 Flash | Drafts, iteration, keeping costs low |
| Gemini 3 Pro | Day-to-day use (default) |
| GPT-5 Image | Final deliverables, max fidelity |
Or pass any OpenRouter model ID directly:
Generate a cat using model google/gemini-2.5-flash-imageStyle Presets
Keywords modifies the style:
Style | What you get |
| Photorealistic, DSLR, natural lighting |
| Clean digital art, vibrant colors |
| Soft washes, paper texture |
| Retro 16-bit, limited palette |
| Studio-lit, physically based rendering |
| Cel-shaded, Japanese animation |
| Pencil on paper, monochrome |
| Brushstrokes, impasto, classical |
Tools Reference
Convenient tools:
Tool | What it does |
| Text-to-image with quality/style presets, variations (1-4), aspect ratio, file output |
| Transform images with a prompt + up to 12 reference images (files, URLs, data URIs) |
| Run up to 20 generate/edit tasks in parallel with concurrency control |
| Browse available models with pricing |
| Check your OpenRouter credit balance |
Supported output: 1:1, 2:3, 3:2, 16:9, 9:16, 4:3, 3:4 aspect ratios. 0.5K, 1K, 2K, 4K sizes. PNG, JPEG, WebP, GIF inputs.
Headless Configuration
Flag | Env Var | Default |
|
| (required) |
|
|
|
|
|
|
|
|
|
|
|
|
Security
API keys never appear in logs or error messages. File paths block directory traversal. Image URLs are validated against SSRF patterns. Batch operations are memory-capped at 200MB. All inputs are schema-validated.
For Developers
To build for devs:
pnpm install && pnpm build && pnpm test # 57 testsLicense
MIT
Made with <3 at Bitcoin.com
Available Tools
5 toolsbatch_imagesB
Generate or edit multiple images in a single call with concurrency control. Each task can be a generation (prompt only) or edit (prompt + reference images).
Inputs: tasks (required), concurrency.
check_balanceA
Check your OpenRouter account balance — shows total credits, usage, and remaining balance.
Inputs: no named parameters.
edit_imageB
Edit or transform existing images using a text prompt and reference images. Supports local file paths, URLs, and data URIs. For best results, expand brief prompts with details about composition, lighting, color palette, and mood before calling — unless the user explicitly asked for a simple/minimal prompt.
Inputs: images (required), prompt (required), model, style, +3 more.
generate_imageA
Generate an image from a text prompt via OpenRouter. Supports quality presets (fast/balanced/quality) or explicit model IDs. For best results, expand brief prompts with details about composition, lighting, color palette, and mood before calling — unless the user explicitly asked for a simple/minimal prompt.
Inputs: prompt (required), count, model, style, +4 more.
list_image_modelsB
List available image generation models from OpenRouter with pricing and capabilities.
Inputs: query.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 5 tools
generate_image vs edit_image are clearly distinct (text-only vs reference-image inputs), and list_image_models/check_balance are unambiguous utilities. batch_images partially overlaps with both generate and edit since it wraps them, but its multi-task concurrency framing makes the intended use reasonably clear.
All five tools use snake_case verb_noun form: list_image_models, edit_image, generate_image, batch_images, check_balance. No camelCase or vague standalone verbs, so the pattern is fully predictable.
Five tools is a tight, well-scoped surface for an image generation/editing server: discovery, two core operations, a batch wrapper, and account balance. Nothing feels padded or missing at the count level.
The core lifecycle (list models, generate, edit, batch, check credits) is covered with no dead ends for typical workflows. Minor gaps exist around post-processing/inspection such as saving results to disk explicitly, upscaling, or retrieving previously generated images.
Maintenance
Related MCP Connectors
Make images and video with 30+ AI models from your assistant, on your own credits and library.
Image and video AI tools and your own pipelines, run from any AI assistant.
LLM chat, text tools, image generation, editing, batch image jobs, and asynchronous video generation
Generate and upscale AI images, video and audio with leading models, right from your AI chat.
Related MCP Servers
- AlicenseNot gradedqualityDmaintenanceEnables AI assistants to generate high-quality images using Google's Gemini and Imagen models with support for multiple aspect ratios, dynamic model selection, and direct file saving capabilities.MIT
- AlicenseNot gradedqualityDmaintenanceEnables AI assistants to generate and edit images using multiple models through OpenRouter, with features like style presets, batch operations, and variations.22 npm1MIT
- AlicenseAqualityDmaintenanceGives AI assistants image generation and editing capabilities through OpenRouter, supporting multiple models, style presets, variations, and batch operations.547 npm2MIT
- AlicenseNot gradedqualityAmaintenanceEnables AI assistants to generate and edit images from natural-language requests, automatically enhancing prompts and applying quality/provider presets across Gemini, OpenAI, and BytePlus Seedream.1,225 npmMIT