MCP directory
GM

Gemini Mcp

by github.com/chrischall · v2.5.1 · updated Nov 7, 2026

Generate and edit images with Google Gemini (Nano Banana / Nano Banana Pro) image models.

npm

Run it locally

Install the package and point your AI client at it.

npm

npx -y @chrischall/[email protected]

Environment variables

  • GEMINI_API_KEYsecret

    Your Google Gemini API key (aistudio.google.com/apikey)

  • GEMINI_IMAGE_MODEL

    Override the default image model (default: gemini-nano-banana-2.1)

  • GEMINI_OUTPUT_DIR

    Default directory for generated images (default: ~/Downloads/gemini-mcp). When set, a per-call output_dir must be inside it.

  • GEMINI_INPUT_DIR

    Directory to resolve bare input-image filenames against

  • GEMINI_UPLOAD_DIR

    Restrict local-file uploads to the Gemini Files API to these directories (path.delimiter-separated; unset = unrestricted)

  • GEMINI_REFERENCE_DIR

    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_MS

    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_MS

    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_MS

    How long to wait out interactions-store lag when a chained call 404s (default: 120000; 0 disables retrying)

  • GEMINI_DEBUG

    When set, emit heartbeat diagnostics to stderr. Off by default.

  • GEMINI_RATE_CARD

    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).

More from github.com/chrischall

More MCP servers