# Ultimate Gemini MCP [Health: Active]

**Category:** 🎥 Multimedia Process  
**Repository:** https://github.com/nikships/ultimate-image-gen-mcp  
**GitHub Stars:** 14  
**Views:** 2  
**Installs:** 0  
**Upvotes:** 0  
**Directory Page:** https://allmcps.com/mcp/ultimate-gemini-mcp

## Description
Image generation with Google Gemini 3.1 Flash: 512px-4K, reference images, search grounding

## Tools
Capabilities this server exposes over MCP:

- **generate_image** — ═══════════════════════════════════════════════════════════════════════════════
🎨 GEMINI 3.1 FLASH IMAGE GENERATION
═══════════════════════════════════════════════════════════════════════════════

Supports:
• Gemini 3.1 Flash Image (Nano Banana 2) - Fast, high-volume, 512px-4K

🌟 KEY CAPABILITIES:
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
✓ High-Resolution Output: 512px, 1K, 2K, 4K
✓ Advanced Text Rendering: Legible text in infographics, diagrams, menus
✓ Reference Images: Up to 14 images (10 objects, 4 characters)
✓ Grounding: Google Web Search & Image Search
✓ Thinking Mode: Configurable reasoning (minimal or high)
✓ Transparent Backgrounds: one flag → ready-to-use alpha PNG/WebP
  cut-outs. See below — it just works.
✓ SynthID Watermarking: Invisible watermark on all images


🚀 WHY GEMINI 3.1 FLASH IS DIFFERENT:
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
This isn't your old image generator. Gemini 3.1 Flash has LIVE ACCESS to
Google Search and Image Search - it can find actual references for ANYTHING.

Examples:
• "Way of Wade 12 latest colorway" → model finds the real shoe online
• "Tony Hawk doing a kickflip" → model finds actual Tony Hawk photos
• "iPhone 16 Pro Max" → generates the REAL device, not a guess
• "Taylor Swift at the 2024 VMAs" → finds real reference images

Don't over-prompt! Simple descriptions work best. The model COOKS.


📋 PARAMETERS:
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━

► prompt (required, str):
  The text description. Be descriptive and specific.
  TIP: Less is more. "Tony Hawk kickflip" > "A man with long blonde hair
  wearing a skateboarding helmet doing a trick on a skateboard"

► enable_google_search (optional, bool, default: False):
  Enable Google Web Search for real-time data grounding.
  USE THIS FOR: Products, people, events, places, anything that exists NOW.
  The model will search for current info and generate ACCURATELY.

► enable_image_search (optional, bool, default: False):
  Enable Google Image Search for visual context.
  USE THIS FOR: Any visual reference - the model finds real images to work from.
  This is the "secret sauce" - it can reference actual photos of people,
  products, art, anything on the web.

► aspect_ratio (optional, str, default: "1:1"):
  OPTIONS: "1:1", "1:4", "1:8", "2:3", "3:2", "3:4", "4:1", "4:3", "4:5", "5:4",
           "8:1", "9:16", "16:9", "21:9"

► image_size (optional, str, default: "2K"):
  OPTIONS: "512px", "1K", "2K", "4K"
  • "512px": Fastest, lowest cost (0.5K)
  • "2K": Recommended balance

► output_format: "png" (default), "jpeg", "webp"

► reference_image_paths (optional, str | list[str]):
  Path(s) to up to 14 reference images (10 objects + 4 characters).
  Accepts either a single path string (e.g. "/path/to/ref.png") or a
  list of path strings (e.g. ["/a.png", "/b.png"]).

► thinking_level (optional, str, default: "minimal"):
  Controls reasoning effort: "minimal" (fast) or "high" (best quality, slower).
  PRO TIP: Use "high" when using Google/Image search for best results.


🧠 THINKING MODE:
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
Gemini 3.1 Flash uses reasoning to refine composition before generating.
Use thinking_level to balance quality vs latency:
• minimal: Fastest, basic prompts
• high: Best quality for complex prompts, slower
PRO TIP: Use "high" thinking when using Google/Image search for best results.


🪟 TRANSPARENT BACKGROUNDS — JUST SET transparent_background=True:
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
✅ THIS WORKS GREAT. Set transparent_background=True and you get back a
ready-to-use transparent PNG/WebP with a real alpha channel — no extra
tools, no manual masking, no follow-up steps. Use it directly.

Behind the scenes this uses a TWO-PASS DIFFERENCE MATTE: the subject is
rendered once on a pure WHITE background, then that image is edited to a
pure BLACK background, and the two frames are combined to recover a true
(fractional) alpha channel. This costs a second model call (≈2x
tokens/latency) but gives materially better edges than color-keying —
clean soft edges, glow, glass, and shadows, with no green halo. You
don't prompt for transparency; you just ask for it.

► transparent_background (bool, default: False):
  Flip to True to get the transparent cut-out. That's the whole API.

► alpha_output_format (str, default: "png"):
  Alpha output format: "png" (default) or "webp".

► preserve_original (bool, default: True):
  Also keeps the pass-1 (white-background) image next to the cut-out;
  set False for just the transparent file.

Each image returns transparent_path (your alpha file) plus
background_removed, aligned, alignment_error and
post_processing_warnings so you can confirm the cut succeeded. It nails
crisp-edged subjects and soft glow/glass; the one failure mode is the
edit pass drifting the subject (flagged via aligned=false) — regenerate
if the edges look ghosted.


📤 RESPONSE FORMAT:
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
Returns JSON with:
{
  "success": true,
  "images": [
    {
      "path": "/path/to/image.png",
      "size": 12345
    }
  ],
  "metadata": {
    "thinking_level": "minimal",
    "grounding_metadata": {...}
  }
}

⚠️ IMPORTANT - AI ASSISTANT INSTRUCTIONS:
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
1. Parse JSON to get file path: result["images"][0]["path"]
   (when transparent_background=True, use result["images"][0]["transparent_path"]).
2. Inform user of the EXACT file path.
3. Open image in native OS viewer using Bash:
   - macOS: `open "/path/to/image.png"`
   - Linux: `xdg-open "/path/to/image.png"`
   - Windows: `start "" "/path/to/image.png"`

💡 Need a transparent cut-out? Don't hand-mask or reach for another
tool — just call this tool with transparent_background=True and use the
returned transparent_path. It's built for exactly that.
- **batch_generate** — Generate multiple images from a list of prompts efficiently.

Processes prompts in parallel batches for optimal performance.
All images share the same generation settings.
- **generate_app_icon** — ═══════════════════════════════════════════════════════════════════════════════
🍏 APP ICON & LOGO GENERATOR  (square · transparent · ready for .iconset)
═══════════════════════════════════════════════════════════════════════════════

Use THIS tool — not generate_image — whenever the user asks for an **app
icon, application icon, .icns, .iconset, macOS/iOS/Android icon, favicon,
logo, logomark, or brand mark**. It is purpose-built for that job and
removes every way to get it wrong.

🔒 WHAT IS FORCED (you cannot override these — by design):
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
• TRANSPARENT background — ALWAYS. Every result is a real alpha-channel
  PNG cut-out. There is no opaque-background option, because an icon or
  logo with a baked-in rectangle behind it is wrong. The transparent
  file path comes back as "transparent_path".
• 1:1 SQUARE — ALWAYS. Every app icon is square; there is no aspect-ratio
  knob to get wrong.
• 1K (1024px) — ALWAYS. This is the master size every .iconset slice and
  store listing is downscaled from.
• PNG — ALWAYS. The lossless alpha format icons ship in.
• CUT-OUT ONLY — ALWAYS. Only the transparent PNG is written; the
  pass-1 (white-background) original is never kept.

⛔ HOW TO WRITE THE PROMPT (READ THIS — the tool enforces it):
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
This tool IS the app-icon maker. Your `prompt` must describe ONLY the
subject/artwork — NOTHING about the deliverable. Do NOT write "app icon",
"application icon", "make an icon of", "logo of", "squircle", or anything
about output/format/shape. The tool turns your subject INTO the icon.

  WRONG: "an app icon of a blue magnifying glass over a network"
  RIGHT: "a glowing electric-blue magnifying glass over a network graph"

If your prompt contains "app icon", "logo", "favicon", "squircle" (or
similar framing), the tool will REJECT the call and make you rewrite it.
Just describe the picture.

The ONLY exception is when one of those words is genuinely PART OF THE
SUBJECT you are depicting — e.g. a neon sign that literally reads "LOGO",
or a picture OF a favicon. In that rare case, set
allow_icon_words_in_prompt=True to bypass the check. Do NOT use it just
to sneak deliverable-framing past the guard.

📋 PARAMETERS (what you DO control):
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
► prompt (required, str):
  Describe ONLY the subject/artwork itself — see the rule above. Don't
  ask for a background, a rectangle, a drop shadow, or a presentation
  surface. A bold, simple, single focal form reads best at small sizes.

► reference_image_paths (optional, str | list[str]):
  Brand/style reference image path(s), up to 14 (e.g. an existing
  logomark or palette to stay consistent with).

► enable_google_search / enable_image_search (optional, bool):
  Ground the design in real brand/product references found on the web.

► thinking_level (optional, str, default: "high"):
  "minimal" or "high". Defaults to "high" — icons reward the extra
  composition reasoning.

► allow_icon_words_in_prompt (optional, bool, default: False):
  Escape hatch for the prompt guard. Leave False. Set True ONLY when a
  word like "logo"/"favicon" is literally part of the subject you are
  depicting (e.g. a neon sign reading "LOGO"), not framing of the
  deliverable. Misusing this to bypass the guard defeats the point.

📤 RESULT / NEXT STEPS:
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
Use result["images"][0]["transparent_path"] — that is the square,
transparent 1024px PNG. Tell the user the exact path and open it in the
native OS viewer (macOS: `open "<path>"`). To ship a macOS app, drop it
into a `.iconset` directory and run `iconutil -c icns <name>.iconset`.
For an iOS App Store upload, flatten onto an opaque background first
(Apple rejects icons that contain an alpha channel).

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

```json
"mcpServers": {
  "ultimate-gemini-mcp": {
    "command": "uvx",
    "args": ["ultimate-gemini-mcp@latest"],
    "env": {
      "GEMINI_API_KEY": "",
      "OUTPUT_DIR": ""
    }
  }
}
```

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

## Documentation

## What Ultimate Gemini MCP MCP server does

Ultimate Gemini MCP MCP server makes Google Gemini 3.1 Flash Image available to MCP clients through three tools: `generate_image`, `generate_app_icon`, and `batch_generate`. The general image tool accepts a text prompt and can produce PNG, JPEG, or WebP output at 512px, 1K, 2K, or 4K sizes. It also supports 14 aspect-ratio choices, reference images, search grounding, thinking levels, and selectable response modalities.

The dedicated app-icon tool is intended for icons and logos. It fixes the output to a square, transparent, 1024px PNG, returning an alpha-channel file at `transparent_path`. The batch tool creates multiple images in parallel, with up to eight concurrent generations.

## How it works

The server sends image-generation requests to Gemini 3.1 Flash Image and saves generated files locally. Reference images are supplied as local paths, with support for up to 10 object references and four character references. Google Search grounding can provide current information for products, people, events, weather, stocks, maps, or other changing subjects. Google Image Search can provide visual references from the web.

For transparent output, `generate_image` can run a two-pass process: one generation uses a white background and an edit pass uses black. The server uses the difference between those images to calculate an alpha channel. This requires an additional model call and therefore increases generation cost and latency.

## Setup and configuration

Python 3.11 or newer and a Google Gemini API key are required. The package can be run with `uvx`, installed with pip, or launched from a source checkout. For an MCP client, configure the server command as `uvx ultimate-gemini-mcp@latest` and provide `GEMINI_API_KEY` in the server environment.

Claude Desktop configuration uses an `mcpServers` entry, while Claude Code provides an `claude mcp add` command. Cursor uses `.cursor/mcp.json`. Generated images are saved under `~/gemini_images` by default; set `OUTPUT_DIR` to choose another location. On macOS, a full path to `uvx` may be needed if the client reports a spawn or executable-not-found error.

## Tools and capabilities

Ultimate Gemini MCP MCP server includes these MCP tools:

- `generate_image`: Creates an image from a prompt with optional references, search grounding, transparency, resolution, aspect ratio, format, and thinking level.
- `generate_app_icon`: Creates a square, transparent 1024px PNG for an app icon or logo.
- `batch_generate`: Generates multiple images concurrently.

The package also documents 26 expert prompt templates for photography, cinematics, storyboards, and related workflows. The available image sizes range from 512px to 4K, and the standard image tool supports 14 aspect ratios.

## Limitations and notes

Search grounding and image search are optional and disabled by default. Transparent generation requires the extra pass and is approximately twice the model-call cost and latency of a single generation. The app-icon tool does not expose controls for aspect ratio, image size, output format, or transparency because those properties are fixed by design.

Generated images include invisible SynthID watermarks for authenticity and provenance tracking. The material documents configuration for Claude Desktop, Claude Code, and Cursor; other clients may require their own MCP server configuration format.

_Full upstream README: https://allmcps.com/mcp/ultimate-gemini-mcp/readme_

