About Nanobanana MCP Server
Nanobanana MCP Server is an MCP server published by zhongweili in the Developer Tools category: aI image generation MCP server powered by Google Gemini, with smart model selection and 4K output. Conduid read 4 tools from its source: generate_image, maintenance, show_output_stats and upload_file. No package is published for it, so it installs from a source checkout.
The repository has 408 stars and 114 forks, is licensed MIT, and its last commit was on 20 Nov 2026. The latest release is v0.4.7 (20 Nov 2026): Fixes fresh uvx installs on google-genai 3.x and Intel Macs, adds environment variable overrides for model IDs, and fixes package metadata URLs. It follows v0.4.6 (27 Sep 2026), and the 5 most recent releases go back to v0.4.0 (27 Feb 2026). It passes 5 of the 6 static checks Conduid ran on the repository; it does not pass Scoped permissions. Its topics include cursor-editor, nano-banana and nanobanana.
Install
git clone https://github.com/zhongweili/nanobanana-mcp-serverTools (4)
generate_image| Parameter | Type | Description |
|---|---|---|
| aspect_ratio | string | Optional output aspect ratio (e.g., '16:9'). Standard: 1:1, 2:3, 3:2, 3:4, 4:3, 4:5, 5:4, 9:16, 16:9, 21:9. Extreme (nb2 only): 4:1, 1:4, 8:1, 1:8. |
| enable_grounding | boolean | Enable Google Search grounding for factual accuracy (NB2 and Pro models). Useful for real-world subjects. Default: true. |
| file_id | string | Files API file ID to use as input/edit source (e.g., 'files/abc123'). If provided, this takes precedence over input_image_path_* parameters for the primary input. |
| input_image_path_1 | string | Path to the first input image (png, jpg, jpeg, webp, or gif). |
| input_image_path_2 | string | Path to the second input image (png, jpg, jpeg, webp, or gif). |
| input_image_path_3 | string | Path to the third input image (png, jpg, jpeg, webp, or gif). |
| mode | string | Operation mode: 'generate' for new image creation, 'edit' for modifying existing images. Auto-detected based on input parameters if not specified. |
| model_tier | string | Model tier: 'flash' (legacy, 1024px), 'nb2' (4K at Flash speed, default), 'pro' (max quality, 4K), or 'auto' (smart selection). Default: 'auto' - automatically selects nb2 or pro based on prompt. |
| n | integer | Requested image count (model may return fewer). |
| negative_prompt | string | Things to avoid (style, objects, text). |
| output_path | string | Output path for generated image(s). If a file path with extension (e.g., '/path/image.png'), saves directly to that path. If a directory path (e.g., '/path/to/dir/'), uses default filename in that directory. If None, uses IMAGE_OUTPUT_DIR environment variable or ~/nanobanana-images. |
| prompt * | string | Clear, detailed image prompt. Include subject, composition, action, location, style, and any text to render. Use the aspect_ratio parameter to pin a specific canvas shape when needed. |
| resolution | string | Output resolution: 'high', '4k', '2k', '1k'. 4K and 2K available with 'nb2' and 'pro' models. Default: 'high'. |
| return_full_image | boolean | Return full-resolution images in MCP response instead of thumbnails. Warning: full images can be large (3-7MB each for 4K). Default: uses RETURN_FULL_IMAGE env var, or false if not set. |
| system_instruction | string | Optional system tone/style guidance. |
| thinking_level | string | Reasoning depth hint: 'low' (faster), 'high' (better quality). Applied to the 'nb2' model; 'high' also biases auto-selection toward Pro. Default: None (auto). |
maintenancePerform maintenance operations following workflows.md patterns.| Parameter | Type | Description |
|---|---|---|
| dry_run | boolean | If true, only report what would be done without making changes |
| keep_count | integer | For local cleanup: minimum number of recent files to keep |
| max_age_hours | integer | For local cleanup: maximum age in hours (default: 168 = 1 week) |
| operation * | string | Maintenance operation to perform: 'cleanup_expired', 'cleanup_local', 'check_quota', 'database_hygiene', 'full_cleanup' |
show_output_statsShow statistics about the output directory and recently generated images.upload_fileUpload a local file through the Gemini Files API and return its URI & metadata.| Parameter | Type | Description |
|---|---|---|
| display_name | string | Optional display name for the uploaded file. |
| path * | string | Server-accessible file path to upload to Gemini Files API. |
Security checks
Static checks derived from the repository yesterday. Heuristics on the source, not an audit.
- ✓README presentThe repository's README runs to about 1.9K words.
- ✓License declaredThe repository declares the MIT license.
- ✓Tests presentA test suite exists in the repository.
- ✓Dependencies pinnedDependency versions are pinned by uv.lock.
- ✓No dynamic code executionScanned 42 source files and found no eval, dynamic Function or shell execution.
- !Scoped permissionsDoesn't declare a permission scope. Assume it can do anything its process can.
What the source scan found
- Transport
- stdio and Streamable HTTPnanobanana_mcp_server/core/server.py:74, nanobanana_mcp_server/core/server.py:72
- Starts other programs
- No calls that start other programs
- Outbound network calls
- No outbound network calls
- Writes or deletes files
- 25 callsnanobanana_mcp_server/services/enhanced_image_service.py:67, nanobanana_mcp_server/services/enhanced_image_service.py:370, nanobanana_mcp_server/services/enhanced_image_service.py:375
- Lockfile
- uv.lock
Pattern matches on the source text of 42 files: places to read, not proof of what the code does at run time.
Releases
README
The repository's README runs to about 1.9K words, fetched yesterday. The original in the repository is authoritative.
Read full README