Ultimate Gemini MCP — Claude Code MCP server: image setup
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.
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-mcpWhat Ultimate Gemini MCP 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.
What it helps with
- 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 for the agent
- Generate a
16:9cover image at2Kresolution. - Create a product scene using local reference images and Google image search.
- Use
generate_app_iconto make a square PNG icon with a transparent background.
How to install Ultimate Gemini MCP
Platform CLI
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-mcpReplace <…> 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>
Platform CLI
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-mcpReplace <…> 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>
Config file
{
"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>
Config file
{
"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>
Platform CLI
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-mcpReplace <…> 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>
Step by step, with commands for each platform: How to add an MCP server to Claude Code, Codex, Cursor, VS Code, Gemini CLI and more
Questions about Ultimate Gemini MCP
How do I install Ultimate Gemini MCP in Claude Code?
Run claude mcp add ultimate-image-gen-mcp -e GEMINI_API_KEY=<GEMINI_API_KEY> -- uvx ultimate-gemini-mcp.
What does Ultimate Gemini MCP do?
It gives an MCP client access to Gemini 3.1 Flash Image generation. The server handles image size, aspect ratio, reference images, Google search, and transparent output.
What does the server need to run?
It requires Python 3.11+ and a Google Gemini API key set as GEMINI_API_KEY. Images go to ~/gemini_images unless OUTPUT_DIR changes that location.