Open Google Image Generator MCP
Allows interaction with Google Cloud Vertex AI, providing tools for image generation, editing, analysis, background removal, upscaling, and more via Imagen and Gemini models.
Click on "Install Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@Open Google Image Generator MCPgenerate an image of a cat wearing a hat"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
Open Google Image Generator MCP
This project is a Model Context Protocol (MCP) server that exposes Google Cloud Vertex AI and Google GenAI SDK capabilities—Imagen, Gemini, Veo, Lyria, and Chirp models—to MCP-compatible clients. Built with the FastMCP framework.
Current version: 3.1.1 — Full GenAI SDK integration (embed, speech, video analysis, live generation), WebP/AVIF format support, multi-tier model selection, parallel batch generation, sequential pipeline engine, and comprehensive video tools. Service Account JSON auth support, Gemini 3.x text/speech/live models.
Features & Tools
Image Tools
Tool | Description | Backend |
| Text-to-image generation. Supports aspect ratio, negative prompt, seed, watermark, GCS output, and WebP/AVIF output | Imagen 4 ( |
| Mask-based inpaint/outpaint, background swap, product image, and prompt-driven edit. See Edit modes below | Imagen 3 Capability ( |
| Free-form | Gemini multimodal ( |
| Multimodal image understanding and Q&A. Supports | Gemini Vision ( |
| Upscale low-resolution images | Imagen |
| Remove background via | Imagen |
| Parallel batch text-to-image generation (up to 10 prompts, max 4 concurrent). | Imagen |
| Sequential multi-step image processing pipeline (generate → edit → transform → …) | Mixed |
Video Tools
Tool | Description | Backend |
| Text-to-video generation. Supports | Veo ( |
| Animate a still image into video. Supports optional | Veo |
| Extend an existing video clip by 4, 6, or 8 seconds | Veo |
| Insert or remove an object in a video via | Veo |
| Video understanding and Q&A (max 20MB; mp4, mov, avi, webm, mkv) | Gemini GenAI SDK |
Audio Tools
Tool | Description | Backend |
| Text-to-speech with voice selection (Aoede, Charon, Fenrir, Kore, Puck). Supports | Gemini TTS ( |
| Music generation from a text prompt | Lyria 2 / Lyria 3 (GenAI SDK) |
GenAI SDK Tools
Tool | Description | Backend |
| Text embeddings as float vectors | Gemini Embedding ( |
| Streaming text generation — response is accumulated and returned in full | Gemini Live ( |
Utility Tools
Tool | Description |
| Live-probes every candidate model in the configured project/location and returns only those that respond (200/400 = reachable, 404 = excluded). Cached for the server process lifetime; pass |
| Register a local file for use as a reference image in subsequent tool calls (e.g. |
Edit modes (tool_edit_image)
| What it does | Mask required? |
| Prompt-driven full-image edit, no mask | No |
| Add an object into the masked region | Yes |
| Remove content in the masked region | Yes |
| Extend the image beyond its original bounds | Yes |
| Swap the background | No |
| Product reference styling | No |
Use imagen-3.0-capability-001 (default) for all of the above. The legacy imagen-3.0-generate-002 only supports EDIT_MODE_DEFAULT and does not accept a mask.
When to use which "image + text → image" tool
Need | Use |
Mask-based inpaint/outpaint/BG-swap with pixel precision |
|
"Make it look like X" / style transfer / scene rewriting / multi-reference compositions |
|
Model tiers
Most tools accept a model_tier parameter:
Tier | Description |
| Lowest latency, lowest cost |
| Quality / speed trade-off; routes to Gemini for image generation. Not supported for |
| Higher quality, moderate latency |
| Maximum quality (Imagen 4 Ultra / Veo quality models) |
Model resolution by tier and tool
Tier |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
GenAI SDK tools (tool_live_generate, tool_analyze_video, tool_generate_speech, tool_embed):
Tier |
|
|
|
|
|
|
|
|
| — | — |
|
|
| — |
¹ Requires
GOOGLE_CLOUD_API_KEY(Gemini API endpoint). Verified working as of June 2026 per Gemini API Models docs. ²gemini-embedding-2/gemini-embedding-001are used whenGOOGLE_CLOUD_API_KEYis set;text-embedding-004is used with Vertex AI ADC.
Model availability: Vertex AI vs. Gemini API
Google exposes models through two separate endpoints with different model catalogs:
Endpoint | Auth | Image models available | Text/speech models available |
Vertex AI ( | ADC / Service Account |
|
|
Gemini API ( |
|
|
|
³ Why
gemini-3.1-flash-imageandgemini-3-pro-imageare not currently usable:tool_transform_imageand thebalancedgenerate tier call Vertex AI's:generateContentendpoint with an OAuth token. As of June 2026, Google has not yet published these models to the Vertex AI publisher catalog — requesting them returns HTTP 404 regardless of project or region. They are listed in the Gemini API catalog and are reachable only via API key (generativelanguage.googleapis.com). The image transformation backend currently uses Vertex AI, so it cannot use them until Google makes them available there. This server will be updated automatically once they appear.Sources:
Gemini API model catalog: https://ai.google.dev/gemini-api/docs/models.md.txt
Vertex AI model catalog: https://docs.cloud.google.com/gemini-enterprise-agent-platform/models/google-models.md.txt
Vertex AI available models (live probe): run
tool_list_available_modelsin your project
Output formats
tool_generate_image, tool_edit_image, tool_transform_image, and tool_upscale_image accept a save_format / output_format parameter:
Format | Notes |
| Lossless |
| Smaller files, lossy. |
| Modern lossless/lossy, wide browser support |
| Best compression, requires |
Error handling
All tools return a uniform error shape:
{
"success": false,
"error": {
"code": 404,
"model": "gemini-9.9-nonexistent",
"endpoint": ":generateContent",
"message": "Publisher Model `...` is not found.",
"hint": "Model '...' not found in project '...' / location '...'. Try: gemini-2.5-flash-image.",
"docs_url": "https://docs.cloud.google.com/...",
"log_path": ".../logs/vertex_ai_mcp.log",
"duration_s": 0.42
}
}HTTP code | What you'll see in |
400 | Vertex's parameter-validation message verbatim |
401 | "Run |
403 | IAM role hint ( |
404 | Live alternatives from the probe cache ( |
429 |
|
500/502/503/504 | "Safe to retry once" |
| After 90s — suggests a |
| Client-side validation failure (mask missing, file not found, etc.); no HTTP call is made |
Full request/response logs are written to logs/vertex_ai_mcp.log.
Resources & Prompts
Local Resources (
local://outputs/{filename}): Generated and processed media files are exposed as MCP resources for seamless display in MCP clients (Claude Desktop, Cursor, etc.).Pre-built Prompts: Includes specialized prompt templates for
character_design,logo_concept, andUI_UX_mockup.
Related MCP server: nano-banana-mcp
Prerequisites & Resources
Python 3.9 or newer
Google Cloud Account with an active project
Vertex AI API enabled in your project
Google Cloud CLI (
gcloud) installed and configured
For GenAI SDK tools (tool_embed, tool_analyze_video, tool_generate_speech, tool_live_generate, tool_generate_music), you additionally need one of:
A Cloud API Key (
GOOGLE_CLOUD_API_KEY) — created in GCP Console, uses your existing GCP billing. Enables newer models likegemini-3.5-flash. (Recommended)A Gemini API key (
GOOGLE_GENAI_API_KEY) — from AI Studio, separate billing.Vertex AI ADC — set
GOOGLE_GENAI_BACKEND=vertexai, usesgcloud auth application-default login.Service Account JSON (
GOOGLE_APPLICATION_CREDENTIALS) — see below.
Cloud API Key setup: Run
gcloud services enable generativelanguage.googleapis.com apikeys.googleapis.comthengcloud services api-keys create --display-name="GeminiKey". The key string appears in the command output — copy it directly to.env.
Installation & Setup
Option A: Install from PyPI
pip install open-google-image-generator-mcpOption B: Clone the Repository
git clone https://github.com/miracorhan/OpenGoogleImageGeneratorMCP.git
cd OpenGoogleImageGeneratorMCP
pip install -r requirements.txtAuthentication
Choose one of the following methods:
Option A — User account (interactive login):
gcloud auth application-default loginOpens a browser. Use an account that has access to your Google Cloud project.
Option B — Service Account JSON key:
# Download key: GCP Console → IAM & Admin → Service Accounts → Keys → Add Key → JSON
# Required role: Vertex AI User (roles/aiplatform.user)Set in .env:
GOOGLE_APPLICATION_CREDENTIALS=C:\path\to\service-account-key.jsonBoth vertex_ai_tools (Imagen, Veo, Lyria) and genai_tools (embed, speech, video analysis, live) pick up the SA JSON automatically. No gcloud CLI required when using a service account key.
Environment Configuration
Create a .env file in the project root:
# Required
GOOGLE_CLOUD_PROJECT=your-google-cloud-project-id
GOOGLE_CLOUD_LOCATION=us-central1
# Output directory for generated media
DEFAULT_OUTPUT_DIR=./outputs
# --- GenAI SDK (for embed, speech, live, music, video-analysis tools) ---
# Option A: Cloud API Key (recommended — uses GCP billing, enables gemini-3.5-flash)
# Create: gcloud services enable generativelanguage.googleapis.com apikeys.googleapis.com
# gcloud services api-keys create --display-name="GeminiKey"
GOOGLE_CLOUD_API_KEY=AIza...
# Option B: Gemini API key (AI Studio, separate billing, free tier available)
# GOOGLE_GENAI_BACKEND=gemini_api
# GOOGLE_GENAI_API_KEY=AIza...
# Option C: Vertex AI ADC (no key needed, uses gcloud auth application-default login)
# GOOGLE_GENAI_BACKEND=vertexai
# Option D: Service Account JSON key (no gcloud CLI required)
# Download: GCP Console → IAM & Admin → Service Accounts → Keys → Add Key → JSON
# Required role: Vertex AI User (roles/aiplatform.user)
# GOOGLE_APPLICATION_CREDENTIALS=C:\path\to\service-account-key.json
# --- Advanced Vertex AI Authentication (Optional) ---
# Direct OAuth 2.0 Access Token
# GOOGLE_ACCESS_TOKEN=ya29.a0AfB_by...
# Service Account Impersonation
# IMPERSONATE_SERVICE_ACCOUNT=your-service-account@your-project.iam.gserviceaccount.comUsage
Running as a Standalone Script
python mcp_server.pyIntegrating with MCP Clients
For Claude Desktop (claude_desktop_config.json):
{
"mcpServers": {
"OpenGoogleImageGenerator": {
"command": "python",
"args": ["/absolute/path/to/OpenGoogleImageGeneratorMCP/mcp_server.py"],
"env": {
"GOOGLE_CLOUD_PROJECT": "your-google-cloud-project-id",
"GOOGLE_CLOUD_LOCATION": "us-central1",
"GOOGLE_GENAI_API_KEY": "AIza..."
}
}
}
}Replace /absolute/path/to/your/... with the actual path, and use the correct Python executable if using a virtual environment.
Example prompts
"Generate an image of a futuristic city at sunset."
"Edit this banner — add a glowing cyan halo around the logo." (
tool_edit_image,EDIT_MODE_DEFAULT)"Transform this photo into a hand-drawn pencil sketch." (
tool_transform_image)"Remove the background from the image I just generated."
"Analyze this image and tell me what objects are present."
"Generate 8 product shots in parallel with different backgrounds." (
tool_batch_generate)"Run a pipeline: generate → remove background → upscale." (
tool_run_pipeline)"Convert this text to speech using the Kore voice." (
tool_generate_speech)"Generate a 30-second ambient music track." (
tool_generate_music)"Embed this sentence for semantic search." (
tool_embed)"Animate this product photo into a 5-second video." (
tool_image_to_video)"Generate a video of a sunset with audio." (
tool_generate_video,audio_enabled=true)
Troubleshooting
Symptom | Cause | Fix |
| ADC token expired |
|
| Same ADC expiry, probe skipped | Re-authenticate (above) |
| Service account missing role | Grant |
| Wrong path in | Use an absolute path; forward slashes or escaped backslashes |
| Key used with Vertex AI endpoint (rejects keys) | Ensure |
|
|
|
| Google's key-validation error is identical whether the key is dead or | Confirm with |
|
|
|
| The TTS-preview, live-preview, and embedding-preview models used by these tools are not published to the Vertex AI publisher catalog — Vertex AI/ADC is not a usable fallback for them, unlike image models | Use |
Worried a GenAI SDK call will charge your Cloud Billing / free-trial credit | Once billing is enabled on a project, the Gemini API free tier is gone entirely for that project — every call becomes billable from the first token, and some promotional/free-trial credits explicitly exclude Gemini API usage regardless | For risk-free testing, create a separate GCP project with no billing account attached at all and generate its AI Studio key there ( |
Edited |
| Reconnect the MCP server ( |
| Vertex AI embedding model not available on Gemini API endpoint | Set |
| These models are Gemini API only — not yet on Vertex AI | Use |
| Model not available in your project/region | Run |
| Wrong command prefix | Use |
Security: The Cloud API Key string appears in plaintext in
gcloud services api-keys createoutput. Copy it directly to.env— never paste it into a chat, commit, or log. Revoke a leaked key immediately withgcloud services api-keys delete KEY_ID.
Author & License
Developer: Mirac Orhan (mirac.orhan@gmail.com)
License: MIT License (Open Source — Free for everyone to use, modify, and distribute)
This server cannot be installed
Maintenance
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
Latest Blog Posts
- Your AI Chatbot Just Exposed Your CEO's Salary to an InternBy Om-Shree-0709 on .Agent IdentityMCP SecurityOAuth Delegation
- Why MCP Servers Need Execution Sandboxing (And Why Your Current Stack Isn't Enough)By Om-Shree-0709 on .Agentic AiPrompt InjectionWebAssembly
MCP directory API
We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/miracorhan/OpenGoogleImageGeneratorMCP'
If you have feedback or need assistance with the MCP directory API, please join our Discord server