Generate and edit images with Google Gemini (Nano Banana / Nano Banana Pro) image models.
Connect Runs on your machine
claude mcp add gemini-mcp -e GEMINI_API_KEY=<GEMINI_API_KEY> -e GEMINI_IMAGE_MODEL=<GEMINI_IMAGE_MODEL> -e GEMINI_OUTPUT_DIR=<GEMINI_OUTPUT_DIR> -e GEMINI_INPUT_DIR=<GEMINI_INPUT_DIR> -e GEMINI_UPLOAD_DIR=<GEMINI_UPLOAD_DIR> -e GEMINI_REFERENCE_DIR=<GEMINI_REFERENCE_DIR> -e GEMINI_TIMEOUT_MS=<GEMINI_TIMEOUT_MS> -e GEMINI_HEARTBEAT_MS=<GEMINI_HEARTBEAT_MS> -e GEMINI_CHAIN_RETRY_MS=<GEMINI_CHAIN_RETRY_MS> -e GEMINI_DEBUG=<GEMINI_DEBUG> -e GEMINI_RATE_CARD=<GEMINI_RATE_CARD> -- npx -y @chrischall/[email protected]
{
"mcpServers": {
"gemini-mcp": {
"command": "npx",
"args": [
"-y",
"@chrischall/[email protected]"
],
"env": {
"GEMINI_API_KEY": "<GEMINI_API_KEY>",
"GEMINI_IMAGE_MODEL": "<GEMINI_IMAGE_MODEL>",
"GEMINI_OUTPUT_DIR": "<GEMINI_OUTPUT_DIR>",
"GEMINI_INPUT_DIR": "<GEMINI_INPUT_DIR>",
"GEMINI_UPLOAD_DIR": "<GEMINI_UPLOAD_DIR>",
"GEMINI_REFERENCE_DIR": "<GEMINI_REFERENCE_DIR>",
"GEMINI_TIMEOUT_MS": "<GEMINI_TIMEOUT_MS>",
"GEMINI_HEARTBEAT_MS": "<GEMINI_HEARTBEAT_MS>",
"GEMINI_CHAIN_RETRY_MS": "<GEMINI_CHAIN_RETRY_MS>",
"GEMINI_DEBUG": "<GEMINI_DEBUG>",
"GEMINI_RATE_CARD": "<GEMINI_RATE_CARD>"
}
}
}
}
{
"mcpServers": {
"gemini-mcp": {
"command": "npx",
"args": [
"-y",
"@chrischall/[email protected]"
],
"env": {
"GEMINI_API_KEY": "<GEMINI_API_KEY>",
"GEMINI_IMAGE_MODEL": "<GEMINI_IMAGE_MODEL>",
"GEMINI_OUTPUT_DIR": "<GEMINI_OUTPUT_DIR>",
"GEMINI_INPUT_DIR": "<GEMINI_INPUT_DIR>",
"GEMINI_UPLOAD_DIR": "<GEMINI_UPLOAD_DIR>",
"GEMINI_REFERENCE_DIR": "<GEMINI_REFERENCE_DIR>",
"GEMINI_TIMEOUT_MS": "<GEMINI_TIMEOUT_MS>",
"GEMINI_HEARTBEAT_MS": "<GEMINI_HEARTBEAT_MS>",
"GEMINI_CHAIN_RETRY_MS": "<GEMINI_CHAIN_RETRY_MS>",
"GEMINI_DEBUG": "<GEMINI_DEBUG>",
"GEMINI_RATE_CARD": "<GEMINI_RATE_CARD>"
}
}
}
}
{
"servers": {
"gemini-mcp": {
"type": "stdio",
"command": "npx",
"args": [
"-y",
"@chrischall/[email protected]"
],
"env": {
"GEMINI_API_KEY": "<GEMINI_API_KEY>",
"GEMINI_IMAGE_MODEL": "<GEMINI_IMAGE_MODEL>",
"GEMINI_OUTPUT_DIR": "<GEMINI_OUTPUT_DIR>",
"GEMINI_INPUT_DIR": "<GEMINI_INPUT_DIR>",
"GEMINI_UPLOAD_DIR": "<GEMINI_UPLOAD_DIR>",
"GEMINI_REFERENCE_DIR": "<GEMINI_REFERENCE_DIR>",
"GEMINI_TIMEOUT_MS": "<GEMINI_TIMEOUT_MS>",
"GEMINI_HEARTBEAT_MS": "<GEMINI_HEARTBEAT_MS>",
"GEMINI_CHAIN_RETRY_MS": "<GEMINI_CHAIN_RETRY_MS>",
"GEMINI_DEBUG": "<GEMINI_DEBUG>",
"GEMINI_RATE_CARD": "<GEMINI_RATE_CARD>"
}
}
}
}
Replace the values in angle brackets with your own. Keys stay on your machine; we never see them.
Tools
This server runs locally, so its tools are listed by your MCP client once it starts.
Environment variables
| Name | Description |
|---|---|
GEMINI_API_KEYOptional, secret | Your Google Gemini API key (aistudio.google.com/apikey) |
GEMINI_IMAGE_MODELOptional | Override the default image model (default: gemini-nano-banana-2.1) |
GEMINI_OUTPUT_DIROptional | Default directory for generated images (default: ~/Downloads/gemini-mcp). When set, a per-call output_dir must be inside it. |
GEMINI_INPUT_DIROptional | Directory to resolve bare input-image filenames against |
GEMINI_UPLOAD_DIROptional | Restrict local-file uploads to the Gemini Files API to these directories (path.delimiter-separated; unset = unrestricted) |
GEMINI_REFERENCE_DIROptional | Restrict local reference images (images / image paths sent to Gemini) to these directories (path.delimiter-separated), plus GEMINI_OUTPUT_DIR. Unset: GEMINI_UPLOAD_DIR applies; if that is unset too, unrestricted locally, and $MCP_DATA_DIR/uploads when MCP_DATA_DIR is set (hosted) |
GEMINI_TIMEOUT_MSOptional | Upstream request timeout in ms (default: 60000, or 120000 for image_size: "4K"); each generation tool also takes a per-call timeout_ms |
GEMINI_HEARTBEAT_MSOptional | Progress-notification cadence in ms while a generation runs (default: 10000; 0 disables) — keeps MCP hosts that reset their timeout on progress from timing out long generations |
GEMINI_CHAIN_RETRY_MSOptional | How long to wait out interactions-store lag when a chained call 404s (default: 120000; 0 disables retrying) |
GEMINI_DEBUGOptional | When set, emit heartbeat diagnostics to stderr. Off by default. |
GEMINI_RATE_CARDOptional | Override/extend the shipped USD-per-1M-token rates used by gemini_token_usage's cost estimate, e.g. {"gemini-3-pro-image":{"input":2,"text_output":12,"image_output":120}}. Malformed JSON is ignored (a bad card must not fail generations). |
Details
| Package | @chrischall/[email protected] (NPM, stdio) |
| First published | 7 Nov 2026 |
| Last updated | 7 Nov 2026 |
| Registry name | io.github.chrischall/gemini-mcp |
More ai and media servers See all
Listing data from the official MCP registry. Status and tools from NestDaddy's daily check. Browse all MCP servers.
