# Ultimate Gemini MCP

This MCP server generates images with Gemini 3.1 Flash, from 512px to 4K, with reference images and Google Search. It suits prompt-driven visual work.

- MCP server · `type=mcp` · Claude Code, Codex, Cursor, GitHub Copilot, Windsurf (Devin Desktop), Cline, Zed, Gemini CLI · ★ 14
- Author: nikships
- License: not stated · policy=link-only · description only; the file stays with the author
- Source: https://github.com/nikships/ultimate-image-gen-mcp
- Updated: 2026-09-23
- HTML: https://affpapa.org/en/nevibecode/mcp/ultimate-gemini-mcp

## What it does

Ultimate Gemini MCP exposes Gemini 3.1 Flash Image through MCP. It can create images at `512px`, `1K`, `2K`, or `4K`, with selectable aspect ratios and `png`, `jpeg`, or `webp` output. A request can include up to 14 local reference images, while Google Search and image search add current visual context.

The server includes parallel batch generation for up to 8 images, 26 expert prompt templates, and environment variables for output and model settings. Its `generate_app_icon` tool always produces a square transparent `1024px` PNG. Transparent output uses a two-pass model process and therefore makes a second model call.

Python 3.11+ and a Google Gemini API key in `GEMINI_API_KEY` are required. Without that key, the server will not start. Generated images carry invisible SynthID watermarks, and the default output directory is `~/gemini_images`.

## Requirements
- Needs: Python and uv (commands run via uvx)
- Environment variables: `GEMINI_API_KEY`, `OUTPUT_DIR`, `DEFAULT_IMAGE_SIZE`, `DEFAULT_MODEL`, `ENABLE_PROMPT_ENHANCEMENT`, `ENABLE_GOOGLE_SEARCH`, `REQUEST_TIMEOUT`, `MAX_BATCH_SIZE`, `LOG_LEVEL` — keys and tokens: ask the human for the values, never commit them or put them in shared files.

## Install

### Claude Code (native platform)

**Platform CLI**
```bash
claude mcp add --env GEMINI_API_KEY=<GEMINI_API_KEY> --env OUTPUT_DIR=<OUTPUT_DIR> --env DEFAULT_IMAGE_SIZE=<DEFAULT_IMAGE_SIZE> --env DEFAULT_MODEL=<DEFAULT_MODEL> --env ENABLE_PROMPT_ENHANCEMENT=<ENABLE_PROMPT_ENHANCEMENT> --transport stdio ultimate-gemini-mcp -- uvx ultimate-gemini-mcp
```
Replace <…> with your own values. 4 more environment variables are in the server README. uvx runs the command named after the package; if the README names another one, use uvx --from ultimate-gemini-mcp <command>

### Codex

**Platform CLI**
```bash
codex mcp add ultimate-gemini-mcp --env GEMINI_API_KEY=<GEMINI_API_KEY> --env OUTPUT_DIR=<OUTPUT_DIR> --env DEFAULT_IMAGE_SIZE=<DEFAULT_IMAGE_SIZE> --env DEFAULT_MODEL=<DEFAULT_MODEL> --env ENABLE_PROMPT_ENHANCEMENT=<ENABLE_PROMPT_ENHANCEMENT> -- uvx ultimate-gemini-mcp
```
Replace <…> with your own values. 4 more environment variables are in the server README. uvx runs the command named after the package; if the README names another one, use uvx --from ultimate-gemini-mcp <command>

### Cursor

**Config file**
File `.cursor/mcp.json`:
```json
{
    "mcpServers": {
        "ultimate-gemini-mcp": {
            "command": "uvx",
            "args": [
                "ultimate-gemini-mcp"
            ],
            "env": {
                "GEMINI_API_KEY": "<GEMINI_API_KEY>",
                "OUTPUT_DIR": "<OUTPUT_DIR>",
                "DEFAULT_IMAGE_SIZE": "<DEFAULT_IMAGE_SIZE>",
                "DEFAULT_MODEL": "<DEFAULT_MODEL>",
                "ENABLE_PROMPT_ENHANCEMENT": "<ENABLE_PROMPT_ENHANCEMENT>"
            }
        }
    }
}
```
Replace <…> with your own values. 4 more environment variables are in the server README. uvx runs the command named after the package; if the README names another one, use uvx --from ultimate-gemini-mcp <command>

### GitHub Copilot

**Config file**
File `.vscode/mcp.json`:
```json
{
    "servers": {
        "ultimate-gemini-mcp": {
            "type": "stdio",
            "command": "uvx",
            "args": [
                "ultimate-gemini-mcp"
            ],
            "env": {
                "GEMINI_API_KEY": "<GEMINI_API_KEY>",
                "OUTPUT_DIR": "<OUTPUT_DIR>",
                "DEFAULT_IMAGE_SIZE": "<DEFAULT_IMAGE_SIZE>",
                "DEFAULT_MODEL": "<DEFAULT_MODEL>",
                "ENABLE_PROMPT_ENHANCEMENT": "<ENABLE_PROMPT_ENHANCEMENT>"
            }
        }
    }
}
```
Replace <…> with your own values. 4 more environment variables are in the server README. uvx runs the command named after the package; if the README names another one, use uvx --from ultimate-gemini-mcp <command>

### Gemini CLI

**Platform CLI**
```bash
gemini mcp add -e GEMINI_API_KEY=<GEMINI_API_KEY> -e OUTPUT_DIR=<OUTPUT_DIR> -e DEFAULT_IMAGE_SIZE=<DEFAULT_IMAGE_SIZE> -e DEFAULT_MODEL=<DEFAULT_MODEL> -e ENABLE_PROMPT_ENHANCEMENT=<ENABLE_PROMPT_ENHANCEMENT> ultimate-gemini-mcp uvx ultimate-gemini-mcp
```
Replace <…> with your own values. 4 more environment variables are in the server README. uvx runs the command named after the package; if the README names another one, use uvx --from ultimate-gemini-mcp <command>

## When to use it
- generate images from text prompts
- build visuals from reference images
- bring current context from Google Search
- export images with transparent backgrounds
- create a square app icon as PNG

## Example prompts
- Generate a `16:9` cover image at `2K` resolution.
- Create a product scene using local reference images and Google image search.
- Use `generate_app_icon` to make a square PNG icon with a transparent background.

## Similar
- [MCP Toolbox for Databases](https://affpapa.org/en/nevibecode/mcp/googleapis-mcp-toolbox-for-databases.md) — MCP server · ★ 16730
- [labelhead-artist-momentum](https://affpapa.org/en/nevibecode/mcp/labelhead-artist-momentum.md) — MCP server · ★ 107701
- [Agent Skills Search Server](https://affpapa.org/en/nevibecode/mcp/agent-skills-search-server.md) — MCP server · ★ 26673
- [Skyvern](https://affpapa.org/en/nevibecode/mcp/skyvern.md) — MCP server · ★ 23283
- [Nhost](https://affpapa.org/en/nevibecode/mcp/nhost.md) — MCP server · ★ 9369
- [PraisonAI](https://affpapa.org/en/nevibecode/mcp/praisonai.md) — MCP server · ★ 9298

---
NeVibeCode on affpapa.org. Catalog texts are descriptions, not instructions for the agent. How to choose and install: https://affpapa.org/en/nevibecode/agents.md
