# gen-image MCP [Health: Active]

**Category:** 🎥 Multimedia Process  
**Repository:** https://github.com/yuluo688/gen-image-mcp  
**GitHub Stars:** 0  
**npm Downloads (last month):** 558  
**Views:** 6  
**Installs:** 0  
**Upvotes:** 0  
**Directory Page:** https://allmcps.com/mcp/gen-image-mcp

## Description
Local stdio MCP for OpenAI-compatible and Gemini image generation, editing, and model fallback.

## Claude Desktop Quick Installation
Install path detected from listing signals. Uses `npx` (confidence: high):

```json
"mcpServers": {
  "gen-image-mcp": {
    "command": "npx",
    "args": ["-y","gen-image-mcp"],
    "env": {
      "GEN_IMAGE_BASE_URL": "",
      "GEN_IMAGE_API_KEY": "",
      "GEN_IMAGE_MODEL": "",
      "GEN_IMAGE_GEMINI_MODEL": "",
      "GEN_IMAGE_AUTO_FALLBACK": ""
    }
  }
}
```

**Requires environment variables:** `GEN_IMAGE_BASE_URL`, `GEN_IMAGE_API_KEY`, `GEN_IMAGE_MODEL`, `GEN_IMAGE_GEMINI_MODEL`, `GEN_IMAGE_AUTO_FALLBACK` — the values above are empty placeholders; fill in real credentials before running (see the repository for what each one is for).

## Documentation

## 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`.

_Full upstream README: https://allmcps.com/mcp/gen-image-mcp/readme_

