Nano Banana MCP Server
Image generation and editing with Google's Gemini image models, saved to local files
Generate and edit images with Google's Gemini 2.5 Flash Image model from any MCP client
By ConEchoAI TypeScript Local · stdio AI and MLMedia
28 popularity score ★ 235 ↓ 1.4k/wk
Opens the app, which asks before it adds the server. Then replace each <NAME> in its settings with your value.
It needs GEMINI_API_KEY. Replace each <NAME> with your value.
claude mcp add nano-banana -e GEMINI_API_KEY=<GEMINI_API_KEY> -- npx -y nano-banana-mcp{
"mcpServers": {
"nano-banana": {
"command": "npx",
"args": [
"-y",
"nano-banana-mcp"
],
"env": {
"GEMINI_API_KEY": "<GEMINI_API_KEY>"
}
}
}
}{
"mcpServers": {
"nano-banana": {
"command": "npx",
"args": [
"-y",
"nano-banana-mcp"
],
"env": {
"GEMINI_API_KEY": "<GEMINI_API_KEY>"
}
}
}
}{
"servers": {
"nano-banana": {
"type": "stdio",
"command": "npx",
"args": [
"-y",
"nano-banana-mcp"
],
"env": {
"GEMINI_API_KEY": "<GEMINI_API_KEY>"
}
}
}
}[mcp_servers.nano-banana]
command = "npx"
args = ["-y", "nano-banana-mcp"]
[mcp_servers.nano-banana.env]
GEMINI_API_KEY = "<GEMINI_API_KEY>"gemini mcp add --scope user -e GEMINI_API_KEY=<GEMINI_API_KEY> nano-banana npx -- -y nano-banana-mcpGEMINI_API_KEY |
Required: Gemini API key from Google AI Studio. Can instead be set later with the configure_gemini_token tool, which writes .nano-banana-config.json in the working directory. |
|---|
Nano-Banana MCP Server is a small local stdio server that passes text prompts, and optionally local image files, to Google's Gemini image model and saves what comes back as PNG files on your disk. It has six tools: one creates a new image from a prompt, one edits a named image file, one keeps editing whatever image was produced last in the session, and three handle setup and status (store an API key, check whether a key is set, describe the last image).
Editing can take extra reference images, for instance to borrow a style or add an element from another picture. Each result is returned to the client as an inline image and written to a folder: on Windows that is Documents\nano-banana-images in your home folder; elsewhere it is generated_imgs under the directory the server was started in, or ~/nano-banana-images when that directory is under /usr, /opt or /var.
The code in version 1.0.3 calls the model id gemini-2.5-flash-image-preview, hard-coded in src/index.ts for both generating and editing; there is no setting to pick another model, size or aspect ratio. The README states that the whole project was generated with Claude Code.
| Runtime | Node.js 18+ |
|---|
Node.js 18 or newer (the launch command uses npx). A Gemini API key from Google AI Studio, supplied as GEMINI_API_KEY or through the configure_gemini_token tool. Image generation calls are billed or rate-limited according to your Google AI Studio plan.
The model is fixed in the code to gemini-2.5-flash-image-preview (src/index.ts, v1.0.3); if Google withdraws that preview id, the image tools stop working until the package is updated. No options for image size, aspect ratio, count or seed: each call sends only the prompt and images. Input files are typed by extension (.png, .webp, .jpg/.jpeg; anything else is sent as JPEG), and every saved result is named .png. continue_editing only knows the last image of the current server process. Without a key, every image tool returns an error asking you to run configure_gemini_token first.
Suits a developer who already has a Gemini API key and wants quick image generation and prompt-based edits from Claude Code, Cursor or another MCP client, with the results kept as files on the local machine. It is a community project, not a Google release, and it exposes no model, size or aspect-ratio choices, so anyone who needs those controls or a newer Gemini image model should pick a server that exposes them.
generate_imageedit_imagecontinue_editingget_last_image_infoconfigure_gemini_tokenget_configuration_status