Ultimate Gemini MCP
v6.0.21Image generation with Google Gemini 3.1 Flash: 512px-4K, reference images, search grounding
Values you need
| Variable | What it is | |
|---|---|---|
GEMINI_API_KEY | required secret | Google Gemini API key (free tier at https://aistudio.google.com/apikey). Also accepts GOOGLE_API_KEY. |
OUTPUT_DIR | optional | Directory where generated images are saved Default: ~/gemini_images |
DEFAULT_IMAGE_SIZE | optional | Default resolution for generated images Default: 2K |
DEFAULT_MODEL | optional | Default Gemini image model Default: gemini-3.1-flash-image-preview |
ENABLE_PROMPT_ENHANCEMENT | optional | Automatically enhance prompts with Gemini Flash before generation Default: false |
ENABLE_GOOGLE_SEARCH | optional | Enable Google Search grounding by default (real-time data like weather, events) Default: false |
REQUEST_TIMEOUT | optional | API request timeout in seconds Default: 60 |
MAX_BATCH_SIZE | optional | Max parallel requests in batch mode Default: 8 |
LOG_LEVEL | optional | Logging level Default: INFO |
PyPI (uvx) discovery passed
Requires uv (https://docs.astral.sh/uv/)
Run in a terminal
claude mcp add ultimate-image-gen-mcp -e 'GEMINI_API_KEY=<GEMINI_API_KEY>' -- uvx ultimate-gemini-mcp==6.0.21Add to
claude_desktop_config.json{
"mcpServers": {
"ultimate-image-gen-mcp": {
"args": [
"ultimate-gemini-mcp==6.0.21"
],
"command": "uvx",
"env": {
"GEMINI_API_KEY": "<GEMINI_API_KEY>"
}
}
}
}Add to
~/.cursor/mcp.json{
"mcpServers": {
"ultimate-image-gen-mcp": {
"args": [
"ultimate-gemini-mcp==6.0.21"
],
"command": "uvx",
"env": {
"GEMINI_API_KEY": "<GEMINI_API_KEY>"
}
}
}
}Add to
.vscode/mcp.json{
"inputs": [
{
"description": "GEMINI_API_KEY",
"id": "gemini-api-key",
"password": true,
"type": "promptString"
}
],
"servers": {
"ultimate-image-gen-mcp": {
"args": [
"ultimate-gemini-mcp==6.0.21"
],
"command": "uvx",
"env": {
"GEMINI_API_KEY": "${input:gemini-api-key}"
},
"type": "stdio"
}
}
}Add to
~/.codex/config.toml[mcp_servers.ultimate-image-gen-mcp]
command = "uvx"
args = ["ultimate-gemini-mcp==6.0.21"]
env = { "GEMINI_API_KEY" = "<GEMINI_API_KEY>" }For AI agents
- Ask the user for: GEMINI_API_KEY. Never invent or guess these values; secrets go into the client config, not into chat logs.
- Pick the user's MCP client and apply the matching config from the first install method (it is the one verified by the smoke test when available).
- Restart or reload the client so it starts the server.
- Verify: the server should expose these tools: generate_image, batch_generate, generate_app_icon.
- If it fails, check that the required runtime is installed (uv (https://docs.astral.sh/uv/)) and that the values above are set.
Machine-readable: install.md · manifest.json