playwright
MCPDrives a real browser so the agent can open pages, click, fill forms and read what actually rendered.
Generates and edits images from text prompts using Google's advanced image generation model.
Claude Code
> /plugin marketplace add naveedharri/benai-skills
Codex
$ codex mcp add nano-banana -- npx -y @zhibinyang/nano-banana-mcp
Cursor
{ "mcpServers": { "nano-banana": { "command": "npx", "args": [ "-y", "@zhibinyang/nano-banana-mcp" ] } } }
Add it to mcp.json.
Gemini CLI
{ "mcpServers": { "nano-banana": { "command": "npx", "args": [ "-y", "@zhibinyang/nano-banana-mcp" ] } } }
Add it to settings.json.
GitHub Copilot
$ copilot mcp add nano-banana -- npx -y @zhibinyang/nano-banana-mcp
OpenCode
{ "mcp": { "nano-banana": { "type": "local", "command": [ "npx", "-y", "@zhibinyang/nano-banana-mcp" ] } } }
Add it to opencode.json.
Windsurf
{ "mcpServers": { "nano-banana": { "command": "npx", "args": [ "-y", "@zhibinyang/nano-banana-mcp" ] } } }
Add it to mcp_config.json.
From the README
๐จ 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
๐ Aspect Ratio Control
Support for 10 different aspect ratios (1:1, 4:3, 16:9, etc.)
๐ Resolution Control
Up to 4K resolution with Gemini 3 Pro Image
๐ค Model Selection
Choose between fast (Flash) or high-quality (Pro) models
๐ Cross-Platform
Smart file paths for Windows, macOS, and Linux
Security report
Low risk
Known flaws
None known
Signed build
No
No build provenance published
Maintained
Oct 9, 2026
Last push
Licence
MIT
Runs as
npx
On your machine
Deprecated
No
Signals from public registries, not an audit. Checked Nov 14, 2026.
๐ค 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 Image APIs. Supports both Gemini 2.5 Flash Image (fast) and Gemini 3 Pro Image (high-resolution up to 4K). Generate stunning images, edit existing ones, and iterate on your creations with simple text prompts.
Get your Gemini API key:
Configure the MCP server: See configuration examples for your specific client below (Claude Code, Cursor, or other MCP clients).
Add this to your Claude Code MCP settings:
Option A: With environment variable (Recommended - Most Secure)
{
"mcpServers": {
"nano-banana": {
"command": "npx",
"args": ["@zhibinyang/nano-banana-mcp"],
"env": {
"GEMINI_API_KEY": "your-gemini-api-key-here",
"GEMINI_IMAGE_MODEL": "gemini-2.5-flash-image"
}
}
}
}
Option B: Without environment variable
{
"mcpServers": {
"nano-banana": {
"command": "npx",
"args": ["@zhibinyang/nano-banana-mcp"]
}
}
}
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
Add to your Cursor MCP configuration:
Option A: With environment variable (Recommended)
{
"nano-banana": {
"command": "npx",
"args": ["@zhibinyang/nano-banana-mcp"],
"env": {
"GEMINI_API_KEY": "your-gemini-api-key-here",
"GEMINI_IMAGE_MODEL": "gemini-2.5-flash-image"
}
}
}
Option B: Without environment variable
{
"nano-banana": {
"command": "npx",
"args": ["@zhibinyang/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": ["@zhibinyang/nano-banana-mcp"],
"env": {
"GEMINI_API_KEY": "your-gemini-api-key-here",
"GEMINI_IMAGE_MODEL": "gemini-2.5-flash-image"
}
}
}
Method B: System Environment Variable
export GEMINI_API_KEY="your-gemini-api-key-here"
npx @zhibinyang/nano-banana-mcp
Method C: Using the Configure Tool
npx @zhibinyang/nano-banana-mcp
# The server will prompt you to configure when first used
# This creates a local .nano-banana-config.json file
generate_imageCreate a new image from a text prompt.
generate_image({
prompt: "A futuristic city at night with neon lights",
aspectRatio?: "1:1" | "2:3" | "3:2" | "3:4" | "4:3" | "4:5" | "5:4" | "9:16" | "16:9" | "21:9", // default: 4:3
imageSize?: "1K" | "2K" | "4K" // default: 1K, only works with gemini-3-pro
})
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
aspectRatio?: "4:3",
imageSize?: "1K"
})
continue_editingContinue editing the last generated/edited image.
continue_editing({
prompt: "Make it more colorful",
referenceImages?: ["/path/to/style.jpg"], // optional
aspectRatio?: "4:3",
imageSize?: "1K"
})
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:
๐ฅ MCP Configuration Environment Variables (Highest Priority)
claude_desktop_config.json or MCP client config"env": { "GEMINI_API_KEY": "your-key", "GEMINI_IMAGE_MODEL": "gemini-2.5-flash-image" }๐ฅ System Environment Variables
export GEMINI_API_KEY="your-key"๐ฅ Local Configuration File (Lowest Priority)
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.
| Variable | Description | Default |
|---|---|---|
GEMINI_API_KEY | Your Gemini API key (required) | - |
GEMINI_IMAGE_MODEL | Default image generation model | gemini-2.5-flash-image |
NANO_BANANA_OUTPUT_DIR | Custom directory for saving generated images | Platform-specific (see below) |
Available Models:
gemini-2.5-flash-image - Fast, optimized for speed (1024px output)gemini-3-pro-image-preview - High quality, supports up to 4K resolutionImages are automatically saved to platform-appropriate locations:
NANO_BANANA_OUTPUT_DIR environment variable to override default paths%USERPROFILE%\Documents\nano-banana-images\./generated_imgs/ (in current directory)~/nano-banana-images/ (when run from /, system paths, or temp directories)๐ก Tip for MCP clients: When running via npx in sandboxed environments (like Antigravity), the working directory may be / which is not writable. In such cases, either:
NANO_BANANA_OUTPUT_DIR to specify a custom output path, or~/nano-banana-images/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 test
This 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!
Drives a real browser so the agent can open pages, click, fill forms and read what actually rendered.
Ships with open-computer-use: open-computer-use is an open-source Computer Use service wrapped as MCP. Any AI agent or MCP clientโฆ