A Nano Banana MCP server, which you can integrate to cursor/claude code and any mcp client
🤖 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.
<a href="https://glama.ai/mcp/servers/@ConechoAI/Nano-Banana-MCP"> <img width="380" height="200" src="https://glama.ai/mcp/servers/@ConechoAI/Nano-Banana-MCP/badge" alt="Nano-Banana-MCP MCP server" /> </a>Add this to your Claude Code MCP settings:
Option A: With environment variable (Recommended - Most Secure)
{
"mcpServers": {
"nano-banana": {
"command": "npx",
"args": ["nano-banana-mcp"],
"env": {
"GEMINI_API_KEY": "your-gemini-api-key-here"
}
}
}
}Option B: Without environment variable
{
"mcpServers": {
"nano-banana": {
"command": "npx",
"args": ["nano-banana-mcp"]
}
}
}Generate an image of a sunset over mountainsEdit this image to add some birds in the skyContinue editing to make it more dramaticAdd to your Cursor MCP configuration:
Option A: With environment variable (Recommended)
{
"nano-banana": {
"command": "npx",
"args": ["nano-banana-mcp"],
"env": {
"GEMINI_API_KEY": "your-gemini-api-key-here"
}
}
}Option B: Without environment variable
{
"nano-banana": {
"command": "npx",
"args": ["nano-banana-mcp"]
}
}If you're using a different MCP client, you can configure nano-banana-mcp using any of these methods:
Method A: Environment Variable in MCP Config (Recommended)
{
"nano-banana": {
"command": "npx",
"args": ["nano-banana-mcp"],
"env": {
"GEMINI_API_KEY": "your-gemini-api-key-here"
}
}
}Method B: System Environment Variable
export GEMINI_API_KEY="your-gemini-api-key-here"
npx nano-banana-mcpMethod C: Using the Configure Tool
npx nano-banana-mcp
# The server will prompt you to configure when first used
# This creates a local .nano-banana-config.json filegenerate_imageCreate a new image from a text prompt.
generate_image({
prompt: "A futuristic city at night with neon lights"
})edit_imageEdit a specific image file.
edit_image({
imagePath: "/path/to/image.png",
prompt: "Add a rainbow in the sky",
referenceImages?: ["/path/to/reference.jpg"] // optional
})continue_editingContinue editing the last generated/edited image.
continue_editing({
prompt: "Make it more colorful",
referenceImages?: ["/path/to/style.jpg"] // optional
})get_last_image_infoGet information about the last generated image.
get_last_image_info()configure_gemini_tokenConfigure your Gemini API key.
configure_gemini_token({
apiKey: "your-gemini-api-key"
})get_configuration_statusCheck if the API key is configured.
get_configuration_status()The MCP server loads your API key in the following priority order:
claude_desktop_config.json or MCP client config"env": { "GEMINI_API_KEY": "your-key" }export GEMINI_API_KEY="your-key"configure_gemini_token tool.nano-banana-config.json in current directory💡 Recommendation: Use Method 1 (MCP config env variables) for the best security and convenience.
Images are automatically saved to platform-appropriate locations:
%USERPROFILE%\\Documents\\nano-banana-images\\./generated_imgs/ (in current directory)~/nano-banana-images/ (when run from system paths)File naming convention:
generated-[timestamp]-[id].pngedited-[timestamp]-[id].pnggenerate_image - Create your base imagecontinue_editing - Refine and improvecontinue_editing - Add final touchesgenerate_image - Create base contentedit_image - Use reference images for stylecontinue_editing - Fine-tune the resultgenerate_image - Start with a conceptget_last_image_info - Check current statecontinue_editing - Make adjustmentsThis project was created with Claude Code and follows these technologies:
# 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 testThis project was generated by Claude Code, but contributions are welcome! Please feel free to:
MIT License - see LICENSE file for details.
✨ Generated with love by Claude Code - The future of AI-powered development is here!
ConechoAI/Nano-Banana-MCP
September 4, 2025
June 14, 2026
JavaScript