Skip to main content
Glama

gemini-mcp

Every Gemini API capability as tools for Claude and any other MCP client: text, images (Nano Banana), video with native audio (Gemini Omni), speech and custom voices, music (Lyria), transcription, embeddings, decisions, Deep Research and the Antigravity managed agent.

Türkçe README · License: Apache-2.0

You:    "Make a 9:16 product video of this bicycle, then extend it by 5 seconds"
Claude: generate_video(...) → videos/bicycle.mp4 → generate_video(previous_interaction_id=..., ...) → done

New to this? Start here

What is it, in plain words? Claude is great at writing and thinking, but it cannot draw pictures, make videos or speak out loud by itself. Google's Gemini can. This project is a small "bridge" program that lets Claude use Gemini's skills. Once it is installed, you just ask Claude in normal language, for example "make a square picture of a cozy coffee shop", and the finished file appears in a folder on your computer.

What can I ask for?

  • Pictures and picture edits ("make the background white", "put this logo on a mug")

  • Short videos with sound, and making them longer

  • Turning text into speech, with many voices and languages

  • Background music or full songs

  • Writing out what is said in a recording

  • Long web research reports

What do I need?

  1. A computer with Python installed. On Windows, get it from python.org and tick "Add Python to PATH" during setup.

  2. The Claude Desktop app.

  3. A free Gemini API key from Google AI Studio. It is a long password-like code. Keep it secret.

Setup in 5 steps (about 10 minutes)

  1. On this page, click the green Code button, then Download ZIP, and unzip it, for example to Documents\gemini-mcp.

  2. Open that folder, type cmd in the address bar, press Enter, then run pip install -r requirements.txt.

  3. In Claude Desktop open Settings → Developer → Edit Config and paste the block from Install below. Put in the real path to server.py and your key.

  4. Fully quit Claude Desktop (also from the system tray) and open it again.

  5. Ask Claude: "Use gemini-mcp to list your capabilities." If you get an answer, you are done.

Does it cost money? Making pictures, videos, music, speech and research reports is charged by Google to your key's billing account. Text questions are cheap. Claude asks before expensive jobs, and you can ask "show my usage report" at any time. Google AI Studio shows your real bill.

Something wrong? The most common causes are a wrong path in the config, a missing key, or Claude not being fully restarted. Ask Claude "what error did gemini-mcp return?". Errors are written in plain sentences.

Related MCP server: gemini-sidekick

Why this server

  • Complete: 25 tools covering the whole current Gemini lineup (Gemini 4, Nano Banana 2.1, Omni 1.2 Flash, TTS 3.8, Lyria 3.5, Transcribe 3.5, Decision 1, Deep Research, Antigravity).

  • Future-proof: api_call sends any Interactions API request, so a model released tomorrow works today. check_updates scans the official changelog for new and deprecated models, probes access for free, and reports newer releases of this server. set_default_model switches models without editing code.

  • Cost-safe:

    • The same paid request within 10 minutes is never billed twice; force_new overrides this.

    • Agents require an explicit token budget, with a hard ceiling on top.

    • usage_report shows where your tokens went.

  • Token-light: tools return file paths and short summaries instead of large blobs, and long reports are saved to disk with a preview.

  • Non-blocking: long jobs run in the background. A tool waits up to about 45 s, then returns a job_id.

Tools

Area

Tools

Text & files

gemini_chat (Search, URL context, code execution, Maps, JSON schema, thinking level, multi-turn)

Images

generate_image (generate, edit, up to 14 references, multi-turn edits, search grounding, 512 to 4K)

Video

generate_video (text/image to video, first and last frame, edit, extend up to 30 s, 360p to 4K)

Speech

text_to_speech (multi-speaker, style, 130+ languages), list_voices, design_voice

Transcription

transcribe_audio (word timestamps, diarization, custom vocabulary)

Music

generate_music (30 s clips or full songs, WAV, automatic model fallback)

Agents

agent_run, agent_status, agent_cancel, agent_files (Antigravity sandbox)

Research

deep_research_start, deep_research_result

Judging & search

decide (calibrated yes/no, ideal as a QA gate), embed_texts

Jobs & raw

check_job, api_call

Maintenance

check_updates, set_default_model, usage_report, list_capabilities

Docs

docs_search, docs_read, gemini_guide (official Gemini docs)

Install

Requirements: Python 3.11+ and a Gemini API key from Google AI Studio.

git clone https://github.com/ygtcyln/gemini-mcp.git
cd gemini-mcp
pip install -r requirements.txt        # or: pip install .

Claude Desktop

Add this to claude_desktop_config.json (Settings → Developer → Edit Config), then fully quit and reopen Claude:

{
  "mcpServers": {
    "gemini-mcp": {
      "command": "python",
      "args": ["/absolute/path/to/gemini-mcp/server.py"],
      "env": { "GEMINI_API_KEY": "your-key" }
    }
  }
}

If you installed it with pip install ., use "command": "gemini-mcp" with no args.

Claude Code

claude mcp add gemini-mcp -e GEMINI_API_KEY=your-key -- python /absolute/path/to/gemini-mcp/server.py

Configuration

Variable

Default

Meaning

GEMINI_API_KEY

(required)

Your API key

GEMINI_OUTPUT_DIR

~/Documents/gemini-mcp/outputs

Where files are saved (images/, videos/, audio/, music/, transcripts/, agent/...)

GEMINI_MCP_HOME

the repository folder, or ~/.gemini-mcp when pip-installed

Location of models.json and data/ (usage log, update report)

GEMINI_AGENT_MAX_TOKENS

300000

Hard ceiling for any agent budget

GEMINI_AUTO_CHECK

1

Set to 0 to disable the daily background update check

GEMINI_DEBUG

0

Set to 1 to include stack traces in errors

GEMINI_TEXT_MODEL, GEMINI_IMAGE_MODEL, ...

see list_capabilities

Override a default model

Keeping up to date

  • Models: ask your assistant to "run check_updates". It lists new model IDs, deprecations that affect your defaults, and access probes, and it also runs automatically once a day. To adopt a model, call set_default_model("text", "gemini-4-neon").

  • The server itself: check_updates also compares your version with the latest GitHub release. To update, run git pull (or pip install -U .) and restart your client.

Costs and safety

  • Images, video, music, speech, Deep Research and agents are billed by Google to your key. Your assistant should confirm before running batches.

  • agent_run needs max_total_tokens. The agent works in a Google-hosted sandbox and may call other Gemini APIs with your key. Start small (for example 20000 tokens), and use agent_cancel to stop a run.

  • Your API key only lives in your MCP client's config or .env. It is never written to outputs or logs. .gitignore excludes .env, models.json, data/ and outputs.

Development

pip install -e ".[dev]"
ruff check . && pytest -q      # fully offline: the Gemini client is faked

Contributions are welcome. Please keep tool responses compact and add a test for each new tool.

Support and contributions

This project is shared as-is, free to use under Apache-2.0. Bug reports with clear steps to reproduce are welcome in Issues. Feature requests, custom work and private support are not offered. Pull requests are limited to collaborators. Never post your API key in an issue.

License

Apache-2.0. See LICENSE and NOTICE. This is an independent project, not affiliated with Google. "Gemini" is a trademark of Google LLC.

Available Tools

25 tools
agent_cancelB

Stop a running agent or Deep Research task (stops further billing).

Inputs: interaction_id (required).

agent_filesA

List files in an agent sandbox and optionally download them to OUTPUT_DIR/agent/<environment_id>/.

path: folder or file inside the workspace ("" = root). recursive: include subfolders. download: save the listed files locally (at most max_files, <=200).

Inputs: environment_id (required), path, download, max_files, +1 more.

agent_runA

Start the Antigravity managed agent: an autonomous agent in a Google-hosted Linux sandbox that can write and run code, edit files and browse. Runs in the background; BILLED per token, and the agent may itself call other Gemini APIs with your key - always confirm the budget with the user first.

task: what to do and what to deliver (e.g. "analyze sales.csv, write report.txt and chart.png"). max_total_tokens: REQUIRED hard budget for the run (capped by GEMINI_AGENT_MAX_TOKENS, default 300000). If the budget runs out the status is "incomplete"; resume with previous_interaction_id + environment_id. model: reasoning model for the agent (e.g. gemini-3.8-flash, gemini-4-hydrogen); default is the agent's. files: local files uploaded into the sandbox (<=10 MB total). repository: a repository source to mount, e.g. "github.com/owner/repo". sources: raw source objects ({"type": "gcs"|"inline"|"repository", "source", "target", ...}). network: "disabled" to cut off internet access. environment_id / previous_interaction_id: continue in an existing sandbox / conversation. Then: agent_status(interaction_id) for progress, agent_files(environment_id) for outputs.

Inputs: task (required), max_total_tokens (required), agent, files, +6 more.

agent_statusB

Check an agent run (agent_run) - returns status, final answer when done, usage and environment_id. Long answers are saved to a file. wait_seconds: max wait in this call (0-55).

Inputs: interaction_id (required), wait_seconds.

api_callA

Raw Interactions API gateway: send ANY request the SDK supports; media outputs are saved. Use it for brand-new models/features before a dedicated tool exists (see docs_search for schemas).

model or agent: one is required. input: text or a content list ([{"type":"text","text":"..."}]). files: local files appended to the input. response_format / generation_config / tools / environment / agent_config: passed through as-is. beta: use the v1beta client (default).

Inputs: beta, agent, files, input, +11 more.

check_jobB

Get the result of a background job (image, video, music, speech, api_call).

wait_seconds: how long to wait in this call (0-55).

Inputs: job_id (required), wait_seconds.

check_updatesA

Scan the official changelog for new models and deprecations affecting your defaults, probe model access (free models.get calls) and check for a newer gemini-mcp release. Changes nothing; the report is saved to data/update_report.json. Use set_default_model to adopt a model.

days: how far back to scan. probe: probe model availability for this API key.

Inputs: days, probe.

decideA

Decisions API: calibrated probability of "yes" for each yes/no question. Cheap and fast. Great as a QA gate, e.g. "Is the in-image text spelled correctly?" or, with a reference and a generated image, "Is it the same product in both images?" (hallucination/consistency check).

content: text or instructions to evaluate. questions: list of yes/no questions. files: optional files to include. model: default gemini-decision-1.

Inputs: content (required), questions (required), files, model.

deep_research_resultA

Check a Deep Research task; returns the report when complete.

wait_seconds: max wait in this call (0-55). save: always write the report to a file (long reports are saved automatically and a preview is returned).

Inputs: interaction_id (required), save, wait_seconds.

deep_research_startA

Start the Deep Research agent in the background (multi-source web research; minutes; billed).

query: research question and desired report format. maximum: most thorough (slower, pricier). Poll with deep_research_result(interaction_id).

Inputs: query (required), maximum.

design_voiceA

Create a PERSISTENT custom voice from a text description; use the returned id as voice. Your account has a custom-voice quota; this may be billed.

description: e.g. "woman in her 40s, warm and trustworthy, slow pace". display_name: voice name. base_voice: prebuilt voice to start from. language_code: e.g. en-US.

Inputs: description (required), display_name (required), gender, base_voice, +1 more.

docs_readA

Read a docs section by chunk_id from docs_search. context: neighbouring sections to add (0-5).

Inputs: chunk_id (required), context.

embed_textsB

Embed texts. Compact by default: dimensions + a similarity matrix (up to 12 texts).

return_vectors: include raw vectors (large). save_vectors: write vectors to a JSON file.

Inputs: texts (required), model, save_vectors, return_vectors.

gemini_chatA

Generate text with Gemini or analyze files (images, audio, video, PDF, Office, CSV, text).

model: default in list_capabilities; e.g. gemini-4-carbon (smartest), gemini-4-neon, gemini-4-argon, gemini-4-hydrogen, gemini-3.8-flash, gemini-3.5-flash-lite (cheapest). files: absolute paths of files to analyze. google_search / url_context / code_execution / google_maps: built-in tools. json_schema: return structured JSON matching this schema. previous_interaction_id: continue a conversation from an earlier interaction_id. thinking_level: minimal, low, medium, high or xhigh (depth = cost/latency). max_output_tokens: output cap. tools: raw tool definitions appended to the built-ins.

Inputs: prompt (required), files, model, tools, +9 more.

gemini_guideC

Current Gemini models, SDK notes and this server's usage rules.

Inputs: no named parameters.

generate_imageA

Generate an image with Nano Banana, or edit/combine reference images. Saves a JPEG.

prompt: detailed description (English works best); put any in-image text in quotes. aspect_ratio: 4:5 (default), 1:1, 9:16, 16:9, 3:4, 4:3, 2:3, 3:2, 5:4, 21:9, 1:4, 4:1, 1:8, 8:1. image_size: 512, 1K, 2K (default) or 4K. model: gemini-nano-banana-2.1 (default), gemini-3-pro-image (best text), gemini-3.1-flash-lite-image. reference_images: up to 14 local images to edit or take style/subjects from. previous_interaction_id: edit the image from an earlier call ("same scene, warmer light") - the most reliable way to keep a character/product consistent. google_search: ground the image in current facts. force_new: regenerate even if the identical request ran recently (billed again).

Inputs: prompt (required), model, filename, force_new, +5 more.

generate_musicA

Generate music with Lyria (background tracks, jingles, full songs). Lyrics follow the prompt language.

prompt: genre, tempo, instruments, mood; say "instrumental" for no vocals. lyria-3.5 accepts [verse]/[chorus] tags and timestamps for custom lyrics and structure. model: lyria-3-clip-preview (30 s) or lyria-3.5 (full song). If unavailable (404) the next fallback is tried automatically; the model used is reported. duration_seconds: target length (lyria-3.5 only). wav: WAV instead of MP3 (lyria-3.5 only). reference_images: up to 10 images to inspire the music.

Inputs: prompt (required), wav, model, filename, +3 more.

generate_videoA

Generate, edit or extend a video with native audio (Gemini Omni Flash). Runs in the background.

prompt: scene, camera, light, mood, dialogue/sound. For edits/extensions describe only the change. aspect_ratio: 9:16 (default when generating) or 16:9. duration_seconds: 3-15 when generating (default 8); 3-10 added seconds when extending. resolution: 360p, 720p (default), 1080p or 4k (both upscaled). reference_images: up to 6 reference/first-frame images (2 + task=image_to_video for first+last frame). video_files: one local video (<=15 s) to edit/extend (not available in EEA/CH/UK). previous_interaction_id: interaction_id of a video made here; edit/extend without re-uploading. Extensions are appended to the end, total <= 30 s. task: only if natural language is ambiguous: text_to_video, image_to_video, reference_to_video, edit, extend, upscale. delivery: inline or uri (auto uri for 1080p/4k). force_new: regenerate even if the identical request ran recently (billed again).

Inputs: prompt (required), task, model, delivery, +8 more.

list_capabilitiesB

Default models, options, output folder and the last update-check summary.

Inputs: no named parameters.

list_voicesA

List TTS voices (your custom voices first, then prebuilt). Free.

search: name/description query. gender: female, male, neutral. language_code: BCP-47 (e.g. tr-TR).

Inputs: limit, gender, search, language_code.

set_default_modelA

Persistently change a default model (models.json; no restart needed).

kind: text, image, video, tts, music, transcribe, embedding, decision, research, research_max, agent. model: new model id. If the free probe says not_found, pass force=true.

Inputs: kind (required), model (required), force.

text_to_speechA

Read text aloud and save a WAV (130+ languages).

text: exact text. For multi-speaker, each line is "Name: text". voice: prebuilt voice (Kore, Puck, Charon, Fenrir, Aoede, Leda, Orus, Zephyr...; see list_voices) or a custom voice id (voice_...). style: delivery direction, e.g. "warm, reassuring, unhurried". language: BCP-47 code (e.g. en-US, tr-TR); auto-detected if empty. speakers: [{"speaker": "Ana", "voice": "Kore"}, {"speaker": "Ben", "voice": "Puck"}].

Inputs: text (required), model, style, voice, +4 more.

transcribe_audioA

Transcribe speech in an audio file (language auto-detected).

path: audio file (mp3, wav, m4a, aac, ogg, flac, opus). For video use gemini_chat. word_timestamps: word-level timings (for subtitles). diarization: separate up to 8 speakers. language_codes: hints, e.g. ["en-US"]. custom_vocabulary: brand/proper names (<=1000 terms). verbatim: keep filler words. save: write the transcript to a .txt and return only its path.

Inputs: path (required), save, model, verbatim, +4 more.

usage_reportB

Summarize recent usage per tool and model (requests, successes, seconds, tokens). No money amounts: your Google Cloud billing is the source of truth.

Inputs: days.

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections.

Loading tool schema changelog…

    TDQS

    B3.4/5.0

    Scored across 25 tools

    Disambiguation4/5

    Most tools target a clearly distinct modality or lifecycle stage (image, video, TTS, music, transcription, embeddings, agents, research), so an agent can usually choose correctly. Minor overlap exists between generic paths like api_call, gemini_chat, and check_job versus the dedicated status/result tools for agents and Deep Research, but descriptions largely resolve it.

    Naming Consistency3/5

    All names use snake_case, which is readable, but the convention mixes verb_noun (generate_image, list_voices, transcribe_audio) with noun_verb or domain-prefixed names (docs_search, agent_status, deep_research_result, api_call). The grouping is understandable, but there is no single predictable pattern across the whole set.

    Tool Count3/5

    At 25 tools the surface is heavy, sitting at the upper boundary of the 16-25 'borderline' range. The breadth of Gemini modalities and agent workflows justifies many tools, but some lifecycle pairs (start/result, status/cancel/files) could potentially be consolidated.

    Completeness4/5

    Coverage is broad: text, image, video, TTS, music, transcription, embeddings, decisions, Deep Research, managed agents, docs, defaults, updates, and usage reporting are all represented. Remaining gaps are minor, such as no explicit cancel operation for media generation jobs and no custom-voice deletion.

    Maintenance

    ActivityMaintained
    ResponsivenessNo recent community issues

    Related MCP Connectors

    Related MCP Servers