Skip to content
Back to search

nano-banana-2-plugins

MarketplaceWorks with Claude CodeGitHub

MCP server for Google Gemini image generation, upgraded for Nano Banana 2 (gemini-3.1-flash-image-preview).

Safety scan

A static text scan, not a guarantee. Select the badge to see what was scanned and every finding.

Checked today
Badge for your README
findsafeskills safety rating

Markdown

[![findsafeskills safety rating](/api/listings/daveremy--nano-banana-2-mcp/badge.svg)](/listings/daveremy--nano-banana-2-mcp)

HTML

<a href="/listings/daveremy--nano-banana-2-mcp"><img src="/api/listings/daveremy--nano-banana-2-mcp/badge.svg" alt="findsafeskills safety rating" /></a>

Install

Install instructions from the README

As written by the repo's author. findsafeskills has not verified these steps.

1. Get a Gemini API key

Get one from [Google AI Studio](https://aistudio.google.com/apikey).

2. Install

**Via Claude Code plugin (recommended):**

claude plugin add nano-banana-2-mcp

**Or manually via npx** — add to your Claude Code MCP settings:

{
  "mcpServers": {
    "nano-banana-2": {
      "command": "npx",
      "args": ["-y", "nano-banana-2-mcp"],
      "env": {
        "GEMINI_API_KEY": "your-api-key-here"
      }
    }
  }
}

**Or from source** for development:

git clone https://github.com/daveremy/nano-banana-2-mcp.git
cd nano-banana-2-mcp
npm install
npm run build

Then point your MCP config at `dist/index.js`:

{
  "mcpServers": {
    "nano-banana-2": {
      "command": "node",
      "args": ["/path/to/nano-banana-2-mcp/dist/index.js"],
      "env": {
        "GEMINI_API_KEY": "your-api-key-here"
      }
    }
  }
}

3. Restart Claude Code

The tools will be available after restart.

What was scanned

The files the safety scan read, as written by the repository's author and shown as plain text. Lines with a finding are marked.

.claude-plugin/marketplace.json · Manifest · 10 lines
  1. {
  2. "name": "nano-banana-2-plugins",
  3. "owner": { "name": "daveremy" },
  4. "plugins": [{
  5. "name": "nano-banana-2",
  6. "source": { "source": "npm", "package": "nano-banana-2-mcp" },
  7. "description": "Image generation with Google Gemini Nano Banana 2 via MCP",
  8. "version": "0.1.1"
  9. }]
  10. }
README.md · README · 145 lines
  1. # nano-banana-2-mcp
  2. MCP server for Google Gemini image generation, upgraded for **Nano Banana 2** (`gemini-3.1-flash-image-preview`).
  3. A fork/rewrite of [ConechoAI/Nano-Banana-MCP](https://github.com/ConechoAI/Nano-Banana-MCP) with:
  4. - **Nano Banana 2 model** — better text rendering, thinking modes, resolution control
  5. - **Resolution control** — 1K, 2K, 4K
  6. - **Aspect ratio** — any ratio the API supports (1:1, 16:9, 9:16, 4:3, etc.)
  7. - **Thinking modes** — minimal or high
  8. - **Multiple images** — generate 1–4 variations per call
  9. - **File-path-only mode** — no inline base64, fixes context window overflow in Claude Code
  10. - **Security hardening** — path validation, file size caps, no plaintext API key storage
  11. ## Setup
  12. ### 1. Get a Gemini API key
  13. Get one from [Google AI Studio](https://aistudio.google.com/apikey).
  14. ### 2. Install
  15. **Via Claude Code plugin (recommended):**
  16. ```bash
  17. claude plugin add nano-banana-2-mcp
  18. ```
  19. **Or manually via npx** — add to your Claude Code MCP settings:
  20. ```json
  21. {
  22. "mcpServers": {
  23. "nano-banana-2": {
  24. "command": "npx",
  25. "args": ["-y", "nano-banana-2-mcp"],
  26. "env": {
  27. "GEMINI_API_KEY": "your-api-key-here"
  28. }
  29. }
  30. }
  31. }
  32. ```
  33. **Or from source** for development:
  34. ```bash
  35. git clone https://github.com/daveremy/nano-banana-2-mcp.git
  36. cd nano-banana-2-mcp
  37. npm install
  38. npm run build
  39. ```
  40. Then point your MCP config at `dist/index.js`:
  41. ```json
  42. {
  43. "mcpServers": {
  44. "nano-banana-2": {
  45. "command": "node",
  46. "args": ["/path/to/nano-banana-2-mcp/dist/index.js"],
  47. "env": {
  48. "GEMINI_API_KEY": "your-api-key-here"
  49. }
  50. }
  51. }
  52. }
  53. ```
  54. ### 3. Restart Claude Code
  55. The tools will be available after restart.
  56. ## Tools
  57. ### `generate_image`
  58. Generate a new image from a text prompt.
  59. | Parameter | Type | Default | Description |
  60. |-----------|------|---------|-------------|
  61. | `prompt` | string | (required) | Text prompt for the image |
  62. | `aspectRatio` | string | `"1:1"` | Aspect ratio (e.g. "16:9", "9:16") |
  63. | `resolution` | string | `"1K"` | `1K`, `2K`, or `4K` |
  64. | `thinking` | string | `"minimal"` | `minimal` or `high` |
  65. | `numberOfImages` | number | `1` | 1–4 |
  66. | `returnInlineImage` | boolean | `true` | If false, return only file path |
  67. ### `edit_image`
  68. Edit an existing image file.
  69. Same parameters as `generate_image`, plus:
  70. | Parameter | Type | Description |
  71. |-----------|------|-------------|
  72. | `imagePath` | string | (required) Path to the image to edit |
  73. | `referenceImages` | string[] | Optional additional reference images |
  74. ### `continue_editing`
  75. Continue editing the last generated/edited image. Same parameters as `edit_image` minus `imagePath` (uses the last image automatically).
  76. ### `get_configuration_status`
  77. Check API key, active model, and settings.
  78. ### `get_last_image_info`
  79. Get path and size of the last generated image.
  80. ## Environment Variables
  81. | Variable | Default | Description |
  82. |----------|---------|-------------|
  83. | `GEMINI_API_KEY` | (required) | Google Gemini API key |
  84. | `NANO_BANANA_MODEL` | `gemini-3.1-flash-image-preview` | Model ID override |
  85. | `NANO_BANANA_OUTPUT_DIR` | `./generated_imgs` | Image save directory |
  86. | `NANO_BANANA_INLINE_IMAGE` | `true` | Default for `returnInlineImage` |
  87. ## Capability Gating
  88. The server auto-detects model capabilities:
  89. - **Image models** (`*-image`, `*-image-preview`): get `imageConfig` (resolution, aspect ratio)
  90. - **Gemini 3.x image models**: also get `thinkingConfig`
  91. - **Other models**: basic config only
  92. This means you can use `NANO_BANANA_MODEL=gemini-2.5-flash-image` and it will send `imageConfig` but skip `thinkingConfig`.
  93. ## Claude Code Plugin
  94. This repo includes a Claude Code plugin with a `generate-image` skill that provides best-practice prompting guidance. Install via `claude plugin add nano-banana-2-mcp` or add the repo path to your Claude Code plugins config.
  95. ## Contributing
  96. See [CONTRIBUTING.md](CONTRIBUTING.md) for development setup, testing, and release process.
  97. ## Attribution
  98. Based on [ConechoAI/Nano-Banana-MCP](https://github.com/ConechoAI/Nano-Banana-MCP) (MIT License).
  99. ## License
  100. MIT

Ratings and comments

Sign in to rate this skill.

Sign in

Free to use. If it’s helped, pass it on.