Skip to content

Changelog ​

[3.2.1] - 2026-10-11 ​

Added ​

  • Listed on the official MCP Registry as io.github.fjacquet/nano-banana-mcp. package.json carries mcpName, server.json describes the npm package, and every release tag now publishes to the registry after the npm publish succeeds.

Fixed ​

  • The aspectRatio input no longer claims a "1:1" default. When omitted the model chooses: new images usually come out landscape (about 16:9) and edits keep the source image's shape. Pass "1:1" for a square image.

[3.2.0] - 2026-10-11 ​

Added ​

  • thinkingLevel option ("minimal" | "medium" | "high") on generate_image, edit_image and continue_editing: how much the model reasons before drawing. "high" helps complex prompts (infographics, text in images, several consistent characters); "minimal" is fastest and cheapest. Omit it to keep the model's default ("medium" on Nano Banana 2.1). gemini-3.1-flash-image and Lite accept only "minimal" / "high", and gemini-2.5-flash-image has no thinking levels; Google's API returns a clear error for unsupported combinations.

Fixed ​

  • generate_image silently ignored useGoogleSearch: its handler forwarded only some inputs, so Google Search grounding never reached the API and the "grounding requires gemini-3-pro-image" check never ran. All inputs are now forwarded.

[3.1.1] - 2026-10-11 ​

Fixed ​

  • Saved images now use the extension matching the MIME type Gemini returns. Nano Banana 2.1 and 2 Lite return JPEG, which 3.1.0 saved under a .png name; continue_editing / edit_image then sent those files back labelled image/png. Files are now .jpg (or .webp / .png) as appropriate.
  • serverInfo.version in the MCP initialize reply is read from package.json. It had been hard-coded to 3.0.0 through 3.1.0.
  • The unit test for config persistence no longer writes to and deletes the real ~/.nano-banana-config.json, which wiped an API key saved with configure_gemini_token whenever npm test ran.

[3.1.0] - 2026-10-10 ​

Added ​

  • gemini-nano-banana-2.1 (Nano Banana 2.1, GA 2026-10-06).
  • gemini-3.1-flash-lite-image (Nano Banana 2 Lite): fastest and cheapest, 1K output only, no Google Search grounding. Google's suggested successor to gemini-2.5-flash-image, which shuts down 2027-03-15.

Changed ​

  • Default model is now gemini-nano-banana-2.1 (was gemini-3.1-flash-image, which Google now lists as superseded by 2.1). Calls that omit model get 2.1; pass model: "gemini-3.1-flash-image" to keep the previous behaviour. Google Search grounding remains restricted to gemini-3-pro-image.
  • README, docs and CLAUDE.md updated to the current model list and architecture.

[3.0.5] - 2026-10-10 ​

Security ​

  • Bumped @modelcontextprotocol/sdk 1.30.0 → 1.32.1 and raised its declared range floor ^1.29.0 → ^1.32.1. SDK versions below 1.31.0 are affected by GHSA-6qxp-vccf-f47h (high, OAuth client could send credentials to an authorization server chosen by the MCP server). This server only uses the stdio Server side, so the path was not reachable here, but the old floor let consumers resolve an affected version.
  • Refreshed the lockfile to clear the remaining npm audit findings. Runtime tree (transitive via the MCP SDK): proxy-addr 2.0.8 (critical, GHSA-jqcg-44mw-7w3h), brace-expansion 5.0.12 (high), ip-address 10.7.3 (moderate) and fast-uri 3.1.8 (moderate). Dev-only tree: handlebars 4.7.10 (critical), source-map-js 1.2.2 (high) and vue / @vue/server-renderer 3.5.43 (high, via vitepress).

Changed ​

  • Updated @google/genai 2.22.0 → 2.28.0 (in range, lockfile only).
  • Refreshed in-range tooling: @biomejs/biome, jest, @jest/globals, ts-jest, tsx, @types/node.

[3.0.4] - 2026-09-14 ​

Security ​

  • Bumped hono 4.13.1 → 4.13.7 and js-yaml 4.3.1 → 4.3.2 (dev-only, transitive via ts-jest), clearing four OSV findings that were failing the osv-scan job on main: GHSA-crvj-82cr-hjcx, GHSA-g6gw-c38x-mqfc, GHSA-gqvv-2mrq-wpjv and GHSA-2883-xcg3-v3hh.

Changed ​

  • Updated @google/genai 2.8.0 → 2.22.0. No API surface change — the server uses new GoogleGenAI({ apiKey }) and the models call, both unchanged.
  • Refreshed in-range tooling: @biomejs/biome, jest, @jest/globals, ts-jest, tsx, zod, @modelcontextprotocol/sdk, @types/node.

Fixed ​

  • test-integration.ts no longer asserts a project layout that was removed: it checked for .eslintrc.json (replaced by Biome) and required dotenv as a dependency, which had been deliberately dropped because it pollutes stdout and breaks the MCP JSON-RPC stream. dotenv is now asserted as a forbidden dependency so that regression cannot return.

Removed ​

  • Tool-generated agent configuration that had been fanned out across five IDEs: .cursorrules, .windsurfrules, GEMINI.md, AGENTS.md, .cursor/, .kiro/ and .opencode.json. All were byte-for-byte duplicates. The 140-line RTK block duplicated into CLAUDE.md was dropped as well; .claude/ and .mcp.json are now tracked instead.

[3.0.0] - 2026-06-07 ​

Changed (BREAKING) ​

  • Model IDs migrated from preview to GA. Google retires the preview identifiers (gemini-3-pro-image-preview is shut down 2026-06-25), so the preview suffixes are dropped:

    • default gemini-3.1-flash-image-preview → gemini-3.1-flash-image (Nano Banana 2)
    • gemini-3-pro-image-preview → gemini-3-pro-image (Nano Banana Pro; also the Google Search grounding model)
    • gemini-2.5-flash-image unchanged (legacy)

    Callers that explicitly pass the old preview IDs must update.

  • Bumped @google/genai 1.51 → 2.8 (major). The API surface in use (GoogleGenAI, models.generateContent) is type-compatible; run a live generation before deploying.

  • Upgraded TypeScript 5.9 → 6.0 and switched tsconfig.json to NodeNext module resolution (TS 6 removed the deprecated node10 resolver).

Security ​

  • Patched all outstanding advisories — npm audit now reports 0 vulnerabilities (was 8: high fast-uri path traversal plus 7 moderate in transitive deps).

Tooling ​

  • Replaced ESLint (eslint, @eslint/js, typescript-eslint, eslint.config.mjs) with Biome (biome.json). npm run lint → biome lint src/; added npm run format.
  • Applied Biome quality fixes: node: import protocol and import type for type-only imports.
  • Bumped dev deps: jest 30.3 → 30.4, ts-jest 29.4.9 → 29.4.11, tsx 4.21 → 4.22, @types/node 25.6 → 25.9, zod 4.4.1 → 4.4.3.

[2.3.1] - 2026-05-01 ​

Fixed ​

  • Published bin (dist/index.js) is now marked executable in the tarball. In 2.3.0 it shipped as 0644, causing npx @fjacquet/nano-banana-mcp to fail with sh: nano-banana-mcp: command not found. The build script now runs chmod +x dist/index.js after tsc.

[2.3.0] - 2026-05-01 ​

Security ​

  • Image path sandbox: validateImagePath now canonicalizes via fs.realpath (defeating symlink-based escapes) and rejects paths outside the user's home directory, OS tmpdir, or current working directory. System roots (/etc, /usr, /var, /proc, /sys, /dev, /root, /boot) are excluded. Closes the prior data-exfiltration path where an LLM-supplied image path pointing at e.g. /etc/passwd would be base64-uploaded to the Gemini API.

Added ​

  • useGoogleSearch boolean parameter on generate_image, edit_image, and continue_editing — enables Google Search grounding for fact-aware image generation. Requires model gemini-3-pro-image-preview (Flash variants don't support grounding); throws InvalidParams on other models.

Changed ​

  • Migrated from the low-level Server + setRequestHandler(*Schema, …) MCP SDK API to the high-level McpServer + registerTool API. Tool schemas are now declared once via Zod (single source of truth), replacing the hand-written JSON Schema and parallel TypeScript cast types. Tool handlers receive parsed, type-safe arguments directly. Net −116 LoC.
  • Bumped runtime deps: @google/genai 1.39 → 1.51, @modelcontextprotocol/sdk 1.25 → 1.29, zod 4.3 → 4.4. Patched 8 transitive vulnerabilities (1 critical in protobufjs, plus minimatch/picomatch/hono ReDoS and traversal issues) via in-semver fixes.

[2.2.2] - 2026-03-10 ​

Fixed ​

  • Fix mkdir '/' error when server is invoked via npx with cwd = /. getImagesDirectory() now also catches / and /tmp/ as unsafe working directories, falling back to ~/nano-banana-images/ instead.

[2.2.1] - 2026-03-10 ​

Fixed ​

  • Remove dotenv dependency to prevent stdout pollution breaking MCP JSON-RPC transport. dotenv v17 prints a banner to stdout; since MCP servers communicate via stdio JSON-RPC, this caused Unexpected token 'd', "[dotenv@17."... is not valid JSON errors in clients. Auth is handled via GEMINI_API_KEY env var or ~/.nano-banana-config.json — no .env needed.

[2.2.0] - 2026-02-28 ​

Changed ​

  • Default model upgraded to gemini-3.1-flash-image-preview (Nano Banana 2 — pro quality at Flash speed)
  • gemini-2.5-flash-image retained as a legacy option
  • Model descriptions updated across all tools

Added ​

  • aspectRatio parameter on generate_image, edit_image, continue_editing
    • Supported values: 1:1, 1:4, 1:8, 2:3, 3:2, 3:4, 4:1, 4:3, 4:5, 5:4, 8:1, 9:16, 16:9, 21:9
  • imageSize parameter on generate_image, edit_image, continue_editing
    • Supported values: 512px, 1K (default), 2K, 4K
  • Both parameters passed to the API via config.imageConfig

[2.1.0] - 2025-01-31 ​

Changed ​

  • Upgraded all dependencies to latest versions (0 vulnerabilities)
    • eslint 8 → 9 with flat config (eslint.config.mjs replaces .eslintrc.json)
    • typescript-eslint 6 → 8 (unified typescript-eslint package)
    • zod 3 → 4 (.errors → .issues)
    • dotenv 16 → 17
    • @types/node 20 → 25
  • Added Jest + ts-jest as explicit devDependencies (were missing)

[2.0.0] - 2025-01-31 ​

Fixed ​

  • Model name: gemini-2.5-flash-image-preview replaced with gemini-2.5-flash-image (fixes 404 error)
  • Config file now saved to home directory (~/.nano-banana-config.json) instead of process.cwd() with 0o600 permissions
  • Path traversal protection: image file inputs validated for extension and size
  • File size validation (20MB limit) before reading images into memory
  • Silent reference image failures now reported as warnings in response
  • Tests aligned with actual @google/genai package (was mocking wrong package @google/generative-ai)

Added ​

  • Model selection: optional model parameter on generate_image, edit_image, continue_editing
    • gemini-2.5-flash-image (default, fast)
    • gemini-3-pro-image-preview (pro, higher quality with reasoning)
  • GIF support (.gif) in allowed image extensions
  • docs/ folder with configuration, tools reference, and workflow guides
  • This changelog

Changed ​

  • Simplified README — detailed docs moved to docs/
  • Updated repository URLs to fjacquet fork
  • Removed any types in favor of proper interfaces (ImagePart, TextPart, ContentPart, SavedImage)
  • DRY: extracted shared response-building logic into buildImageResponse() and saveImage()
  • Removed claude-config.json (contained hardcoded local path)
  • Version bumped to 2.0.0

[1.0.3] - Previous (ConechoAI) ​

  • Original release with gemini-2.5-flash-image-preview model (now deprecated by Google)

Released under the MIT License.