Changelog
[3.2.1] - 2026-10-11
Added
- Listed on the official MCP Registry as
io.github.fjacquet/nano-banana-mcp.package.jsoncarriesmcpName,server.jsondescribes the npm package, and every release tag now publishes to the registry after the npm publish succeeds.
Fixed
- The
aspectRatioinput 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
thinkingLeveloption ("minimal"|"medium"|"high") ongenerate_image,edit_imageandcontinue_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-imageand Lite accept only"minimal"/"high", andgemini-2.5-flash-imagehas no thinking levels; Google's API returns a clear error for unsupported combinations.
Fixed
generate_imagesilently ignoreduseGoogleSearch: its handler forwarded only some inputs, so Google Search grounding never reached the API and the "grounding requiresgemini-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
.pngname;continue_editing/edit_imagethen sent those files back labelledimage/png. Files are now.jpg(or.webp/.png) as appropriate. serverInfo.versionin the MCPinitializereply is read frompackage.json. It had been hard-coded to3.0.0through 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 withconfigure_gemini_tokenwhenevernpm testran.
[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 togemini-2.5-flash-image, which shuts down 2027-03-15.
Changed
- Default model is now
gemini-nano-banana-2.1(wasgemini-3.1-flash-image, which Google now lists as superseded by 2.1). Calls that omitmodelget 2.1; passmodel: "gemini-3.1-flash-image"to keep the previous behaviour. Google Search grounding remains restricted togemini-3-pro-image. - README, docs and
CLAUDE.mdupdated to the current model list and architecture.
[3.0.5] - 2026-10-10
Security
- Bumped
@modelcontextprotocol/sdk1.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 stdioServerside, 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 auditfindings. Runtime tree (transitive via the MCP SDK):proxy-addr2.0.8 (critical, GHSA-jqcg-44mw-7w3h),brace-expansion5.0.12 (high),ip-address10.7.3 (moderate) andfast-uri3.1.8 (moderate). Dev-only tree:handlebars4.7.10 (critical),source-map-js1.2.2 (high) andvue/@vue/server-renderer3.5.43 (high, via vitepress).
Changed
- Updated
@google/genai2.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
hono4.13.1 → 4.13.7 andjs-yaml4.3.1 → 4.3.2 (dev-only, transitive via ts-jest), clearing four OSV findings that were failing theosv-scanjob onmain: GHSA-crvj-82cr-hjcx, GHSA-g6gw-c38x-mqfc, GHSA-gqvv-2mrq-wpjv and GHSA-2883-xcg3-v3hh.
Changed
- Updated
@google/genai2.8.0 → 2.22.0. No API surface change — the server usesnew 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.tsno longer asserts a project layout that was removed: it checked for.eslintrc.json(replaced by Biome) and requireddotenvas a dependency, which had been deliberately dropped because it pollutes stdout and breaks the MCP JSON-RPC stream.dotenvis 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 intoCLAUDE.mdwas dropped as well;.claude/and.mcp.jsonare 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-previewis 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-imageunchanged (legacy)
Callers that explicitly pass the old preview IDs must update.
- default
Bumped
@google/genai1.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.jsonto NodeNext module resolution (TS 6 removed the deprecatednode10resolver).
Security
- Patched all outstanding advisories —
npm auditnow reports 0 vulnerabilities (was 8: highfast-uripath 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/; addednpm run format. - Applied Biome quality fixes:
node:import protocol andimport typefor type-only imports. - Bumped dev deps:
jest30.3 → 30.4,ts-jest29.4.9 → 29.4.11,tsx4.21 → 4.22,@types/node25.6 → 25.9,zod4.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 as0644, causingnpx @fjacquet/nano-banana-mcpto fail withsh: nano-banana-mcp: command not found. Thebuildscript now runschmod +x dist/index.jsaftertsc.
[2.3.0] - 2026-05-01
Security
- Image path sandbox:
validateImagePathnow canonicalizes viafs.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/passwdwould be base64-uploaded to the Gemini API.
Added
useGoogleSearchboolean parameter ongenerate_image,edit_image, andcontinue_editing— enables Google Search grounding for fact-aware image generation. Requires modelgemini-3-pro-image-preview(Flash variants don't support grounding); throwsInvalidParamson other models.
Changed
- Migrated from the low-level
Server+setRequestHandler(*Schema, …)MCP SDK API to the high-levelMcpServer+registerToolAPI. 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/genai1.39 → 1.51,@modelcontextprotocol/sdk1.25 → 1.29,zod4.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 vianpxwithcwd = /.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
dotenvdependency 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 causedUnexpected token 'd', "[dotenv@17."... is not valid JSONerrors in clients. Auth is handled viaGEMINI_API_KEYenv var or~/.nano-banana-config.json— no.envneeded.
[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-imageretained as a legacy option- Model descriptions updated across all tools
Added
aspectRatioparameter ongenerate_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
- Supported values:
imageSizeparameter ongenerate_image,edit_image,continue_editing- Supported values:
512px,1K(default),2K,4K
- Supported values:
- Both parameters passed to the API via
config.imageConfig
[2.1.0] - 2025-01-31
Changed
- Upgraded all dependencies to latest versions (0 vulnerabilities)
eslint8 → 9 with flat config (eslint.config.mjsreplaces.eslintrc.json)typescript-eslint6 → 8 (unifiedtypescript-eslintpackage)zod3 → 4 (.errors→.issues)dotenv16 → 17@types/node20 → 25
- Added Jest + ts-jest as explicit devDependencies (were missing)
[2.0.0] - 2025-01-31
Fixed
- Model name:
gemini-2.5-flash-image-previewreplaced withgemini-2.5-flash-image(fixes 404 error) - Config file now saved to home directory (
~/.nano-banana-config.json) instead ofprocess.cwd()with0o600permissions - 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/genaipackage (was mocking wrong package@google/generative-ai)
Added
- Model selection: optional
modelparameter ongenerate_image,edit_image,continue_editinggemini-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
anytypes in favor of proper interfaces (ImagePart,TextPart,ContentPart,SavedImage) - DRY: extracted shared response-building logic into
buildImageResponse()andsaveImage() - 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-previewmodel (now deprecated by Google)