Nano-Banana (Gemini 2.5 Flash Image) logo

Nano-Banana (Gemini 2.5 Flash Image)

Organization
conechoai

A Nano Banana MCP server, which you can integrate to cursor/claude code and any mcp client

Publisherconechoai
Repositorynano-banana-mcp
LanguageJavaScript
Forks
76
Stars
190
Available tools
0
Transport typestdio
Categories
LicenseMIT
Links
  • Connect tools to AI workflows

    Nano-Banana (Gemini 2.5 Flash Image) exposes MCP capabilities that can be used by compatible AI clients and agents.

  • 0 available tools

    Browse the callable actions below, including names and descriptions when provided by the server.

  • Ready-to-copy setup

    Use the installation snippets to configure this server in your preferred MCP client.

  • Open source signals

    190 stars and 76 forks from the linked repository.

Nano-Banana MCP Server 🍌

πŸ€– This project was entirely generated by Claude Code - an AI coding assistant that can create complete, production-ready applications from scratch.

A Model Context Protocol (MCP) server that provides AI image generation and editing capabilities using Google's Gemini 2.5 Flash Image API. Generate stunning images, edit existing ones, and iterate on your creations with simple text prompts.

✨ Features

  • 🎨 Generate Images: Create new images from text descriptions
  • ✏️ Edit Images: Modify existing images with text prompts
  • πŸ”„ Iterative Editing: Continue editing the last generated/edited image
  • πŸ–ΌοΈ Multiple Reference Images: Use reference images for style transfer and guidance
  • 🌍 Cross-Platform: Smart file paths for Windows, macOS, and Linux
  • πŸ”§ Easy Setup: Simple configuration with API key
  • πŸ“ Auto File Management: Automatic image saving with organized naming

πŸ”‘ Setup

  1. Get your Gemini API key:

  2. Configure the MCP server: See configuration examples for your specific client below (Claude Code, Cursor, or other MCP clients).

πŸ’» Usage with Claude Code

Configuration:

Add this to your Claude Code MCP settings:

Option A: With environment variable (Recommended - Most Secure)

json
{
  "mcpServers": {
    "nano-banana": {
      "command": "npx",
      "args": ["nano-banana-mcp"],
      "env": {
        "GEMINI_API_KEY": "your-gemini-api-key-here"
      }
    }
  }
}

Option B: Without environment variable

json
{
  "mcpServers": {
    "nano-banana": {
      "command": "npx",
      "args": ["nano-banana-mcp"]
    }
  }
}

Usage Examples:

Generate an image of a sunset over mountains
Edit this image to add some birds in the sky
Continue editing to make it more dramatic

🎯 Usage with Cursor

Configuration:

Add to your Cursor MCP configuration:

Option A: With environment variable (Recommended)

json
{
  "nano-banana": {
    "command": "npx",
    "args": ["nano-banana-mcp"],
    "env": {
      "GEMINI_API_KEY": "your-gemini-api-key-here"
    }
  }
}

Option B: Without environment variable

json
{
  "nano-banana": {
    "command": "npx",
    "args": ["nano-banana-mcp"]
  }
}

Usage Examples:

  • Ask Cursor to generate images for your app
  • Create mockups and prototypes
  • Generate assets for your projects

πŸ”§ For Other MCP Clients

If you're using a different MCP client, you can configure nano-banana-mcp using any of these methods:

Configuration Methods

Method A: Environment Variable in MCP Config (Recommended)

json
{
  "nano-banana": {
    "command": "npx",
    "args": ["nano-banana-mcp"],
    "env": {
      "GEMINI_API_KEY": "your-gemini-api-key-here"
    }
  }
}

Method B: System Environment Variable

bash
export GEMINI_API_KEY="your-gemini-api-key-here"
npx nano-banana-mcp

Method C: Using the Configure Tool

bash
npx nano-banana-mcp
# The server will prompt you to configure when first used
# This creates a local .nano-banana-config.json file

πŸ› οΈ Available Commands

generate_image

Create a new image from a text prompt.

typescript
generate_image({
  prompt: "A futuristic city at night with neon lights"
})

edit_image

Edit a specific image file.

typescript
edit_image({
  imagePath: "/path/to/image.png",
  prompt: "Add a rainbow in the sky",
  referenceImages?: ["/path/to/reference.jpg"] // optional
})

continue_editing

Continue editing the last generated/edited image.

typescript
continue_editing({
  prompt: "Make it more colorful",
  referenceImages?: ["/path/to/style.jpg"] // optional
})

get_last_image_info

Get information about the last generated image.

typescript
get_last_image_info()

configure_gemini_token

Configure your Gemini API key.

typescript
configure_gemini_token({
  apiKey: "your-gemini-api-key"
})

get_configuration_status

Check if the API key is configured.

typescript
get_configuration_status()

βš™οΈ Configuration Priority

The MCP server loads your API key in the following priority order:

  1. πŸ₯‡ MCP Configuration Environment Variables (Highest Priority)

    • Set in your claude_desktop_config.json or MCP client config
    • Most secure as it's contained within the MCP configuration
    • Example: "env": { "GEMINI_API_KEY": "your-key" }
  2. πŸ₯ˆ System Environment Variables

    • Set in your shell/system environment
    • Example: export GEMINI_API_KEY="your-key"
  3. πŸ₯‰ Local Configuration File (Lowest Priority)

    • Created when using the configure_gemini_token tool
    • Stored as .nano-banana-config.json in current directory
    • Automatically ignored by Git and NPM

πŸ’‘ Recommendation: Use Method 1 (MCP config env variables) for the best security and convenience.

πŸ“ File Storage

Images are automatically saved to platform-appropriate locations:

  • Windows: %USERPROFILE%\\Documents\\nano-banana-images\\
  • macOS/Linux: ./generated_imgs/ (in current directory)
  • System directories: ~/nano-banana-images/ (when run from system paths)

File naming convention:

  • Generated images: generated-[timestamp]-[id].png
  • Edited images: edited-[timestamp]-[id].png

🎨 Example Workflows

Basic Image Generation

  1. generate_image - Create your base image
  2. continue_editing - Refine and improve
  3. continue_editing - Add final touches

Style Transfer

  1. generate_image - Create base content
  2. edit_image - Use reference images for style
  3. continue_editing - Fine-tune the result

Iterative Design

  1. generate_image - Start with a concept
  2. get_last_image_info - Check current state
  3. continue_editing - Make adjustments
  4. Repeat until satisfied

πŸ”§ Development

This project was created with Claude Code and follows these technologies:

  • TypeScript - Type-safe development
  • Node.js - Runtime environment
  • Zod - Schema validation
  • Google GenAI - Image generation API
  • MCP SDK - Model Context Protocol

Local Development

bash
# Clone the repository
git clone https://github.com/claude-code/nano-banana-mcp.git
cd nano-banana-mcp

# Install dependencies
npm install

# Run in development mode
npm run dev

# Build for production
npm run build

# Run tests
npm test

πŸ“‹ Requirements

  • Node.js 18.0.0 or higher
  • Gemini API key from Google AI Studio
  • Compatible with Claude Code, Cursor, and other MCP clients

🀝 Contributing

This project was generated by Claude Code, but contributions are welcome! Please feel free to:

  • Report bugs
  • Suggest new features
  • Submit pull requests
  • Improve documentation

πŸ“„ License

MIT License - see LICENSE file for details.

πŸ™ Acknowledgments

  • Claude Code - For generating this entire project
  • Google AI - For the powerful Gemini 2.5 Flash Image API
  • Anthropic - For the Model Context Protocol
  • Open Source Community - For the amazing tools and libraries

πŸ“ž Support


✨ Generated with love by Claude Code - The future of AI-powered development is here!

Installation

TypingMind
Prerequisites:

Node.js 18+

{
  "mcpServers": {
    "nano-banana": {
      "command": "npx",
      "args": [
        "nano-banana-mcp"
      ],
      "env": {
        "GEMINI_API_KEY": "your-gemini-api-key-here"
      }
    }
  }
}

Use Nano-Banana (Gemini 2.5 Flash Image) MCP with multiple AI models

TypingMind connects MCP tools at the workspace level, so once Nano-Banana (Gemini 2.5 Flash Image) is connected, you can use it with different AI models in TypingMind instead of setting it up separately for each model. This MCP runs locally through the TypingMind MCP connector on your device.

Setup guide to use the local connector

Use this when the MCP server needs access to local files, apps, or private resources on your computer.

1

Open the MCP settings

In TypingMind, go to Settings, Advanced Settings, then Model Context Protocol and choose Setup Connector.

  1. Open TypingMind in your browser.
  2. Click the Settings icon.
  3. Go to Advanced Settings.
  4. Open the Model Context Protocol section.
  5. Click Setup Connector and choose This Device.
TypingMind MCP connector setup screen with This Device selected
2

Run the connector command

Choose This Device, copy the command from TypingMind, and run it in Terminal. Keep the process running while you use MCP.

  1. Copy the setup command shown by TypingMind.
  2. Open Terminal on macOS or Windows Terminal on Windows.
  3. Paste and run the command.
  4. Approve the package install if Terminal asks you to proceed.
  5. Keep the Terminal window running while using MCP tools.
3

Add Nano-Banana (Gemini 2.5 Flash Image) as a server

When the connector status is Ready, click Edit Servers and paste the MCP server configuration.

  1. Wait until the connector status shows Ready.
  2. Click Edit Servers.
  3. Paste the Nano-Banana (Gemini 2.5 Flash Image) MCP server configuration.
  4. Save the server list.
  5. Refresh if you want to confirm the connector is still ready.
TypingMind MCP settings showing active server and Edit Servers button
{
  "mcpServers": {
    "nano-banana-gemini-2-5-flash-image": {
      "command": "npx",
      "args": [
        "-y",
        "nano-banana-mcp"
      ]
    }
  }
}
4

Use it across models

Save the server list, open Plugins, enable the Nano-Banana (Gemini 2.5 Flash Image) MCP tools, then select any supported AI model in TypingMind and use the tools in chat or assign them to an AI agent.

  1. Open the Plugins page in TypingMind.
  2. Enable the Nano-Banana (Gemini 2.5 Flash Image) MCP tools.
  3. Start a chat and choose the AI model you want to use.
  4. Use the MCP tools in chat or assign them to an AI agent.
  5. Switch to another AI model whenever needed without reconnecting MCP.
TypingMind chat using enabled MCP tools with a selected AI model
Can you use Nano-Banana (Gemini 2.5 Flash Image) to help me with this task?
Nano-Banana (Gemini 2.5 Flash Image)
Sure. I read it.
Here is what I found using Nano-Banana (Gemini 2.5 Flash Image).

Frequently asked questions

What is the Nano-Banana (Gemini 2.5 Flash Image) MCP server used for?

Nano-Banana (Gemini 2.5 Flash Image) is an MCP server that lets compatible AI clients connect to external tools and context. In TypingMind, you can add this MCP server once and make its tools available in your AI workspace.

Can I use Nano-Banana (Gemini 2.5 Flash Image) MCP with multiple AI models in TypingMind?

Yes. TypingMind connects MCP tools at the workspace level, so you can use Nano-Banana (Gemini 2.5 Flash Image) with different AI models such as Claude, ChatGPT, Gemini, or other models you have configured in TypingMind without setting up the MCP server separately for each model.

Why use Nano-Banana (Gemini 2.5 Flash Image) MCP with TypingMind?

TypingMind is one of the best frontends for LLM chat because it brings multiple AI models, prompts, plugins, AI agents, API keys, and MCP tools into one workspace. With Nano-Banana (Gemini 2.5 Flash Image) connected, you can use its MCP tools across your preferred models while keeping your chat workflow organized in TypingMind.

How do I connect Nano-Banana (Gemini 2.5 Flash Image) MCP to TypingMind?

Nano-Banana (Gemini 2.5 Flash Image) runs through the TypingMind local MCP connector. This is best when the MCP server needs access to local files, desktop apps, command-line tools, or private resources on your computer.

What tools does Nano-Banana (Gemini 2.5 Flash Image) MCP provide in TypingMind?

Nano-Banana (Gemini 2.5 Flash Image) exposes MCP capabilities that can be enabled from the TypingMind Plugins page and used in chat or assigned to AI agents.

Do I need to share my API keys with TypingMind to use Nano-Banana (Gemini 2.5 Flash Image) MCP?

No. TypingMind is local-first and lets you keep your model providers, API keys, prompts, and MCP configuration under your control. If Nano-Banana (Gemini 2.5 Flash Image) requires authentication, add the required headers, OAuth settings, or local configuration for that MCP server when you create the connection.

Related MCP Servers

View all

Set up your own AI workspace now

Get notified about new features and future giveaways by subscribing to our newsletter πŸ‘‡