Gemini MCP logo

Gemini MCP

Generate, edit, and refine Gemini images, videos, and music through MCP tools.

Install Gemini MCP

Pick your client, then add it in one click or paste the config.

STDIONode.js
~/Library/Application Support/Claude/claude_desktop_config.json
claude_desktop_config.json
{
  "mcpServers": {
    "gemini-mcp-2": {
      "command": "npx",
      "args": [
        "-y",
        "@chrischall/gemini-mcp"
      ],
      "env": {
        "GEMINI_API_KEY": "YOUR_VALUE_HERE"
      }
    }
  }
}

Settings → Developer → Edit Config, merge this into mcpServers, then fully quit and reopen Claude Desktop.

Values are written into the snippet above so you can paste it as is. They never leave your browser.

Install not yet sandbox-tested— we haven't run this command through our automated sandbox yet. Not a red flag; we're working through the catalog.

Overview

gemini-mcp connects MCP clients to Google Gemini media models for image, video, and music generation. It supports single-turn image work, multi-turn refinement through the Interactions API, consistent image sets, asynchronous jobs, and reusable Files API references. Generated media is written to disk by default or returned as base64, with hosted deployments adding signed media URLs and persistent character and style libraries. Reach for it when an agent needs to create or iteratively edit multimedia from prompts and reference files.

Use cases

  • Generate concept images from text prompts
  • Refine an image across multiple editing turns
  • Create consistent image variations from a master
  • Generate short videos from text or still images
  • Produce music clips with Lyria models

Key features

  • Gemini image generation and editing
  • Multi-turn image refinement
  • Video generation with resolution controls
  • Lyria music generation
  • Asynchronous job polling
  • Gemini Files API reference management

Tools17

What Gemini MCP lets your agent do. Expand a tool for its parameters.

Self-reported~711 tokens of context

Security & health

What it can reach and how reliably it runs — from our own checks, not the maintainer’s claims.

ActiveLast checked 1d ago

Recent health check succeeded.

11/11 checks healthy over the last 51d

Supply-chain signal

No high-severity advisories surfaced by our automated scan.

Critical 0High 0Medium 0Low 0

Scanned 10d ago via OSV.dev · @chrischall/gemini-mcp (npm)

Adoption & maintenance

Factual signals from GitHub, npm, and our automated checks — not a rating.

npm downloads4.2kPackage downloads in the last 30 days.
Last commit7d agoMost recent push to the default branch.
Tools exposed17Callable tools this server registers over MCP.

How Gemini MCP works

What gemini-mcp does

gemini-mcp exposes Google Gemini media generation through the Model Context Protocol. Its image tools use the Nano Banana and Nano Banana Pro model families to create images, perform edits, compose multiple references, or produce a master image followed by a consistent set of related images. The server also supports Gemini omni video generation and Lyria music generation.

Image workflows can be single-turn or iterative. gemini_interact uses the Gemini Interactions API and returns an interaction identifier that can be supplied to a later call. This supports progressive refinement without treating each edit as an unrelated request.

Results are normally saved to disk, with the resulting path returned to the client. Calls can instead return media inline as base64. Long-running generations can be started asynchronously and retrieved later by job ID.

How it works

The server communicates with the Gemini v1beta API at generativelanguage.googleapis.com. Image generation and editing accept text prompts and, where applicable, image references. Reference images can be supplied as URLs, base64 data, local paths, or uploaded files/<id> references. Uploaded Gemini Files API objects can be listed and deleted, and their roughly 48-hour lifetime makes them suitable for temporary reuse.

For iterative calls, pass the prior interaction_id as previous_interaction_id, or use continue_last: true. The server can retry temporary visibility delays for chained interactions and can recover a chain from sidecar metadata saved with an output image. A call using async: true returns a job_id; use gemini_get_result until the job reaches done.

Video output is written as MP4. Music output is written as MP3. Video generation supports text-to-video, image-to-video, two-still interpolation, editing, and extension. Resolution options include 360p, 720p, 1080p, and 4K. Music generation uses a Lyria model and is single-turn.

Setup and configuration

Set GEMINI_API_KEY to a Google Gemini API key. Optional variables select the default image model, output and input directories, local-file restrictions, request timeouts, progress heartbeat frequency, and interaction-chain retry duration.

GEMINI_OUTPUT_DIR defaults to ~/Downloads/gemini-mcp. GEMINI_INPUT_DIR lets bare input filenames resolve against a chosen directory. GEMINI_UPLOAD_DIR and GEMINI_REFERENCE_DIR restrict which local files may be sent to Google; reference files in the output directory remain allowed.

The server asks for confirmation before sending local files to Google and before deletions. MCP_CONFIRM_MODE, MCP_CONFIRM_ELICITATION, MCP_CONFIRM_TTL_SECONDS, and MCP_CONFIRM_SECRET control confirmation behavior, token lifetime, and token persistence. Pure text prompts, URLs, Files API references, and base64 inputs do not require this confirmation.

Tools and capabilities

  • List available image models and identify the current default.
  • Generate, edit, and compose images from prompts and references.
  • Create a master image and consistent follow-up images.
  • Refine images across multiple Interactions API turns.
  • Generate short videos with the Gemini omni model.
  • Generate Lyria music clips or full-length music, depending on the selected model.
  • Upload, list, and delete reusable Gemini Files API references.
  • Poll asynchronous jobs and estimate session token usage and cost.
  • In hosted deployments, sign generated media URLs, view generated images inline, and maintain named character and style presets.

Limitations and notes

The Gemini API key is required, and media generation can exceed an MCP client's tool-call timeout. Progress heartbeats may help hosts that reset their timeout, while asynchronous jobs avoid waiting for the generation inside the original call. An idempotency key can make retries return the recorded result instead of charging for a second generation.

Hosted-only capabilities include signed media access, inline media viewing, upload URLs, persistent character libraries, and persistent style presets. Local file paths are subject to the configured directory restrictions, and uploaded Files API references expire after approximately 48 hours. Token usage reports estimate cost from a dated rate card; GEMINI_RATE_CARD can override that rate card.

Reviews

No reviews yet — be the first to share how it worked for you.

Frequently Asked Questions about Gemini MCP

gemini-mcp is an MCP server that connects AI clients to Google Gemini media models. Its main tools generate and edit images, refine image interactions, create videos and music, manage uploaded Files API references, and poll asynchronous jobs. Results are saved to disk by default or returned inline as base64.

Configure the server in an MCP client and provide a Google Gemini API key through `GEMINI_API_KEY`. The server communicates with Google Gemini over stdio and uses the key for media generation and Files API operations.

Call `gemini_image_generate` with a text prompt. The generated image is written to the configured output directory by default, and the returned path identifies the file; the call can also return base64 output.

Use `gemini_interact` and pass the returned `interaction_id` as `previous_interaction_id` on the next call. You can also set `continue_last: true` to continue the most recent interaction, including one recovered from output sidecar metadata.

Set `async: true` on a generation tool and poll `gemini_get_result` with its returned `job_id`. Progress heartbeats and configurable timeouts are also available, while `idempotency_key` prevents a retry from creating a second billed generation.

Related MCP servers

Add a badge to your READMEShow it’s listed — live SVG, Markdown or HTML.

AllMCPs Directory Badge

Full Badge Customizer

Showcase your server listing on GitHub or your project documentation. Embed this dynamic SVG badge to highlight official listing status and live engagement.

Badge Style:
Live Dynamic SVG PreviewGemini MCP AllMCPs Directory Badge
Markdown (GitHub README)
[![AllMCPs](https://allmcps.com/api/badge/gemini-mcp-2?style=directory)](https://allmcps.com/mcp/gemini-mcp-2)
HTML Embed
<a href="https://allmcps.com/mcp/gemini-mcp-2"><img src="https://allmcps.com/api/badge/gemini-mcp-2?style=directory" alt="Gemini MCP on AllMCPs" /></a>