gemini-image-studio-mcp
Integrates with Google Gemini for AI-powered image generation and editing, including structured JSON editing, natural language editing, reference image support, and dual model options (Flash and Pro).
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., "@gemini-image-studio-mcpGenerate a hero image for a tech startup landing page"
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.
gemini-image-studio-mcp
MCP server for AI image generation and editing with Google Gemini. Create web assets, ad creatives, and brand visuals — with structured JSON editing for precise, repeatable control.
What Makes This Different
Most Gemini image MCP servers are basic text-to-image wrappers. This one adds a structured editing pipeline:
Generate an image from text or JSON prompts
Decompose it into a structured JSON blueprint (every visual component mapped)
Edit by changing specific fields —
subject[0].hair.color: "platinum_blonde"— and regenerating
This means precise, isolated changes without affecting the rest of the image. Change a hair color without touching the background. Swap clothing without altering the pose. All through dot-notation JSON paths.
Related MCP server: universal-image-mcp
Features
5 MCP Tools — generate, decompose, edit, presets, list
Structured JSON Editing — decompose images into blueprints, edit specific fields with dot-notation
Natural Language Editing — or just describe the change in plain English
10 Built-in Presets — Facebook ads, Instagram stories, hero images, OG images, YouTube thumbnails, and more
Reference Image Support — up to 14 reference images for character/object consistency
Dual Model Support — Gemini 3.1 Flash (fast) or Gemini 3 Pro (best quality)
Blueprint Caching — decomposed blueprints cached alongside images for instant re-edits
Google Search Grounding — real-world accuracy via web search
Smart Error Handling — retry on rate limits, clear safety block messages, file size warnings
Quick Start
1. Get a Gemini API Key
Get one free at Google AI Studio.
2. Install
npm install -g gemini-image-studio-mcp3. Add to Claude Code
claude mcp add gemini-image-studio-mcp -e GEMINI_API_KEY=your-key-here -- gemini-image-studio-mcpOr add to your project's .claude/mcp.json:
{
"mcpServers": {
"gemini-image-studio-mcp": {
"command": "npx",
"args": ["-y", "gemini-image-studio-mcp"],
"env": {
"GEMINI_API_KEY": "your-key-here"
}
}
}
}4. Use It
Ask Claude to generate images:
"Create a Facebook ad for a coffee shop with warm lighting"
"Generate a hero image for a tech startup landing page"
"Edit the hero image — change the background to a sunset beach"
Tools
generate_image
Create a new image from text or structured JSON prompts.
Parameter | Type | Required | Description |
| string | Yes | Text description or JSON prompt |
|
| No | Prompt format (default: |
| string | No | Asset preset (e.g., |
| string | No | Override ratio ( |
|
| No | Resolution (default: |
|
| No | Gemini model (default: |
| string[] | No | Paths to reference images for consistency |
| string | No | Custom filename |
| boolean | No | Use Google Search for accuracy |
decompose_image
Analyze an image into a structured JSON blueprint — the first step of the edit workflow.
Parameter | Type | Required | Description |
| string | Yes | Path to the image |
|
| No | Granularity (default: |
Returns a full blueprint with subject, scene, technical, composition, text_rendering, style_modifiers, and meta sections — each field precisely describing the image's visual components.
edit_image
Edit an image using JSON changes or natural language.
Parameter | Type | Required | Description |
| string | Yes | Path to the image |
|
| Yes | Edit mode |
| object | For JSON edits | Dot-notation paths to change |
| string | For NL edits | Natural language instruction |
| object | No | Blueprint (auto-loaded from cache if omitted) |
|
| No | Model (default: |
| string | No | Custom filename |
JSON edit example — change hair color and add sunglasses:
{
"image_path": "/output/portrait.png",
"edit_type": "json",
"changes": {
"subject[0].hair.color": "platinum_blonde",
"subject[0].accessories": [
{ "item": "sunglasses", "material": "metal", "color": "#C0C0C0" }
]
}
}Natural language edit example:
{
"image_path": "/output/portrait.png",
"edit_type": "natural_language",
"instruction": "Change the background to a tropical beach at sunset. Keep the person exactly the same."
}get_presets
List available asset presets with dimensions, tips, and conventions.
Parameter | Type | Required | Description |
|
| No | Filter (default: |
list_generated
Browse previously generated images.
Parameter | Type | Required | Description |
| string | No | Search by filename |
| number | No | Max results (default: 20) |
| boolean | No | Include cached blueprints |
JSON Editing Workflow
The key differentiator — precise, field-level image editing:
Step 1: Generate
generate_image(prompt: "Professional headshot, navy blazer", preset: "linkedin_post")
→ /output/headshot.png
Step 2: Decompose
decompose_image(image_path: "/output/headshot.png")
→ JSON blueprint with every visual component mapped
Step 3: Edit (precise)
edit_image(
image_path: "/output/headshot.png",
edit_type: "json",
changes: {
"subject[0].clothing[0].color": "#8B0000",
"scene.lighting.type": "studio_softbox"
}
)
→ /output/headshot-edit-1.png (blazer changed to dark red, lighting adjusted)
Step 4: Edit (creative)
edit_image(
image_path: "/output/headshot-edit-1.png",
edit_type: "natural_language",
instruction: "Add warm bokeh to the background"
)
→ /output/headshot-edit-1-edit-1.pngDot-Notation Paths
subject[0].hair.color → Hair color
subject[0].hair.style → Hair style
subject[0].clothing[0].color → First clothing item color
subject[0].accessories → Add/change accessories
scene.lighting.type → Lighting type
scene.location → Location/background
text_rendering.text_content → Text in image
technical.lens → Camera lens
composition.framing → Shot framing
style_modifiers.aesthetic → Aesthetic styleBuilt-in Presets
Preset | Category | Aspect Ratio | Dimensions | Best For |
| Ad | 1:1 | 1080x1080 | Facebook/Instagram feed ads |
| Ad | 9:16 | 1080x1920 | Instagram/Facebook story ads |
| Ad | 16:9 | 1200x628 | Google Display Network |
| Web | 21:9 | 2560x1080 | Above-the-fold hero sections |
| Web | 16:9 | 1200x630 | Social share / link previews |
| Web | 4:5 | 800x1000 | E-commerce product grids |
| Web | 3:1 | 600x200 | Email marketing headers |
| Social | 1:1 | 1080x1080 | LinkedIn feed posts |
| Social | 16:9 | 1200x675 | Twitter/X posts |
| Social | 16:9 | 1280x720 | YouTube thumbnails |
Configuration
Variable | Required | Default | Description |
| Yes | — | Google AI Studio API key |
| No |
| Where generated images are saved |
Integration
Claude Code
claude mcp add gemini-image-studio-mcp -e GEMINI_API_KEY=your-key -- gemini-image-studio-mcpCursor
Add to .cursor/mcp.json:
{
"mcpServers": {
"gemini-image-studio-mcp": {
"command": "npx",
"args": ["-y", "gemini-image-studio-mcp"],
"env": {
"GEMINI_API_KEY": "your-key-here"
}
}
}
}Any MCP Client
GEMINI_API_KEY=your-key npx gemini-image-studio-mcpThe server communicates over stdio using the Model Context Protocol.
MCP Prompt & Resource
This server also exposes:
Prompt:
nano_banana_expert— invoke this to give Claude full knowledge of the JSON schema, editing best practices, and asset creation guidelinesResource:
nanobanana://schema/prompt— the raw JSON schema with all enum values for programmatic access
Models
Model | ID | Best For |
Flash (default) |
| Fast generation, high volume, cost-effective |
Pro |
| Best quality, complex scenes, professional assets |
Contributing
Contributions welcome! Please:
Fork the repository
Create a feature branch (
git checkout -b feature/my-feature)Run tests (
npm test)Commit your changes
Push and open a PR
License
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
- Who's Calling? MCP Hosts Are an Identity Blind Spot (And the Spec Knows It)By Om-Shree-0709 on .mcpAgent IdentityOAuth 2.1
- 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/udhaykumarbala/gemini-image-studio-mcp'
If you have feedback or need assistance with the MCP directory API, please join our Discord server