nanobanana-mcp-image-generation

Generate and edit images with Google Gemini models via an MCP server.

7|2|Updated May 16, 2026
One-click install
npx skills add https://github.com/reason-machines/mcp-skills --skill nanobanana-mcp-image-generation-reason-machines
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: nanobanana-mcp-image-generation
Source: https://github.com/reason-machines/mcp-skills/tree/main/skills/nanobanana-mcp-image-generation
Command: npx skills add https://github.com/reason-machines/mcp-skills --skill nanobanana-mcp-image-generation-reason-machines

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve? Setting up AI image generation inside an AI assistant usually requires custom API integration, model selection logic, and file handling. This Skill connects your MCP client to Google's Gemini image models so you can generate, edit, and manage images directly from natural language prompts. ## Core Features & Use Cases - Text-to-Image Generation: Create images with the generate_image tool, with automatic model routing across Flash, NB2, and Pro tiers, 4K resolution, and aspect ratio control. - Image Editing & Inpainting: Modify existing images with the edit_image tool, including mask-based edits and background replacement. - Templates & File Management: Use pre-built prompt templates (product photo, portrait, logo) and upload reference images via the Gemini Files API. - Use Case: A marketing team needs a 4K product photo, a YouTube thumbnail, and an Instagram post. They prompt the assistant with each requirement, and the Skill auto-selects the right Gemini model, aspect ratio, and resolution for each asset. ## Quick Start Install the server with uvx, set your GEMINI_API_KEY in your MCP client configuration, then ask the assistant to generate a 4K product photo of a coffee mug in 4:3 aspect ratio.

Frequently Asked Questions about nanobanana-mcp-image-generation

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I generate images with Gemini in Claude Desktop?▼

Add the nanobanana MCP server to your claude_desktop_config.json with the uvx command and your GEMINI_API_KEY environment variable. After restarting, call the generate_image tool with a text prompt to create images.

Which Gemini image model should I use for generation?▼

Use the default auto mode, which routes most prompts to NB2 for 4K output at Flash speed. Choose Pro for complex cinematic scenes needing deep reasoning, and Flash for fast drafts at 1024px resolution.

Can I edit existing images with Gemini MCP?▼

Yes, the edit_image tool modifies existing images from a text prompt, with optional mask-based inpainting where white regions of a mask define the edit area. You can also apply templates like background_replace or style_transfer.

Does nanobanana support Vertex AI authentication?▼

Yes, set NANOBANANA_AUTH_METHOD to vertex_ai with your GCP_PROJECT_ID and GCP_REGION in the server environment. You must enable the Vertex AI API and grant the roles/aiplatform.user IAM role.

Why is my Gemini image generation timing out?▼

The Pro model can take 5-8 seconds per image, which may exceed client timeouts. Switch to NB2 for 2-4 second generation at 4K quality, or Flash for the fastest 1024px results.

How do I get consistent style across multiple generated images?▼

Pass the same integer seed parameter to generate_image across calls to reproduce a similar style. You can also upload reference images with upload_file so the model uses them as style or subject context.