Skip to main content
Glama

Gemini Multimodal MCP

CI Release License: MIT

Give Codex or another MCP client a second pair of eyes and ears. Send Gemini two video cuts, a reference image, and a voiceover in the same message. Ask which cut matches the reference, follow up about one timestamp, or branch the conversation to explore a different edit.

This is a local Node.js server for the Model Context Protocol. It keeps conversation history on your machine and sends the selected inputs and history to the Gemini provider you configure.

What you want to do

What to use

Compare several images, recordings, and videos together

gemini_chat accepts mixed attachments in one turn. Each video can have its own sampling rate and clip range.

Transcribe a recording or find a moment in a clip

analyze_audio and analyze_video take a file and an optional question. Without a question, they request a timestamped summary.

Pick up where you left off or try two directions

Name a chat, find it after a restart, or fork it at a particular turn. Independent chats can run concurrently.

Get results in the format your agent needs

Pass the native Gemini request body, including structured output, tools, thinking settings, or response modalities supported by your model.

Quick start

Install Node.js 22 or newer and Git. From PowerShell, bash, or zsh, run:

git clone https://github.com/DDEEII/gemini-multimodal-mcp.git
cd gemini-multimodal-mcp
npm ci
npm run setup
npm run doctor

In setup, press Enter for Google, paste your API key at the hidden prompt, and accept the default model or enter your own. For a Gemini-compatible provider, choose 2 and supply its base URL, authentication method, key, and model. The wizard writes a Git-ignored .gemini-config.json next to package.json. doctor checks the local configuration without contacting the provider or printing the key, host, or configured model ID. Get a Google AI Studio key · Configuration reference

From the same directory, register the server with Codex:

codex mcp add gemini -- node "$PWD/src/index.js"
codex mcp list

Open a fresh Codex chat and try this with the absolute path to one of your own recordings:

Use Gemini to summarize /media/interview.wav. Give me the timestamp of the clearest explanation and quote the speaker.

As a first check without spending API quota, ask Codex to create a Gemini chat named “Interview review” and list its chats. For another MCP client, register node as the stdio command and the absolute path to src/index.js as its only argument. Client configuration examples

Related MCP server: Gemini Omni MCP

A mixed-media conversation

These are example tool arguments. Replace the paths with files on the machine running the MCP server. Windows paths such as C:/media/cut-a.mp4 also work.

1. Compare the material. Call gemini_chat with:

{
  "prompt": "Which cut best matches the reference image and the pacing of the narration? Give two timestamped reasons.",
  "files": [
    { "path": "/media/cut-a.mp4", "fps": 0.5, "start": "10s", "end": "40s" },
    { "path": "/media/cut-b.mp4", "fps": 1, "start": "10s", "end": "40s" },
    "/media/reference.png",
    "/media/narration.wav"
  ]
}

2. Follow up. The reply includes a conversationId, the model, and any usage data supplied by the provider. Send just the new question and that ID to gemini_chat:

{
  "conversationId": "<ID from the previous response>",
  "prompt": "For the stronger cut, give me a three-line edit note for the editor."
}

3. Explore a second direction. Call create_chat with the original ID and throughTurn: 1. The returned ID has its own copy of the first turn, including the media and model context. Continue either conversation independently.

{
  "title": "Alternative opening",
  "fromConversationId": "<original ID>",
  "throughTurn": 1
}

Request structured results

Use generationConfig for native generation fields and request for the rest of the generateContent body. For exact text/media ordering, pass contents with native parts. Each call can select a model. The reasoningLevel shortcut sets thinkingConfig.thinkingLevel for models that support it. Gemini request reference

{
  "prompt": "Describe the main visual change in one sentence.",
  "files": ["/media/before.png", "/media/after.png"],
  "generationConfig": {
    "responseMimeType": "application/json",
    "responseJsonSchema": {
      "type": "object",
      "properties": { "change": { "type": "string" } },
      "required": ["change"]
    }
  },
  "store": false
}

Tools

Tool

Purpose

gemini_chat

Send a multimodal turn, continue a conversation, or make a standalone request with store: false.

create_chat

Start a named chat. Optionally copy an existing conversation through a specified turn.

list_chats

Search by title, ID, or last user preview. Filter active or archived chats and page through matches.

get_chat

Read metadata and recent turn previews. Page back with beforeTurn.

update_chat

Rename, archive, or reopen a conversation.

forget_chat

Permanently remove one local conversation and its stored media.

analyze_video

Ask a one-shot question about a local video or supported public video URL. Accepts fps, start, end, detail, and model.

analyze_audio

Analyze a local audio recording for speech, music, or ambient sound. Accepts an optional prompt and model.

The default connection uses Gemini's native generateContent method. That single endpoint is sufficient for all eight tools. Opting into interactions for specialized analysis adds manage_local_audio and manage_local_video for providers that implement the Gemini Files API. Local files work with Node alone. Instagram video links additionally require yt-dlp. Media formats, API modes, and limits

Where your data goes

  • On disk — Saved chats contain the conversation and attachment bytes as local JSON in ~/.gemini-video-mcp/chats. Set GEMINI_CHAT_DIR to choose another directory. History and connection profiles are stored as plaintext. Keep them in a private location.

  • On the wire — Each chat turn sends its saved history and attachment bytes to the selected endpoint. This lets a follow-up work even after a source file moves, and also means long chats use more bandwidth and model context. The default local limit is 100 MB for the entire encoded request. Provider limits can be lower.

  • One-off use — store: false skips local history for a standalone call. Archiving preserves history. forget_chat deletes the local copy. Provider-side retention follows your provider's terms.

Development and credits

Run npm test after installing dependencies. The suite exercises the MCP stdio protocol against a local HTTP fixture, including mixed-media payloads, authentication, chat branching, concurrent writers, restart recovery, and the private configuration wizard. It uses synthetic media and requires no Gemini key. Contributing

This project builds on Yilcay Birinci's video-analysis server. The original MIT copyright notice is included. Upstream project · MIT license

Available Tools

8 tools
analyze_audioAnalyze a local audio recordingA
Read-only

Ask about speech, music, or ambient sound in a local recording. Omit the prompt for a timestamped summary. Local files are included inline in each generateContent request to the configured provider.

Inputs: path (required), model, prompt.

analyze_videoAnalyze a videoA
Read-only

Ask Gemini about the pictures and audio in a video. Supply an absolute local video path, a public YouTube link, or a public Instagram video post. Omit the prompt for timestamped chapters and visual observations. The reply includes token usage when supplied by the provider. Set fps for fixed sampling or start/end for a time range. Instagram links require yt-dlp. Use gemini_chat to compare several clips in context. Local files are included inline in each generateContent request to the configured provider.

Inputs: url (required), end, fps, mode, +4 more.

create_chatA

Open a named local Gemini chat immediately. Use one chat per topic. Send new messages to its conversationId with gemini_chat. Set fromConversationId to branch. Each call creates a new ID locally, without calling the provider.

Inputs: title, throughTurn, fromConversationId. Returns: model, title, status, createdAt, +6 more

forget_chatDelete a local Gemini chatA
Destructive

Permanently delete one local conversation and its saved media. To keep the history, use update_chat with status archived.

Inputs: conversationId (required). Returns: deleted, conversationId

gemini_chatChat with Gemini using text and mediaA

Send text and multiple videos, images, or audio recordings in one generateContent request. To continue a saved conversation, send only new input with its conversationId. History is stored locally and sent with attachments to the configured provider on each turn.

Inputs: files, model, store, prompt, +8 more.

get_chatA
Read-onlyIdempotent

Inspect the title, status, model, and recent turns in a local Gemini conversation. Use the previews to identify a chat and pass its ID to gemini_chat to continue.

Inputs: conversationId (required), limit, beforeTurn. Returns: model, title, turns, status, +8 more

list_chatsA
Read-onlyIdempotent

Find saved Gemini conversations by topic, including after a restart. Active chats appear most recently updated first. Search with query, inspect ambiguous matches with get_chat, and pass nextOffset as offset for the next page.

Inputs: limit, query, offset, status. Returns: chats, total, nextOffset, unavailableCount

update_chatA
Idempotent

Rename, archive, or reopen a local Gemini conversation. Supply title, status, or both. Its conversationId stays the same.

Inputs: conversationId (required), title, status. Returns: model, title, status, createdAt, +6 more

Tool Schema Changelog

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

Loading tool schema changelog…

    TDQS

    A4.1/5.0

    Scored across 8 tools

    Disambiguation4/5

    The chat lifecycle tools are clearly separated by action, and analyze_audio/analyze_video are distinct from each other. There is some overlap because gemini_chat can also accept audio and video, so an agent may hesitate between the general chat tool and the specialized analyzers, but the descriptions clarify the intended use cases.

    Naming Consistency4/5

    Most tools follow a verb_noun pattern: create_chat, list_chats, get_chat, update_chat, forget_chat, analyze_audio, analyze_video. gemini_chat is the main outlier because it uses a provider prefix and no verb, but the set is still readable and mostly predictable.

    Tool Count5/5

    Eight tools is well-scoped for a chat and multimodal analysis server: chat CRUD, sending messages, and dedicated audio/video analysis. Each tool has a clear role and there is no obvious filler.

    Completeness4/5

    The surface covers create, list, get, update, delete, and continue for local chats, plus audio and video analysis. The main minor gap is the lack of a dedicated image-analysis tool despite the multimodal branding, though gemini_chat can accept images, so core workflows remain workable.

    Maintenance

    ActivityMaintained
    ResponsivenessNo recent community issues

    Related MCP Connectors

    Related MCP Servers