
Ultimate Gemini MCP
io.github.nikships由 GitHub 帳號 nikships 發布v6.0.21更新於 Oct 24, 2026
Image generation with Google Gemini 3.1 Flash: 512px-4K, reference images, search grounding
概覽
讓助理使用 Google Gemini 產生與批次產出圖片,包括透明去背、應用程式圖示,以及以搜尋為依據的真實參考素材。
- 可以做什麼
- 把 Google Gemini 圖片模型包裝成三個主要工具:generate_image 產生單張圖片,支援 512px 至 4K、14 種長寬比、最多 14 張參考圖、可選的 Google 搜尋與圖片搜尋 grounding,以及可選的兩階段透明背景去背;generate_app_icon 強制輸出正方形、透明、1024px 的 PNG 圖示;batch_generate 可平行處理最多 8 組提示詞。另外提供 26 個以 MCP 斜線指令形式呈現的提示詞範本,並將結果存到可設定的輸出目錄。
- 適用情境
- 適合讓助理依文字提示詞產出成品圖片素材,例如產品照、分鏡、圖示、標誌或寫實場景;尤其適合需要透過 Google 搜尋或圖片搜尋取得真實參考,或需要不必手動遮罩的透明 PNG/WebP 去背時使用。
- 執行需求
- 以 stdio 方式在本機執行,通常透過 uvx(PyPI 套件 ultimate-gemini-mcp)或 pip 安裝,需要 Python 3.11+。必須提供 Google Gemini API 金鑰,透過環境變數 GEMINI_API_KEY 傳入(也接受 GOOGLE_API_KEY)。選用環境變數可設定輸出目錄、預設模型與圖片尺寸、逾時、批次大小、記錄層級,以及搜尋或提示詞增強預設值。需要連線至 Google API 的網路。
安裝
在 SourceWeft 中
- 開啟 儀表板中的 Ultimate Gemini MCP,將其新增到工作區。
- 為需要使用其工具的對話啟用該服務。
Desktop only,透過 STDIO。 STDIO 服務會啟動本機處理程序,因此需要 SourceWeft 桌面主機。
其他 MCP 客戶端
參照 儲存庫 中的啟動說明。
README
Ultimate Gemini MCP
MCP server for Google's Gemini 3.1 Flash Image — fast image generation with advanced reasoning, 512px–4K resolution, up to 14 reference images, Google Search grounding, and automatic thinking mode.
Setup
Claude Desktop
Add to your mcp config (mcp.json / .claude.json):
All generated images include invisible SynthID watermarks for authenticity and provenance tracking.
Features
Gemini 3.1 Flash Image
- High-Resolution Output: 512px, 1K, 2K, and 4K resolution
- Advanced Text Rendering: Legible, stylized text in infographics, menus, diagrams, and logos
- Up to 14 Reference Images: Up to 10 objects + 4 characters for style/character consistency
- Google Search Grounding: Real-time data (weather, stocks, events, maps)
- Google Image Search: Visual context from web images — the model can FIND real images of anything
- Thinking Mode: Configurable reasoning - "minimal" (fast) or "high" (best quality)
- Transparent Backgrounds: Flip one flag → ready-to-use transparent PNG/WebP cut-outs with a real alpha channel, recovered by a two-pass difference matte (generate on white → edit to black → solve for alpha). True soft edges/glow/glass, no color halo. Pillow only — no extra dependencies. Costs a second model call (~2x).
- Dedicated App-Icon / Logo Tool:
generate_app_iconforces a square, transparent, 1024px PNG every time — no way to get a non-square or opaque-background icon
This model is different. Unlike traditional image generators that rely solely on training data, Gemini 3.1 Flash has live access to Google Search and Image Search. It can find actual references for products, people, events, or anything that exists online. "Way of Wade 12" → generates the REAL shoe. "Tony Hawk" → finds real photos. Don't over-prompt — let the model cook.
Server Features
- Batch Processing: Generate multiple images in parallel (up to 8 concurrent)
- 26 Expert Prompt Templates: MCP slash commands for photography, cinematics, storyboards, and more
- Flexible Aspect Ratios: 14 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
- Configurable via Environment Variables: Output directory, default size, timeouts, and more
Showcase
Photorealistic Capabilities
Jensen Huang — GPU Surfing [Jensen surfing on GPU through cyberpunk city]
Elon Musk — Mars Chess Match [Elon playing chess with robot on Mars]
Jensen Huang — GPU Kitchen [Jensen cooking with GPU appliances]
Elon Musk — Cybertruck Symphony [Elon conducting Cybertruck orchestra]
Jensen Huang — Underwater Data Center [Jensen scuba diving in data center]
Elon Musk — SpaceX Skateboarding [Elon skateboarding at SpaceX]
Google Search Grounding
Current Weather in San Francisco [Weather search]
Google Image Search
Butterfly on Flower [Butterfly image search]
Different Resolutions
512px (fastest) [Cat 512px]
1K [Rose 1K]
Quick Start
Prerequisites
- Python 3.11+
- Google Gemini API key (free tier available)
Installation
Using uvx (recommended — no install needed):
Note: Use
@latestto ensure uv always fetches the newest version from PyPI. Without it, uv may use a cached environment.
Using pip:
From source:
Config file locations:
- macOS:
~/Library/Application Support/Claude/claude_desktop_config.json - Windows:
%APPDATA%\Claude\claude_desktop_config.json
macOS
spawn uvx ENOENTerror: Use the full path — find it withwhich uvx, then set"command": "/Users/you/.local/bin/uvx".
Claude Code
Cursor
Add to .cursor/mcp.json:
Images are saved to ~/gemini_images by default. Add "OUTPUT_DIR": "/your/path" to customize.
Tools
generate_image
Generate an image with Gemini 3.1 Flash Image.
Image size guide:
512px— fastest, lowest cost (0.5K)1K— fast, good for testing (~1-2 MB)2K— recommended for most use cases (~3-5 MB)4K— maximum quality for production assets (~8-15 MB)
Transparent backgrounds — set one flag, get a real alpha cut-out
Just set transparent_background=true. You get back a ready-to-use transparent PNG/WebP (real alpha channel) at transparent_path — no manual masking, no second tool, no follow-up steps.
Generating an app icon or logo? Use the dedicated
generate_app_icontool instead — it forces square + transparent + 1024px PNG so the icon constraints can't be set wrong.
Under the hood this is a two-pass difference matte. The subject is rendered once on a pure white (#FFFFFF) background, that image is edited to a pure black (#000000) background, and the two frames are combined to solve for alpha per pixel: since obs_white − obs_black = (1−α)·255 on every channel, α = 1 − mean(obs_white − obs_black)/255, and the foreground colour is un-premultiplied from the black frame. Because there's no colour key, there's no green spill/halo; alpha is fractional, so soft edges, glow, glass, and faint shadows all survive. Pillow-only, zero ML downloads — but it costs a second model call (~2x tokens/latency).
The technique assumes the edit pass changed only the background. If the model drifts the subject between passes, the matte degrades — the result still returns (aligned/alignment_error flag it, with a loud post_processing_warnings entry) so you can decide whether to regenerate.
Each returned image gains: transparent_path, background_removed, background_removal_mode ("difference_matte"), aligned, alignment_error, alpha_output_format, and post_processing_warnings. By default the pass-1 (white-background) original is preserved alongside the cut-out (preserve_original=true).
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 edges look ghosted.
generate_app_icon
Purpose-built for app icons and logos. Square, transparent, and 1024px are forced — there is no aspect_ratio, image_size, output_format, or transparent_background knob to get wrong. Every result is a real alpha-channel PNG at transparent_path, ready to drop into a .iconset directory and convert with iconutil -c icns.
The
promptmust describe ONLY the subject, never the deliverable. This tool already turns whatever you describe into an icon, so framing words like "app icon", "logo", "favicon", or "squircle" in the prompt are rejected (setallow_icon_words_in_prompt=trueonly if such a word is literally part of the depicted subject). Right:"a glowing electric-blue magnifying glass over a network graph". Wrong:"an app icon of a magnifying glass".
batch_generate
Generate multiple images in parallel.
MCP Prompt Templates
26 expert prompt templates are available as MCP slash commands in Claude Code (type / to browse). Each template returns a crafted prompt and recommended parameters ready to pass directly to generate_image or batch_generate. For app icons and logos, use the dedicated generate_app_icon tool instead.
Configuration
Troubleshooting
spawn uvx ENOENT — Claude Desktop can't find uvx. Use the full path:
Find it with: which uvx
GEMINI_API_KEY not found — Set the key in your MCP config env block or in a .env file. Get a free key at Google AI Studio.
Content blocked by safety filters — Rephrase the prompt to avoid sensitive content.
Rate limit exceeded — Wait and retry, or upgrade your API quota.
Images not saving — Check OUTPUT_DIR exists and is writable: mkdir -p /your/output/path.
License
MIT — see LICENSE for details.
MCP Registry
mcp-name: io.github.nikships/ultimate-image-gen-mcp
Links
- Google AI Studio — Get your API key
- Gemini API Docs
- Model Context Protocol
- FastMCP
來源:README.md,提交 ff31477
工具
0版本歷史
1- v6.0.21最新Sep 23, 2026
評分
已滿足適用檢查項的 40%
該評分衡量此收錄條目的完整程度,依據註冊中心條目、端點與公開來源計算得出。它不是對伺服器本身的評價,也不表示伺服器安全或目前可用:可連通性是帶日期的檢查結果,評分也不包含安裝量或使用者評價。
- 近 30 天內可連通25 分
請保持端點能夠回應 MCP 握手;SourceWeft 每 30 天探測一次。
- 已宣告認證方式10 分
請在註冊中心條目中宣告憑證請求標頭,或保持端點能夠回應探測,以便判定其認證方式。
- 已列出工具15 分
請讓伺服器在無憑證時回應 tools/list,或發布可在沙箱中無憑證啟動的軟體包。
- 描述必需15 分
- 圖示10 分
- 文件15 分
- 授權條款10 分
請在儲存庫或註冊中心條目中宣告授權條款。