gemini-mcp-server
Server Configuration
Describes the environment variables required to run the server.
| Name | Required | Description | Default |
|---|---|---|---|
| GEMINI_MODEL | No | Model to use (default: gemini-3.5-flash). | |
| GEMINI_TOP_K | No | Top-k sampling parameter (default: 40). | |
| GEMINI_TOP_P | No | Top-p sampling parameter (default: 0.95). | |
| GEMINI_API_KEY | No | Your Google AI Studio API key. Required for AI Studio mode. | |
| GEMINI_LOG_DIR | No | Directory for log files (default: ./logs). | |
| GEMINI_MAX_TOKENS | No | Maximum output tokens (default: 8192). | |
| GEMINI_MAX_HISTORY | No | Maximum history entries per session (default: 10). | |
| GEMINI_MCP_SERVERS | No | JSON array of external MCP server configurations. | |
| GEMINI_TEMPERATURE | No | Temperature for generation (default: 1.0). | |
| GEMINI_LOG_TO_STDERR | No | Log to stderr instead of files (default: true). | |
| GEMINI_SYSTEM_PROMPT | No | Custom system prompt to set the AI's persona. | |
| GOOGLE_CLOUD_PROJECT | No | Your GCP project ID. Required for Vertex AI mode. | |
| GOOGLE_CLOUD_LOCATION | No | GCP location (e.g., us-central1). Required for Vertex AI mode. | |
| GEMINI_ALLOW_FILE_URIS | No | Allow file:// URIs (default: false, secure). | |
| GEMINI_DISABLE_LOGGING | No | Disable logging entirely (default: false). | |
| GEMINI_SESSION_TIMEOUT | No | Session timeout in seconds (default: 3600). | |
| GEMINI_IMAGE_OUTPUT_DIR | No | Directory for generated images (default: ~/Pictures/gemini-generated). | |
| GEMINI_MEDIA_RESOLUTION | No | Media resolution for Gemini 3 models: low, medium, high. | |
| GEMINI_MUSIC_OUTPUT_DIR | No | Directory for generated music (default: ~/Music/gemini-generated/music). | |
| GEMINI_VIDEO_OUTPUT_DIR | No | Directory for generated videos (default: ~/Movies/gemini-generated on macOS, ~/Videos/gemini-generated on Windows/Linux). | |
| GEMINI_SPEECH_OUTPUT_DIR | No | Directory for generated speech (default: ~/Music/gemini-generated/speech). | |
| GOOGLE_GENAI_USE_VERTEXAI | No | Set to 'false' to use Google AI Studio mode. Default is 'true' for Vertex AI mode. | |
| GEMINI_ENABLE_CONVERSATIONS | No | Enable multi-turn conversations (default: false). | |
| GOOGLE_APPLICATION_CREDENTIALS | No | Path to service account key JSON file for Vertex AI authentication (alternative to ADC). |
Instructions
Guidance the server publishes about itself, which clients place ahead of the tool catalog so the model reads it before choosing anything.
This server publishes no instructions, or was last inspected before Glama recorded them.
Capabilities
Features and capabilities supported by this server
Protocol revision2025-11-25
| Capability | Details |
|---|---|
| tools | {} |
Tools
Functions exposed to the LLM to take actions
| Name | Description |
|---|---|
| queryA | Query Google AI (Gemini models) with a prompt. This tool operates as an intelligent agent with multi-turn execution capabilities. The agent can automatically use available tools (web fetching, external MCP servers) to gather information and provide comprehensive answers. Supports multi-turn conversations when sessionId is provided. Supports multimodal inputs (images, audio, video, documents) via the optional 'parts' parameter. |
| searchC | Search for information using Gemini. Returns a list of relevant search results. Follows OpenAI MCP specification for search tools. |
| fetchC | Fetch the full contents of a search result document by its ID. Follows OpenAI MCP specification for fetch tools. |
| generate_imageA | Generate images using Gemini's native image generation (Nano Banana). Supports gemini-3-pro-image, gemini-3.1-flash-image, gemini-3.1-flash-lite-image, and gemini-2.5-flash-image models. gemini-3.1-flash-lite-image (Nano Banana 2 Lite) is the fast, low-cost GA tier: 1K output only, standard aspect ratios (no 1:4/1:8/4:1/8:1), no thinkingLevel, up to 14 reference images. gemini-3.1-flash-image is required for 0.5K and 1:4/1:8/4:1/8:1 ratios. gemini-2.5-flash-image (legacy, retires 2026-10-02) supports at most 3 reference images and does not support imageSize. Reference images use imagePaths and must be PNG (.png), JPEG (.jpg/.jpeg), WEBP (.webp), HEIC (.heic), HEIF (.heif). Audio and video reference files are not accepted by generate_image. Images are saved to /root/Pictures/gemini-generated and returned as base64. |
| generate_speechA | Generate speech audio using Gemini TTS models. Supports single-speaker and two-speaker TTS. Input is text-only; audio, image, and video reference files are not accepted. TTS has a 32k-token context limit and does not support streaming. Audio is saved to /root/Music/gemini-generated/speech and returned as MCP audio content. |
| generate_musicA | Generate music using Lyria models. Supports lyria-3-clip-preview fixed 30-second clips and lyria-3-pro-preview full songs up to 184 seconds. Lyria 3 supports one clip per prompt; language directions follow the model-card set: English, German, Spanish, French, Hindi, Japanese, Korean, Portuguese. Gemini API/AI Studio mode supports 44.1 kHz stereo audio/mp3 output, and audio/wav only for lyria-3-pro-preview. Negative prompting is not supported. Lyria 3 accepts text prompts and optional imagePaths (PNG (.png), JPEG (.jpg/.jpeg), WEBP (.webp), HEIC (.heic), HEIF (.heif)); audio/video reference files are not accepted. Audio is saved to /root/Music/gemini-generated/music and returned as MCP audio content. |
| generate_videoA | Start video generation using Google's Veo models. Returns an operationId immediately. Video generation typically takes 1-3 minutes. Use check_video with the operationId to poll for completion and download results. Recommended polling interval: 30 seconds. Supports text-to-video, image-to-video (with imagePath), interpolation (imagePath + lastFramePath), reference images (referenceImagePaths, max 3, Veo 3.1 only), and Veo video extension (videoPath). Image source file types: PNG (.png), JPEG (.jpg/.jpeg), WEBP (.webp). videoPath must be MP4 (.mp4) from a previous Veo 720p generation. Audio file references are not supported; describe dialogue, SFX, and ambience in the prompt instead. |
| check_videoA | Check the status of a video generation operation. Returns status: 'running' (still generating), 'completed' (with saved file paths), or 'failed' (with error). If status is 'running', wait ~30 seconds before checking again. Completed videos are saved to /root/Videos/gemini-generated. |
| generate_omni_videoA | Generate or conversationally edit short videos with Gemini Omni Flash (gemini-omni-flash-preview). This is a NON-Veo model on the Google AI Studio (Gemini API) backend and does NOT use generate_video/check_video: it returns the finished video synchronously in one call (no operationId polling). Two paths: (1) ONESHOT generation — text-to-video, or image/reference-to-video via imagePaths (max 7); (2) INTERACTIVE editing — set previousInteractionId to an id returned by a prior call to edit that video with a natural-language instruction (no image re-upload; chain up to 3 sequential edits). Constraints: 720p output only; aspect ratio 16:9 or 9:16; clips run a few seconds (steer pacing/timing within the prompt — duration is not a parameter); a synced audio track is generated automatically (audio reference inputs are not accepted — describe dialogue/SFX/ambience in the prompt). Image source file types: PNG (.png), JPEG (.jpg/.jpeg), WEBP (.webp). The response includes interactionId (pass it back as previousInteractionId to edit) and the saved file path. Videos are saved to /root/Videos/gemini-generated. |
| reference_searchA | AI-assisted reference search: answer a question from live web sources using Gemini's Google Search grounding, and return organized citations. Unlike the OpenAI-spec 'search'/'fetch' connector tools, this composes a synthesized answer AND returns the source links plus claim->source supports (citations) in one call. Returns: answer (synthesized text), citations (deduped {index,title,uri,domain} sources), supports (answer segments mapped to citation indices with confidence scores), searchQueries (the queries the model actually ran), and searchSuggestionsHtml (Google's required Search Suggestions markup to display alongside the answer). Search-scope tuning is backend-specific: Vertex AI supports excludeDomains (skip up to 2000 domains) and blockingConfidence (block risky/low-quality sites); Google AI Studio supports timeRange (restrict to a publish-time window) and grounding on explicit urls via URL context (Gemini API only, not Vertex AI). Both backends support includeImages. |
Prompts
Interactive templates invoked by user choice
| Name | Description |
|---|---|
No prompts | |
Resources
Contextual data attached and managed by the client
| Name | Description |
|---|---|
No resources | |
TDQS
Scored across 10 tools
Each tool has a clearly distinct purpose: query for conversational AI, search/fetch for web retrieval, generate_image for image generation, generate_video/check_video for async video, generate_omni_video for sync video, generate_speech for TTS, generate_music for music, and reference_search for grounded Q&A. No two tools overlap in functionality.
All tool names follow the verb_noun pattern (e.g., generate_image, check_video, reference_search) using imperative verbs and underscores consistently. No camelCase or mixed conventions.
10 tools cover the server's multi-modal AI capabilities (text, web, images, videos, audio) without bloat. Each tool provides a necessary function, and the count is well-balanced for a comprehensive generative AI server.
The tool set covers the full lifecycle for each modality: generation, status checks where needed (via check_video for async video), and multiple generation backends (e.g., two video models). The query tool serves as a general-purpose agent. No obvious missing operations for the declared scope.