AA

aeven-ai/mcp-nanobanana

开发工具

本页由 AI 翻译,技术细节请以原文为准。 查看原文

10 stars 3 forks 质量 62 趋势 18Apache-2.0

mcp for nano banana using openrouter.ai

概览

A professional MCP (Model Context Protocol) extension for any MCP-compatible client (including Gemini CLI and Codex CLI), for generating and manipulating images. It uses the model by default, and is pre-configured to connect to OpenRouter. You can point it at any provider that hosts the model by adjusting the MODEL_* environment variables. - : Create stunning images from descriptive prompts - : Modify existing images with natural language instructions - : Restore and enhance old or damaged photos - : User-friendly filenames with automatic duplicate prevention 1. installed and configured (e.g., Gemini CLI, Codex CLI) 2. and npm 3. : You will need an API key from OpenRouter or another provider that hosts the google/gemini-2.5-flash-image model. By default, the extension talks to OpenRouter. Optional overrides are useful when targeting other providers that host the model: - MODEL_BASE_URL – alternate provider endpoint (default: https://openrouter.

README

以下为原文 README 节选,完整内容请查看原文。

Nano Banana - MCP Image Generation Extension

A professional MCP (Model Context Protocol) extension for any MCP-compatible client (including Gemini CLI and Codex CLI), for generating and manipulating images. It uses the google/gemini-2.5-flash-image model by default, and is pre-configured to connect to OpenRouter. You can point it at any provider that hosts the model by adjusting the MODEL_* environment variables.

✨ Features

  • 🎨 Text-to-Image Generation: Create stunning images from descriptive prompts
  • ✏️ Image Editing: Modify existing images with natural language instructions
  • 🔧 Image Restoration: Restore and enhance old or damaged photos
  • 📁 Smart File Management: User-friendly filenames with automatic duplicate prevention

📋 Prerequisites

  1. MCP-compatible CLI installed and configured (e.g., Gemini CLI, Codex CLI)
  2. Node.js 18+ and npm
  3. API Key: You will need an API key from OpenRouter or another provider that hosts the google/gemini-2.5-flash-image model.

By default, the extension talks to OpenRouter. Optional overrides are useful when targeting other providers that host the model:

  • MODEL_BASE_URL – alternate provider endpoint (default: https://openrouter.ai/api/v1)
  • MODEL_ID – override model id (default: google/gemini-2.5-flash-image)
  • MODEL_REFERER / MODEL_TITLE – analytics headers for providers that require them
  • MODEL_GENERATE_PATH – alternate generation endpoint path (default: /responses)

If you are using OpenRouter, refer to their authentication guide for generating API keys. For other providers, consult their documentation.

🚀 Installation

For most users, installing via npx or your CLI’s extension manager is the easiest method.

Gemini CLI:

When you install the extension, you will be prompted to enter your API key.

gemini extensions install https://github.com/Aeven-AI/mcp-nanobanana

Codex CLI:

codex mcp add nanobanana --env MODEL_API_KEY="YOUR_API_KEY_HERE" -- npx -y @aeven/nanobanana-mcp@latest

Opencode CLI:

  1. Run opencode config edit (or open your opencode.jsonc settings file manually).

  2. Register the server with an entry similar to:

    {
      "mcp": {
        "nanobanana": {
          "type": "local",
          "command": ["npx", "-y", "@aeven/nanobanana-mcp@latest"],
          "enabled": true,
          "environment": {
            "MODEL_API_KEY": "{env:MODEL_API_KEY}"
          }
        }
      }
    }
    
  3. Save the file and restart Opencode so it picks up the new MCP server.

Claude Code:

  1. Open Claude Code and navigate to Settings → Model Context Protocol → Add Server.
  2. Set the command to npx and the arguments to -y and @aeven/nanobanana-mcp@latest.
  3. Add an environment variable MODEL_API_KEY pointing at your provider key.
在 GitHub 查看完整 README

安装

This server does not publish a one-line install command.

Open the repository installation guide 新手?先看 mcpskill.org 教程 →