gemini-mcp
Provides tools for using Google's Gemini API capabilities, including text chat, image generation and editing, video generation and extension, speech synthesis, voice design, transcription, music generation, embeddings, decisions, Deep Research, and managed agents.
Click on "Deploy Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@gemini-mcp make a square image of a cozy coffee shop at sunset"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
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=..., ...) → doneNew 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?
A computer with Python installed. On Windows, get it from python.org and tick "Add Python to PATH" during setup.
The Claude Desktop app.
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)
On this page, click the green Code button, then Download ZIP, and unzip it, for example to
Documents\gemini-mcp.Open that folder, type
cmdin the address bar, press Enter, then runpip install -r requirements.txt.In Claude Desktop open Settings → Developer → Edit Config and paste the block from Install below. Put in the real path to
server.pyand your key.Fully quit Claude Desktop (also from the system tray) and open it again.
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_callsends any Interactions API request, so a model released tomorrow works today.check_updatesscans the official changelog for new and deprecated models, probes access for free, and reports newer releases of this server.set_default_modelswitches models without editing code.Cost-safe:
The same paid request within 10 minutes is never billed twice;
force_newoverrides this.Agents require an explicit token budget, with a hard ceiling on top.
usage_reportshows 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 |
|
Images |
|
Video |
|
Speech |
|
Transcription |
|
Music |
|
Agents |
|
Research |
|
Judging & search |
|
Jobs & raw |
|
Maintenance |
|
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.pyConfiguration
Variable | Default | Meaning |
| (required) | Your API key |
|
| Where files are saved ( |
| the repository folder, or | Location of |
|
| Hard ceiling for any agent budget |
|
| Set to |
|
| Set to |
| see | 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_updatesalso compares your version with the latest GitHub release. To update, rungit pull(orpip 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_runneedsmax_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 useagent_cancelto stop a run.Your API key only lives in your MCP client's config or
.env. It is never written to outputs or logs..gitignoreexcludes.env,models.json,data/and outputs.
Development
pip install -e ".[dev]"
ruff check . && pytest -q # fully offline: the Gemini client is fakedContributions 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 toolsagent_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.
docs_searchA
Search the official Gemini API docs (guides, API reference, SDK sources).
language: python, javascript, go, java or dotnet (python saves tokens). scope: guide, sdk, api-reference, type-reference, migration or deprecated. api: interactions (new) or generate-content (classic). limit: 1-50. Read a hit in full with docs_read(chunk_id).
Inputs: query (required), api, limit, scope, +1 more.
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
Scored across 25 tools
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.
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.
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.
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
Related MCP Connectors
Chat, image, video, and audio models from many vendors behind one remote MCP server and one key.
Talk to your public-facing AI from any MCP client — Claude, ChatGPT, Cursor, Cline, Windsurf.
Use AI models for chat, image, and video generation from Claude Code and other MCP hosts.
OCR, transcription, file extraction, and image generation for AI agents via MCP.
Related MCP Servers
- FlicenseNot gradedqualityDmaintenanceBridges Google's Gemini CLI with MCP-compatible clients and integrates OpenRouter API for access to 400+ AI models. Provides 33 specialized tools enabling multi-AI workflows, collaborations, and debates between Claude, Gemini, and other LLMs.141-
- AlicenseNot gradedqualityDmaintenanceA remote MCP connector deployed as a Cloudflare Worker that gives Claude access to Google Gemini models, enabling image generation/editing, model auditing, and large context digesting.1MIT
- FlicenseNot gradedqualityDmaintenanceMCP server that connects Claude Desktop to Google Gemini, enabling multimodal analysis with file attachments (video, image, audio, PDF).-
- AlicenseAqualityCmaintenanceHigh-performance Model Context Protocol (MCP) server connecting Claude Code and AI agents to Google Gemini 3.8 Flash, Gemini 3.1 Pro, reasoning effort, and image generation.11115 npmMIT