npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

nano-banana-pro-mcp

v1.0.1

Published

MCP server for 4K image generation using Gemini 3 Pro Image with advanced features

Readme

Nano Banana Pro MCP Server

4K Image Generation with Gemini 3 Pro Image

MCP server enabling Claude to generate and edit high-quality 4K images using Google's Gemini 3 Pro Image model (gemini-3-pro-image-preview). Features advanced text rendering, "thinking" process for complex prompts, and iterative editing capabilities.


Features

  • 4K Output Resolution: Generate images up to 4096x4096 pixels
  • Advanced Text Rendering: Superior text integration in images
  • Thinking Process: Model reasons through complex prompts for better results
  • Iterative Editing: Continue editing previous images without re-uploading
  • State Management: Automatic tracking of last generated image

Tools Provided

1. nb_pro_generate_image

Generate a NEW 4K image from text prompt.

Parameters:

  • prompt (string, required): Text description of the image to create

Example:

{
  "prompt": "A futuristic cityscape at sunset with flying cars and neon signs"
}

2. nb_pro_edit_image

Edit a SPECIFIC existing image file.

Parameters:

  • imagePath (string, required): Full file path to the image to edit
  • prompt (string, required): Description of modifications to make

Example:

{
  "imagePath": "/path/to/image.png",
  "prompt": "change the sky to purple and add mountains in background"
}

3. nb_pro_continue_editing

Continue editing the LAST generated/edited image.

Parameters:

  • prompt (string, required): Description of modifications to make

Example:

{
  "prompt": "change the hat color to red and add flowers"
}

4. nb_pro_get_last_image

Get information about the last generated/edited image.

Parameters: None

Returns:

  • imagePath: Path to last image
  • lastPrompt: Prompt used to generate/edit
  • timestamp: When image was created
  • fileSize: File size in KB

Installation

Prerequisites

Step 1: Install Dependencies

cd /Users/adriencastelain/Documents/ClaudeWorkspace/mcp-servers/nano-banana-pro
npm install

Step 2: Build TypeScript

npm run build

This compiles TypeScript to JavaScript in dist/ directory.

Step 3: Add to MCP Configuration

Add this entry to your mcp.json (or claude_desktop_config.json):

{
  "mcpServers": {
    "nano-banana-pro": {
      "command": "node",
      "args": [
        "/Users/adriencastelain/Documents/ClaudeWorkspace/mcp-servers/nano-banana-pro/dist/index.js"
      ],
      "env": {
        "GEMINI_API_KEY": "${GEMINI_API_KEY}"
      }
    }
  }
}

Note: Uses same GEMINI_API_KEY as regular nano-banana MCP server.

Step 4: Reload VSCode Window

  1. Cmd+Shift+P
  2. Select "Developer: Reload Window"
  3. Wait 10-15 seconds for MCP to initialize

Step 5: Verify Installation

In Claude Code chat, run:

Can you list the available nano banana pro tools?

You should see 4 tools:

  • nb_pro_generate_image
  • nb_pro_edit_image
  • nb_pro_continue_editing
  • nb_pro_get_last_image

Usage Examples

Generate New Image

Generate a 4K image of a minimalist tech startup logo with abstract geometric shapes in blue and white

Edit Specific Image

Edit /path/to/image.png - change the background to dark gradient and add lens flare

Continue Editing Last Image

Now add text "INNOVATION" in bold sans-serif font centered at top

Check Last Image

What was the last image I generated with nano banana pro?

Output Directory

All generated images are saved to:

/Users/adriencastelain/Documents/ClaudeWorkspace/generated_imgs/

Filename Format:

  • Generated: generated-YYYYMMDD-HHMMSS-abc123.png
  • Edited: edited-YYYYMMDD-HHMMSS-abc123.png

State File: .nano-banana-pro-state.json stores last image info for continue_editing tool.


Model Details

Model: gemini-3-pro-image-preview

Capabilities:

  • 4K resolution output (up to 4096x4096)
  • Advanced text rendering in images
  • "Thinking" process for complex prompts
  • Higher quality than Gemini 2.5 Flash
  • Better handling of detailed scenes

API Endpoint: Google Generative AI SDK Authentication: GEMINI_API_KEY environment variable


Comparison: Nano Banana vs Nano Banana Pro

| Feature | Nano Banana | Nano Banana Pro | |---------|-------------|-----------------| | Model | gemini-2.0-flash-exp | gemini-3-pro-image-preview | | Max Resolution | 2048x2048 | 4096x4096 | | Text Rendering | Good | Advanced | | Complex Prompts | Standard | Thinking Process | | Speed | Faster | Slower (higher quality) | | Use Case | Quick iterations | Final high-quality output |


Troubleshooting

"GEMINI_API_KEY environment variable not set"

Solution: Ensure your mcp.json has GEMINI_API_KEY in the env section and the key is set in your shell environment.

"No image data in response"

Solution: Model may not support the exact prompt. Try simplifying or rephrasing the prompt.

"Image file not found"

Solution: Use absolute file paths with nb_pro_edit_image. Or use nb_pro_continue_editing to edit the last generated image.

Build errors

Solution:

rm -rf node_modules package-lock.json
npm install
npm run build

Development

Watch Mode (auto-rebuild on save):

npm run watch

Manual Test:

export GEMINI_API_KEY="your-key-here"
npm test

Technical Architecture

Transport: stdio (standard input/output) Language: TypeScript (compiled to Node.js) Dependencies:

  • @modelcontextprotocol/sdk - MCP protocol implementation
  • @google/generative-ai - Gemini API client

State Management:

  • Last image tracked in .nano-banana-pro-state.json
  • Base64 encoding for in-memory image data
  • Persistent across MCP sessions

Security Notes

  • API key stored in environment variable (not in code)
  • Images saved to local directory only
  • No external hosting or sharing
  • State file contains base64 image data (can be large)

Performance

Generation Time:

  • Simple prompts: 10-20 seconds
  • Complex prompts: 30-60 seconds (thinking process)

File Sizes:

  • 4K images: 500KB - 2MB per image
  • State file: up to 10MB (contains last image base64)

License

MIT License - Atlas (MCP Builder AI) - Boald


Version History

  • v1.0.0 (2025-12-02): Initial release with 4 tools (generate, edit, continue_editing, get_last_image)

Support

For issues or feature requests, contact Atlas (MCP Builder AI) or Phoenix (DevOps).

Status: ✅ SANDBOX - Ready for testing (not in production yet)