Gen Image MCP logo

Gen Image MCP

Local stdio tools for generating and editing images through OpenAI-compatible or Gemini APIs, with saved outputs and model fallback.

Install Gen Image MCP

Pick your client, then add it in one click or paste the config.

STDIONode.js
~/Library/Application Support/Claude/claude_desktop_config.json
claude_desktop_config.json
{
  "mcpServers": {
    "gen-image-mcp": {
      "command": "npx",
      "args": [
        "-y",
        "gen-image-mcp"
      ],
      "env": {
        "GEN_IMAGE_BASE_URL": "YOUR_VALUE_HERE",
        "GEN_IMAGE_API_KEY": "YOUR_VALUE_HERE",
        "GEN_IMAGE_MODEL": "YOUR_VALUE_HERE",
        "GEN_IMAGE_GEMINI_MODEL": "YOUR_VALUE_HERE",
        "GEN_IMAGE_AUTO_FALLBACK": "YOUR_VALUE_HERE"
      }
    }
  }
}

Settings → Developer → Edit Config, merge this into mcpServers, then fully quit and reopen Claude Desktop.

Values are written into the snippet above so you can paste it as is. They never leave your browser.

Claude Code command
claude mcp add --env GEN_IMAGE_BASE_URL=YOUR_VALUE_HERE --env GEN_IMAGE_API_KEY=YOUR_VALUE_HERE --env GEN_IMAGE_MODEL=YOUR_VALUE_HERE --env GEN_IMAGE_GEMINI_MODEL=YOUR_VALUE_HERE --env GEN_IMAGE_AUTO_FALLBACK=YOUR_VALUE_HERE --transport stdio gen-image-mcp -- npx -y gen-image-mcp

Run in your terminal. Add --scope project to share it with your team through .mcp.json.

We couldn’t confirm it starts correctly

We hit an unexpected error while testing this listing automatically.

npx -y gen-image-mcp

Rate limit exceeded, please try again later - you have reached the maximum number of concurrent E2B sandboxes (20). If you need more, please visit 'https://e2b.dev/docs/billing'

This is an experimental automated check and can have false negatives — missing environment variables, a slow cold install, etc. It doesn’t necessarily mean something’s wrong. Last checked .

Overview

The gen-image MCP MCP server exposes image generation and editing through a local stdio process. It connects to an OpenAI-compatible image API or a Gemini image model available through an OpenAI-compatible gateway, then saves returned images on the machine running the server. Tools cover text-to-image, reference-image generation, multi-image editing, masks, and model listing. Reach for it when an agent needs image files written directly into a project and should retry or switch models after capacity or rate-limit failures.

Use cases

  • Generate project-ready hero images from an agent prompt
  • Edit local assets with optional masks
  • Create Gemini images from reference images
  • Switch between configured image models after failures

Key features

  • OpenAI-compatible image generation
  • Gemini image and reference-image generation
  • Local image editing with masks
  • Automatic retry and model fallback
  • Project-local file output
  • Model configuration inspection

Security & health

What it can reach and how reliably it runs — from our own checks, not the maintainer’s claims.

ActiveLast checked

Recent health check succeeded.

14/14 checks healthy over the last 67d

Supply-chain signal

No high-severity advisories surfaced by our automated scan.

Critical 0High 0Medium 0Low 0

Scanned 2d ago via OSV.dev · gen-image-mcp (npm)

Adoption & maintenance

Factual signals from GitHub, npm, and our automated checks — not a rating.

npm downloads558Package downloads in the last 30 days.
Last commit1mo agoMost recent push to the default branch.
Install checkInconclusiveWe hit an unexpected error running the automated check.
Directory activity6 viewsConfig copies, upvotes, and views on AllMCPs.

How Gen Image MCP works

What gen-image MCP does

The gen-image MCP MCP server gives MCP clients four tools for working with image models through a configured service. generate_image sends text-to-image requests to an OpenAI-compatible Images API and supports image dimensions, quality, output format, and one to four results. edit_image edits or combines one to sixteen local images and can apply a mask.

generate_gemini_image handles Gemini image generation and reference-image workflows through an OpenAI-compatible chat-completions endpoint. It supports ten aspect ratios. list_models reports the configured model groups and default model without making a network request.

Generated results are saved on the machine where the local process runs. The tools also return inline previews and structuredContent, allowing an agent to use the output while retaining a file in the project directory.

How it works

The gen-image MCP MCP server runs locally over stdio and uses the npx -y gen-image-mcp package command. It does not host or provide the underlying models. Instead, it sends requests to a service root URL supplied by the user. The URL should omit /v1; the server adds the relevant image-generation, image-edit, or chat-completions path.

Model configuration is split into an OpenAI-compatible image model group and a Gemini image model group. Each group can contain an ordered list of model IDs. With automatic fallback enabled, capacity and rate-limit failures receive limited backoff retries before the server proceeds to the next configured model.

Setup and configuration

Node.js 20 or newer is required; the project recommends Node.js 24 LTS. Configure the local MCP process with these environment variables:

  • GEN_IMAGE_BASE_URL: service root URL, without /v1.
  • GEN_IMAGE_API_KEY: API key for the configured service.
  • GEN_IMAGE_MODEL: comma-separated OpenAI-compatible image model IDs.
  • GEN_IMAGE_GEMINI_MODEL: comma-separated Gemini image model IDs exposed through an OpenAI-compatible gateway.
  • GEN_IMAGE_AUTO_FALLBACK: enables automatic retry and model switching when set to true.

Provide an API key, the service URL, and at least one model group. Remove unused model variables rather than leaving them as empty strings. The package can be registered in Claude Code, Cursor, VS Code, Claude Desktop, Cline, Windsurf, and other clients that accept local MCP commands. Client configuration field names differ, so the command and environment syntax must follow the selected client’s format. On native Windows installations, starting npx through cmd /c may be necessary.

Tools and capabilities

The gen-image MCP MCP server supports:

  • Text-to-image generation through POST /v1/images/generations.
  • Editing or combining local images through POST /v1/images/edits.
  • Optional masks for image edits.
  • Gemini text-to-image and reference-image generation through POST /v1/chat/completions.
  • PNG, JPEG, and WebP output for the standard image-generation tool.
  • One to four generated images from a standard generation request.
  • One to sixteen input images for an edit request.
  • Model and default-model inspection without a network call.

Limitations and notes

The server depends on the selected upstream provider, gateway, model IDs, and API permissions. Outputs are stored on the host running the MCP process, not necessarily on the machine where the client interface is displayed. The configured service must expose the expected OpenAI-compatible endpoints, and the base URL must be entered without /v1.

Written by AllMCPs with AI assistance from the project’s README and listing data. How we build listings

Reviews

No reviews yet — be the first to share how it worked for you.

Frequently Asked Questions about Gen Image MCP

gen-image MCP is an MCP server that connects MCP clients to OpenAI-compatible image APIs and Gemini image models through a compatible gateway. Its main tools generate images, edit local images with optional masks, create Gemini images from prompts or references, and list configured models. It runs locally over stdio and saves outputs on the host.

Install it by configuring an MCP client to run `npx -y gen-image-mcp` over stdio. Set the service URL, API key, and at least one model group as environment variables, then restart the client. Node.js 20 or newer is required, with Node.js 24 LTS recommended.

It needs `GEN_IMAGE_BASE_URL`, `GEN_IMAGE_API_KEY`, and at least one of `GEN_IMAGE_MODEL` or `GEN_IMAGE_GEMINI_MODEL`. Set `GEN_IMAGE_AUTO_FALLBACK` to `true` to enable retry and ordered model switching. The base URL must omit `/v1`.

Yes, Cursor is named as a supported client in the setup instructions. Add the local `npx -y gen-image-mcp` command to Cursor’s MCP configuration, replace the example service URL and API key, and provide the model environment variables before restarting Cursor.

Yes, its `edit_image` tool edits or combines one to sixteen local images and can accept a mask. The resulting request is sent to the configured OpenAI-compatible `/v1/images/edits` endpoint, and outputs are saved on the machine running the MCP process.

Related MCP servers

Add a badge to your READMEShow it’s listed — live SVG, Markdown or HTML.

AllMCPs Directory Badge

Full Badge Customizer

Showcase your server listing on GitHub or your project documentation. Embed this dynamic SVG badge to highlight official listing status and live engagement.

Badge Style:
Live Dynamic SVG PreviewGen Image MCP AllMCPs Directory Badge
Markdown (GitHub README)
[![AllMCPs](https://allmcps.com/api/badge/gen-image-mcp?style=directory)](https://allmcps.com/mcp/gen-image-mcp)
HTML Embed
<a href="https://allmcps.com/mcp/gen-image-mcp"><img src="https://allmcps.com/api/badge/gen-image-mcp?style=directory" alt="Gen Image MCP on AllMCPs" /></a>