`mcp-nanobanana-go` MCP Server
This server provides an MCP interface to Google’s NanoBanana (Gemini Image) models, allowing for multimodal content generation.
nanobanana_image_generation
Section titled “nanobanana_image_generation”Generates content (text and/or images) based on a multimodal prompt.
Parameters:
prompt(string, required): The text prompt for content generation.model(string, optional): The specific NanoBanana (Gemini Image) model to use. Defaults togemini-3.1-flash-image-preview.images(string array, optional): A list of local file paths or GCS URIs for input images.output_directory(string, optional): Local directory to save any generated image(s) to.gcs_bucket_uri(string, optional): GCS URI prefix to store any generated images.
Environment Variable Configuration
Section titled “Environment Variable Configuration”The tool utilizes the following environment variables:
GOOGLE_CLOUD_PROJECT(string): Required. Your Google Cloud Project ID.- Override: You can override this globally for this specific server by setting
NANOBANANA_PROJECT_ID.
- Override: You can override this globally for this specific server by setting
GOOGLE_CLOUD_LOCATION(string): The preferred Google Cloud location/region for Vertex AI services.- Default:
"us-central1" - Fallback:
LOCATIONis also supported as a fallback forGOOGLE_CLOUD_LOCATION. - Override: You can override this globally for this specific server by setting
NANOBANANA_LOCATION.
- Default:
ALLOW_UNSAFE_MODELS(boolean): Optional (true/false). Allows users to bypass strict local model constraint validation, enabling them to test experimental or pre-release model strings that are not yet hardcoded in the registry.- Default:
false
- Default:
ENABLE_OPTIONAL_HEADER_CAPTURE(boolean): Optional (true/false). Intended for internal debugging. When set totrue, the server intercepts API requests and injects the raw ADC Bearer token to capture and surface thex-goog-sherlog-linkheader in the tool output. This feature is supported for NanoBanana.- Default:
false
- Default:
Example Usage
Section titled “Example Usage”Generating an Image
Section titled “Generating an Image”export GOOGLE_CLOUD_PROJECT=your-gcp-project
mcptools call nanobanana_image_generation \ --params '{"prompt": "a picture of a cat sitting on a table", "output_directory": "./output"}' \ mcp-nanobanana-go