nano-banana-mcp
MCP server that exposes Google's Gemini 2.5 Flash Image (Nano Banana) to Claude, enabling image generation, editing, and composition through natural language.
README
nano-banana-mcp
Servidor MCP (Model Context Protocol) en TypeScript que expone Nano Banana —el modelo de imagen Gemini 2.5 Flash Image de Google— a Claude. Permite generar, editar y componer imágenes desde Claude Desktop, Claude Code o cualquier cliente MCP.
Capacidades (tools)
| Tool | Descripción | Entradas |
|---|---|---|
generate_image |
Texto → imagen | prompt |
edit_image |
Imagen + texto → imagen (inpainting, estilo, retoques) | prompt, image |
compose_images |
N imágenes + texto → imagen (fusión, composición, transferencia de estilo) | prompt, images[] |
Las imágenes de entrada (image / images) aceptan: ruta a archivo local,
data URL (data:image/png;base64,...) o base64 crudo.
Las imágenes de salida se devuelven inline en base64 en la respuesta del tool.
Requisitos
- Node.js >= 18
- Una API key de Google AI Studio: https://aistudio.google.com/apikey
Instalación
npm install
npm run build
Copia .env.example a .env y coloca tu key:
cp .env.example .env
# edita .env -> GEMINI_API_KEY=...
El
.enves solo para desarrollo local. Al conectarlo a un cliente MCP, la key se pasa por la variable de entorno del propio cliente (ver abajo).
Conectar a Claude
Claude Code (CLI)
claude mcp add nano-banana \
-e GEMINI_API_KEY=tu_api_key \
-- node /ruta/absoluta/nano-banana-mcp/dist/index.js
Claude Desktop
Edita claude_desktop_config.json:
{
"mcpServers": {
"nano-banana": {
"command": "node",
"args": ["/ruta/absoluta/nano-banana-mcp/dist/index.js"],
"env": {
"GEMINI_API_KEY": "tu_api_key"
}
}
}
}
Reinicia el cliente y pídele, por ejemplo: "genera una imagen de un gato astronauta en acuarela".
Desarrollo
npm run dev # ejecuta con tsx (sin compilar)
npm run typecheck # verifica tipos
npm run build # compila a dist/
Prueba rápida del protocolo (sin key, solo lista tools):
printf '%s\n' \
'{"jsonrpc":"2.0","id":1,"method":"initialize","params":{"protocolVersion":"2024-11-05","capabilities":{},"clientInfo":{"name":"smoke","version":"0.0.0"}}}' \
'{"jsonrpc":"2.0","method":"notifications/initialized"}' \
'{"jsonrpc":"2.0","id":2,"method":"tools/list","params":{}}' \
| node dist/index.js
Configuración
| Variable | Requerida | Por defecto | Descripción |
|---|---|---|---|
GEMINI_API_KEY |
Sí | — | API key de Google AI Studio |
NANO_BANANA_MODEL |
No | gemini-2.5-flash-image |
Modelo de imagen a usar |
Ambientes
La configuración por ambiente (local / integración / QA / producción) está
documentada en docs/environments/. Las decisiones de
arquitectura en docs/architecture/.
Notas
- En un servidor stdio,
stdoutestá reservado para el protocolo MCP; los logs de diagnóstico van astderr. - Nunca comitees tu
.envni la API key (ya está en.gitignore).
Recommended Servers
playwright-mcp
A Model Context Protocol server that enables LLMs to interact with web pages through structured accessibility snapshots without requiring vision models or screenshots.
Magic Component Platform (MCP)
An AI-powered tool that generates modern UI components from natural language descriptions, integrating with popular IDEs to streamline UI development workflow.
Audiense Insights MCP Server
Enables interaction with Audiense Insights accounts via the Model Context Protocol, facilitating the extraction and analysis of marketing insights and audience data including demographics, behavior, and influencer engagement.
VeyraX MCP
Single MCP tool to connect all your favorite tools: Gmail, Calendar and 40 more.
graphlit-mcp-server
The Model Context Protocol (MCP) Server enables integration between MCP clients and the Graphlit service. Ingest anything from Slack to Gmail to podcast feeds, in addition to web crawling, into a Graphlit project - and then retrieve relevant contents from the MCP client.
Kagi MCP Server
An MCP server that integrates Kagi search capabilities with Claude AI, enabling Claude to perform real-time web searches when answering questions that require up-to-date information.
E2B
Using MCP to run code via e2b.
Neon Database
MCP server for interacting with Neon Management API and databases
Exa Search
A Model Context Protocol (MCP) server lets AI assistants like Claude use the Exa AI Search API for web searches. This setup allows AI models to get real-time web information in a safe and controlled way.
Qdrant Server
This repository is an example of how to create a MCP server for Qdrant, a vector search engine.