Skip to main content
Glama

🍌 Nanobanana MCP

Vibe Coded

A powerful Model Context Protocol (MCP) server for generative AI media tasks.

Overview

Nanobanana MCP brings generative capabilities directly to your MCP clients (like Claude Desktop or other AI agents). It leverages Google's Gemini API to generate images, icons, patterns, diagrams, and even visual stories.

This server implements the Model Context Protocol, allowing seamless integration with any MCP-compliant tool.

Related MCP server: MCP MediaCrea

✨ Features

  • Generate Images: Create images from text prompts (nanobanana_generate_image).

  • Edit Images: Modify existing images using text instructions (nanobanana_edit_image).

  • Restore Images: Denoise and restore image quality (nanobanana_restore_image).

  • Generate Icons: Create app icons and favicons in various sizes (nanobanana_generate_icon).

  • Generate Patterns: Create seamless textures and tileable patterns (nanobanana_generate_pattern).

  • Generate Diagrams: Create flowcharts, UML, and technical diagrams (nanobanana_generate_diagram).

  • Story Generation: Generate sequential visual stories (nanobanana_generate_story).

🚀 Getting Started

Prerequisites

  • Bun (v1.2+ recommended)

  • A Google Gemini API Key

Installation

  1. Clone the repository:

    git clone <repository-url>
    cd nanobanana-mcp
  2. Install dependencies:

    bun install
  3. Create a .env file in the root directory:

    cp .env.example .env # if example exists, otherwise create new

Configuration

Set the following environment variables in your .env file:

Variable

Description

Default

GEMINI_API_KEY

Your Google Gemini API Key (Required for generation)

null

NANOBANANA_MODEL

The Gemini model to use

gemini-2.5-flash-image

OUTPUT_DIR

Directory to save generated assets

./nanobanana-output

LOG_LEVEL

Logging verbosity (info, debug, warn, error)

info

Note: The server will fallback to a Mock Generator if no API key is provided, returning placeholder images for testing.

🏃‍♂️ Usage

Running the Server

Start the MCP server directly:

bun run index.ts

Integration with Claude Desktop

Add the following to your claude_desktop_config.json:

{
  "mcpServers": {
    "nanobanana": {
      "command": "bun",
      "args": ["run", "/absolute/path/to/nanobanana-mcp/index.ts"],
      "env": {
        "GEMINI_API_KEY": "your_api_key_here"
      }
    }
  }
}

🛠️ Development

Run the test suite to verify functionality:

# Run unit tests
bun test

# Run specific phase tests
bun test src/phase2.test.ts

📜 License

This project is licensed under the MIT License.

F
license - not found
-
quality - not tested
D
maintenance

Maintenance

Maintainers
Response time
Release cycle
Releases (12mo)
Commit activity

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

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/kamil-perczynski/nanobanana-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server