AGENTS.md
+1 −200
https://raw.githubusercontent.com/chrischall/gemini-mcp/HEAD/AGENTS.md
− # AGENTS.md — gemini-mcp− Guidance for coding agents working in this repo.− ## TL;DR− v0.6.0: Google **Gemini** image-generation MCP server. Wraps the Generative− Language REST API (`https://generativelanguage.googleapis.com/v1beta`) and− exposes 13 tools to Claude over stdio: text→image and image→image generation,− multi-turn conversational editing, consistent image *sets*, **video generation**− (omni, `gemini_video_generate`), **music generation** (Lyria clip/3.5/pro,− `gemini_music_generate`), model listing (Nano Banana / Nano Banana Pro− family), **Files API** upload/list/delete, and a credential− healthcheck (`gemini_healthcheck`). Reference images can come from an− https URL the *server* fetches (`images_url`), a Files API reference− (`images_file_uris`), local file paths, raw base64 / data URIs, or the macOS− clipboard; video from a public YouTube URL or a local upload. Video and music ride the **same− Interactions endpoint** as `gemini_interact` — the tool naming is media-first− (`gemini_<media>_<action>`). Realtime Lyria (WebSocket) is intentionally− **not** implemented (see the video/music design spec).− A hosted deployment additionally serves: `gemini_get_upload_url` (signed PUT− upload URLs — zero-auth-header uploads from a shell), a persistent per-account− character/style library (`gemini_save/list/delete_character`/`_style`, applied− via `characters`/`style` params on the generation tools), `images_r2_keys`− inputs, `max_wait_ms` wait-then-hand-off on generation tools, and a `bundle_url`− zip on multi-image `gemini_image_set` results.− Auth is a Google **API key** (`GEMINI_API_KEY`) sent in the `x-goog-api-key`− header — Gemini does **not** use `Authorization: Bearer`. Because the model is− baked into the URL path (`/models/{model}:generateContent`) rather than the body,− this is the bearer/direct-API archetype with a custom twist: a thin `call()`− wrapper over the fleet-shared `createApiClient` (configured with a non-Bearer− `tokenHeader`), not a hand-rolled fetch and not a stock Bearer client.− ## Environment− ```− GEMINI_API_KEY=<key> # Optional to boot; every Gemini API call needs it unless the hosted connector− # supplies a per-session key. Create at https://aistudio.google.com/apikey− GEMINI_IMAGE_MODEL=<id> # Optional. Default model override (bare id, e.g. gemini-3.1-flash-image)− GEMINI_OUTPUT_DIR=<dir> # Optional. Where generated images are written (default: ~/Downloads/gemini-mcp); when set, confines per-call output_dir− GEMINI_INPUT_DIR=<dir> # Optional. Base dir searched for relative input image paths− GEMINI_UPLOAD_DIR=<dirs> # Optional. Confine local-file Files-API uploads (upload_file `path`, `video_path`)− # to these dirs (path.delimiter-separated, `~` ok). Unset = unconfined.− GEMINI_REFERENCE_DIR=<dirs> # Optional. Confine local reference images (`images` paths) — referenceRoots() in images.ts: this → GEMINI_UPLOAD_DIR → $MCP_DATA_DIR/uploads (hosted) → unconfined; GEMINI_OUTPUT_DIR always added when on− GEMINI_TIMEOUT_MS=<ms> # Optional. Upstream timeout (default 60000; 120000 for 4K; per-call timeout_ms wins)+ CLAUDE.md
Showing the first 40 of each.