Skip to content
MCP server

mcp-alphabanana MCP Server

MCP server for image generation using Google Gemini AI

mcp-alphabanana scores 46 (Fair), licensed MIT and written in TypeScript. It installs as a local process. It declares 21 tools. Filed under Design, Media. GitHub shows 10 stars. Package registries report about 226 downloads a week. Install configs are generated for 10 clients. Being listed in the registry is not the same as being vendor-official.

by tasopenMITTypeScript10 stars
Trust score
46Fair
Trust score 46 of 100, Fair

Fair trust

46 of 100 from six public signals. Nobody can buy a point.

  • OSI-style license: mit.
How we score trust
Scorecard

License, quality and maintenance

How grades work
Trust breakdown

Where the 46 comes from

0 + 15 + 7 + 10 + 4 + 10 = 46. Each factor is capped, so no single signal can carry a listing.

Registry0 / 30

Active in the official MCP registry, plus a known vendor namespace.

Registry: 0 of 30 points.
Maintenance15 / 20

How recently the repository saw a commit or release.

Maintenance: 15 of 20 points.
Popularity7 / 20

GitHub stars and weekly downloads, on a log scale.

Popularity: 7 of 20 points.
License10 / 10

A clear, OSI-style open-source license.

License: 10 of 10 points.
Security4 / 10

Not archived, a secure install path, a pinned version.

Security: 4 of 10 points.
Docs10 / 10

A real summary, a README with depth, listed tools.

Docs: 10 of 10 points.

Install

Pick your client, copy the config, paste it in.

Needs Cursor or VS Code installed on this device. The button opens the app and asks you to confirm before it adds the server.

~/Library/Application Support/Claude/claude_desktop_config.json
{  "mcpServers": {    "tasopen-mcp-alphabanana": {      "command": "npx",      "args": [        "-y",        "@tasopen/mcp-alphabanana@1.6.0"      ]    }  }}

Environment variables

This server does not declare environment variables.

Tools21Tool docs quality grade F

All capabilities

About

mcp-alphabanana

npm version License: MIT

English | 日本語

mcp-alphabanana is a Model Context Protocol (MCP) server for generating image assets with Google Gemini. It is built for MCP-compatible clients and agent workflows that need fast image generation, transparent outputs, reference-image guidance, and flexible delivery formats.

Keywords: MCP server, Model Context Protocol, Gemini AI, image generation, FastMCP

Key capabilities:

  • Nano Banana 2.1 image generation by default, plus Lite, Flash, and Pro tiers
  • Transparent PNG/WebP asset output for web and game pipelines
  • Multi-image style guidance with local reference image files
  • Flexible file, base64, or combined outputs for agent workflows

alphabanana demo

Quick Start

Run the MCP server with npx:

npx -y @tasopen/mcp-alphabanana

Or add it to your MCP configuration:

{
  "mcp": {
    "servers": {
      "mcp-alphabanana": {
        "command": "npx",
        "args": ["-y", "@tasopen/mcp-alphabanana"],
        "env": {
          "GEMINI_API_KEY": "${env:GEMINI_API_KEY}"
        }
      }
    }
  }
}

Set GEMINI_API_KEY before starting the server.

For Claude Desktop, Download mcp-alphabanana-latest.mcpb, then add it as Extension from Claude Desktop Settings. For Windows, Recommend add 'FileSystem' extension for better local file handling.
Download MCPB

Claude Registry

The Claude registry / MCPB package metadata is defined in manifest.json and ships with the static 512x512 icon at images/mcp-alphabanana.png.

Native sharp runtime packages are declared as optional dependencies so .mcpb installs can resolve the correct prebuilt binary on each supported platform without relying on postinstall hooks.

  • Stable MCPB URL: https://github.com/tasopen/mcp-alphabanana/releases/latest/download/mcp-alphabanana-latest.mcpb
  • Versioned MCPB URL pattern: https://github.com/tasopen/mcp-alphabanana/releases/download/vVERSION/mcp-alphabanana-VERSION.mcpb
  • Support: GitHub Issues

MCP Server

This repository provides an MCP server that enables AI agents to generate images using Google Gemini.

It can be used with MCP-compatible clients such as:

  • Claude Desktop
  • VS Code MCP
  • Cursor

Built with FastMCP 3 for a simplified codebase and flexible output options.

Glama MCP Server badge:

Available Tools

generate_image

Generates images using Google Gemini with optional transparency, local reference images, grounding, and reasoning metadata.

For Claude Desktop, prefer outputType=file for medium or large images. base64 and combine responses consume Claude context and can hit the client's size limit. On Windows, use the FileSystem extension to choose a writable absolute outputPath and any local referenceImages paths.

Key parameters:

  • prompt (string): description of the image to generate
  • model: NanoBanana2.1 (default), Flash3.1 (deprecated), Lite3.1, Flash2.5, Pro3, plus aliases flash, pro
  • outputWidth and outputHeight: requested final image size in pixels in normal mode
  • noresize + aspectRatio + output_resolution: return Gemini native size without resizing
  • output_resolution: 1K, 2K, 4K
  • output_format: png, jpg, webp
  • outputType: file, base64, combine
  • outputPath: required when outputType is file or combine
  • transparent: enable transparent PNG/WebP post-processing
  • referenceImages: optional array of local reference image files
  • grounding_type and thinking_mode: advanced Gemini controls (thinking_mode: minimal / medium / high, default medium)

Model Selection

Input Model IDInternal Model IDDescription
NanoBanana2.1gemini-nano-banana-2.1Default. Google Nano Banana 2.1. Best overall quality, prompt adherence, text rendering, and reference-image handling. 1K/2K/4K, up to 14 reference images.
Flash3.1gemini-3.1-flash-imageDeprecated. Ultra-fast, supports Thinking/Grounding. Google shuts it down on October 29, 2026; requests are rejected from that date. Migrate to NanoBanana2.1.
Lite3.1gemini-3.1-flash-lite-imageUltra-fast, cost-effective 1K-only model. No Search Grounding.
Flash2.5gemini-2.5-flash-imageLegacy Flash. High stability. Low cost. 1K only.
Pro3gemini-3-pro-imageHigh-fidelity Pro model.
flashgemini-nano-banana-2.1Alias for the default model (NanoBanana2.1).
progemini-3-pro-imageAlias for Pro3.

Parameters

Full parameter reference for the generate_image tool.

ParameterTypeDefaultDescription
promptstringrequiredDescription of the image to generate
outputFileNamestringrequiredOutput filename (extension auto-added if missing)
outputTypeenumcombinefile, base64, or combine
modelenumNanoBanana2.1Model: NanoBanana2.1, Flash3.1, Lite3.1, Flash2.5, Pro3, flash, pro
output_resolutionstringauto1K, 2K, 4K (0.5K removed in v1.6.0); required when noresize=true
noresizebooleanfalseSkip post-generation resize and return Gemini native dimensions
aspectRatioenumoptionalRequired when noresize=true; e.g. 1:1, 16:9, 4:5
outputWidthintegerrequired unless noresize=trueFinal output width in pixels
outputHeightintegerrequired unless noresize=trueFinal output height in pixels
output_formatenumpngpng, jpg, webp
outputPathstringrequired for file / combineAbsolute output directory path
transparentbooleanfalseTransparent background (PNG/WebP only)
transparentColorstring or nullnullColor key override for transparency extraction
colorToleranceinteger30Transparency color matching tolerance
fringeModeenumautoauto, crisp, hd
resizeModeenumcropcrop, stretch, letterbox, contain
grounding_typeenumnonenone, text, image, both (grounding-capable models: NanoBanana2.1, Flash3.1, Pro3)
thinking_modeenummediumminimal, medium, high (thinking-capable models: NanoBanana2.1 accepts all three; Flash3.1/Pro3 accept minimal/high and fall back to their own default otherwise)
include_thoughtsbooleanfalseReturn model reasoning fields when metadata is enabled
include_metadatabooleanfalseInclude grounding and reasoning metadata in JSON output
referenceImagesarray[]Up to 14 local reference files (NanoBanana2.1/Flash3.1/Pro3/Lite3.1), 3 for Flash2.5
debugbooleanfalseSave intermediate debug artifacts

Why alphabanana?

  • Zero Watermarks: API-native clean images.
  • Thinking/Grounding Support: Higher prompt adherence and search-backed accuracy.
  • Production Ready: Supports transparent WebP and exact aspect ratios for web and game assets.

Features

  • Nano Banana 2.1 default (gemini-nano-banana-2.1, 1K/2K/4K output)
  • Nano Banana 2 Lite (Lite3.1): ultra-fast, cost-effective 1K-only model for quick drafting and low-latency iteration
  • Advanced multi-image reasoning (up to 14 reference images)
  • Thinking/Grounding support (NanoBanana2.1, Flash3.1, Pro3)
  • Transparent PNG/WebP output (color-key post-processing, despill)
  • Multiple output formats: file, base64, or both
  • Flexible resize modes: crop, stretch, letterbox, contain
  • Multiple model tiers: NanoBanana2.1 (default), Flash3.1 (deprecated), Lite3.1, Flash2.5, Pro3, legacy aliases

Example Outputs

These sample outputs were generated with mcp-alphabanana and stored in images/examples.

Pixel art assetReference-image game scenePhotorealistic generation
Pixel art treasure chestReference-image dungeon loot scenePhotorealistic travel poster

Configuration

Configure the GEMINI_API_KEY in your MCP configuration (for example, mcp.json).

Examples:

  • Reference an OS environment variable from mcp.json:
{
  "env": {
    "GEMINI_API_KEY": "${env:GEMINI_API_KEY}"
  }
}
  • Provide the key directly in mcp.json:
{
  "env": {
    "GEMINI_API_KEY": "your_api_key_here"
  }
}

VS Code Integration

Add to your VS Code settings (.vscode/settings.json or user settings), configuring the server env in mcp.json or via the VS Code MCP settings.

{
  "mcp": {
    "servers": {
      "mcp-alphabanana": {
        "command": "npx",
        "args": ["-y", "@tasopen/mcp-alphabanana"],
        "env": {
          "GEMINI_API_KEY": "${env:GEMINI_API_KEY}"
        }
      }
    }
  }
}

Optional: Set a custom fallback directory for write failures by adding MCP_FALLBACK_OUTPUT to the env object.

Usage Examples

Basic Generation

{
  "prompt": "A pixel art treasure chest, golden trim, wooden texture",
  "model": "NanoBanana2.1",
  "outputFileName": "chest",
  "outputType": "base64",
  "outputWidth": 64,
  "outputHeight": 64,
  "transparent": true
}

Native Size Without Resize

{
  "prompt": "A clean app icon with a banana mascot, flat graphic design",
  "model": "NanoBanana2.1",
  "outputFileName": "banana-icon-native",
  "outputType": "base64",
  "noresize": true,
  "aspectRatio": "1:1",
  "output_resolution": "1K",
  "output_format": "png"
}

This mode returns the Gemini native pixel size for the requested ratio and resolution. For example, 1:1 + 1K returns 1024x1024 without any resize pass. (0.5K was removed in v1.6.0.)

Advanced (Vertical poster and thinking)

{
  "prompt": "A vertical, photorealistic travel poster advertising Magical Wings Day Tours. A joyful young couple flies high above a breathtaking European countryside at golden hour, holding hands as they soar through a partly cloudy sky. Below them are vineyards, villages, forests, a winding river, and a hilltop medieval castle. The poster uses large, elegant typography with the headline FLY THE COUNTRYSIDE at the top and Magical Wings Day Tours branding near the bottom.",
  "model": "NanoBanana2.1",
  "output_resolution": "1K",
  "outputFileName": "photoreal-travel-poster",
  "outputType": "file",
  "outputPath": "/path/to/output",
  "outputWidth": 848,
  "outputHeight": 1264,
  "output_format": "jpg",
  "thinking_mode": "high",
  "include_metadata": true
}

Grounding Sample (Search-backed)

{
  "prompt": "A modern travel poster featuring today's weather and skyline highlights in Kuala Lumpur",
  "model": "NanoBanana2.1",
  "outputFileName": "kl_travel_poster",
  "outputType": "base64",
  "outputWidth": 1024,
  "outputHeight": 1024,
  "grounding_type": "text",
  "thinking_mode": "high",
  "include_metadata": true,
  "include_thoughts": true
}

This sample enables Google Search grounding and returns grounding and reasoning metadata in JSON.

With Reference Images

{
  "prompt": "Use the reference image to create a game screen showing an opened treasure chest filled with coins and treasure, 8-bit dungeon crawler style, after-battle reward scene, dungeon corridor background, four-party status UI at the bottom",
  "model": "NanoBanana2.1",
  "output_resolution": "1K",
  "outputFileName": "reference-image-dungeon-loot",
  "outputType": "file",
  "outputPath": "/path/to/output",
  "outputWidth": 600,
  "outputHeight": 448,
  "output_format": "webp",
  "transparent": false,
  "referenceImages": [
    {
      "description": "Treasure chest style reference",
      "filePath": "/path/to/references/pixel-art-treasure-chest.png"
    }
  ]
}

Transparency & Output Formats

  • PNG: Full alpha, color-key + despill
  • WebP: Full alpha, better compression
  • JPEG: No transparency (falls back to solid background)

Nano Banana 2.1 does not provide native transparent output. When transparent=true is specified, mcp-alphabanana applies local post-processing to generate an alpha channel.

Development

# Development mode with MCP CLI
npm run dev

# MCP Inspector (Web UI)
npm run inspect

# Build for production
npm run build

License

MIT

Frequently asked questions

What is mcp-alphabanana MCP Server?

MCP server for image generation using Google Gemini AI

How do I install mcp-alphabanana MCP Server in Claude Desktop, Cursor, or VS Code?

Pick your client in the Install section on this page and copy the generated config into the client's config file. Step-by-step guides: Claude Desktop, Cursor, and VS Code. mcp-alphabanana MCP Server runs locally from the npm package @tasopen/mcp-alphabanana with the command npx -y @tasopen/mcp-alphabanana@1.6.0.

Is mcp-alphabanana MCP Server free and open source?

Yes. mcp-alphabanana MCP Server is released under the MIT license, an OSI-approved open-source license, so you can use, modify, and self-host it under those terms.

Does mcp-alphabanana MCP Server support remote (HTTP) connections?

No remote endpoint is listed for mcp-alphabanana MCP Server. It runs locally on your machine over stdio, started by your MCP client.

What tools does mcp-alphabanana MCP Server provide?

mcp-alphabanana MCP Server provides 21 tools, including Flash2.5, Flash3.1, Lite3.1, and NanoBanana2.1. See the full tool list for descriptions and parameters.

How is mcp-alphabanana MCP Server's trust score calculated?

mcp-alphabanana MCP Server scores 46 out of 100 (Fair). The score adds six capped public signals: registry status, maintenance, popularity, license, documentation, and security. Nobody can pay for points. Read the methodology for the full formula.

Reviews

No reviews yet

—Be the first to review

5 star0 reviews at 5 stars
4 star0 reviews at 4 stars
3 star0 reviews at 3 stars
2 star0 reviews at 2 stars
1 star0 reviews at 1 stars

No published reviews yet. Used it? Tell the next person how it went.

Add badge to your README

Paste either snippet into the repository README. The image links to this listing.

Listed on MCPpedia

Top 5 MCP servers

Daily or weekly. Confirm by email, unsubscribe any time.

How often

Manage this listing

Claim this server