Skip to main content
Glama

nano-banana-mcp

An MCP (Model Context Protocol) server for AI image generation using Google Gemini. Generate images from text prompts and optionally provide reference images to inform the output. Supports MCP Apps β€” generated images render as an interactive viewer directly inside the chat in VS Code Copilot, Claude, and other MCP Apps-capable clients.

Demo showing generated app icon rendered inline in VS Code Copilot chat

Features

  • 🎨 Text-to-image generation via Google Gemini

  • πŸ–ΌοΈ Image editing β€” pass reference images to restyle, edit, or combine

  • ✨ MCP Apps support β€” images render as an interactive viewer inline in the conversation (VS Code Copilot, Claude Desktop, Goose, and more)

  • πŸ’Ύ Save to disk β€” optionally save outputs to a directory

Related MCP server: Gemini Image MCP

Quick start

npm install
npm run build

Get a free API key at Google AI Studio.

Tool: generate_image

A single, flexible tool that handles all image generation β€” from scratch or informed by reference images.

Parameter

Required

Description

prompt

βœ…

Text prompt describing what to generate or how to transform the input

images

Optional array of reference images (file paths, data URLs, or base64 strings)

google_api_key

Google AI Studio API key (falls back to GOOGLE_API_KEY env var)

output_dir

Directory to save images to disk

output_name

Filename prefix (default: generated)

Examples

  • From scratch: "A minimalist app icon for a weather app, flat design, blue gradient"

  • Edit an image: "Change the background to a sunset" + images: ["./photo.jpg"]

  • Combine references: "Merge these two logo concepts into one" + images: ["./logo1.png", "./logo2.png"]

VS Code configuration

Add to your mcp.json (User or workspace):

{
  "servers": {
    "nano-banana": {
      "type": "stdio",
      "command": "node",
      "args": ["<path-to-this-repo>/dist/index.js"],
      "env": {
        "GOOGLE_API_KEY": "${input:google-api-key}"
      }
    }
  },
  "inputs": [
    {
      "id": "google-api-key",
      "type": "promptString",
      "description": "Google AI Studio key",
      "password": true
    }
  ]
}

Claude Desktop configuration

Add to claude_desktop_config.json:

{
  "mcpServers": {
    "nano-banana": {
      "command": "node",
      "args": ["<path-to-this-repo>/dist/index.js"],
      "env": {
        "GOOGLE_API_KEY": "your-google-api-key"
      }
    }
  }
}

Development

npm run dev    # Run with tsx (no build step)
npm run build  # Compile TypeScript
npm start      # Run compiled output

Available Tools

1 tool
generate_imageGenerate ImageA

Generate or edit images using Google Gemini. Provide a text prompt describing what you want. Optionally include one or more reference images to inform the output (e.g. edit a photo, restyle an icon, combine references).

Inputs: prompt (required), images, output_dir, output_name, +1 more.

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections.

Loading tool schema changelog…

    TDQS

    A3.9/5.0

    Scored across 1 tool

    Disambiguation5/5

    There is only one tool, so there is no possibility of selecting the wrong one. Its purpose (generate or edit images from a prompt with optional references) is stated clearly and unambiguously.

    Naming Consistency5/5

    The single name generate_image follows a clean verb_noun snake_case convention that describes exactly what the tool does. With only one tool there is nothing to be inconsistent with, and the name sets a predictable pattern.

    Tool Count3/5

    One tool is defensible for a narrowly focused image-generation server, but the surface feels thin: generation and editing are collapsed into a single entry point with no separate controls or helpers. It sits at the borderline of the 'too few' band rather than being clearly well-scoped.

    Completeness3/5

    Core capability (text-to-image and reference-based editing) is covered in one call, but there are notable gaps: no exposure of output controls like aspect ratio, image count, or model/quality selection, and no separate edit endpoint for simpler prompting. Agents can partly work around this via prompt text, but the surface is minimal.

    Maintenance

    ActivityInactive
    ResponsivenessNo recent community issues

    Related MCP Connectors

    Related MCP Servers