Gemini Omni MCP

Gemini Omni MCP

FastMCP server for Google's gemini-omni-flash-preview video model, enabling text-to-video, image-to-video, and video editing with stateful interactions and batch generation.

Category
访问服务器

README

Gemini Omni MCP Banner

Gemini Omni MCP

MCP server for Google's Gemini Omni Flash video model — text-to-video, image-to-video, reference-guided video, and conversational video editing with native audio, straight from your AI agent.

PyPI version Python 3.11+ License: MIT


Setup

Get a Gemini API key from Google AI Studio, then add the server to your MCP config.

Claude Desktop / Claude Code / Cursor

Add to your MCP config (mcp.json / .claude.json / claude_desktop_config.json):

{
  "mcpServers": {
    "gemini-omni": {
      "command": "uvx",
      "args": ["gemini-omni-mcp@latest"],
      "env": {
        "GEMINI_API_KEY": "your-api-key-here"
      }
    }
  }
}

Droid CLI

droid mcp add gemini-omni "uvx gemini-omni-mcp@latest" --env GEMINI_API_KEY=your-api-key-here

Generated MP4s are saved to ~/gemini_omni_videos by default (set OUTPUT_DIR to change).


Features

  • Text-to-video: prompt-only MP4 generation with generated audio (music, ambience, SFX)
  • Image-to-video: animate a single reference image with motion and camera direction
  • Reference-to-video: up to 6 reference images to lock subjects, style, or props
  • Conversational editing: iterate on a generated video via previous_interaction_id, or upload your own MP4 and edit it
  • Prompt role tags: <FIRST_FRAME> and <IMAGE_REF_N> bind reference images to roles
  • Timing cues: [0-3s], [3-6s], [6-10s] direct the action beat by beat
  • Batch generation: run multiple prompts in conservative parallel batches (max 4)
  • URI or inline delivery: robust Files API polling and download built in

Output is 720p 24fps MP4 with SynthID watermarking (preview-quality model).


Showcase

All videos below were generated by this server with gemini-omni-flash-preview, sound on.

Corgi on a hoverboard

A corgi wearing tiny goggles rides a glowing hoverboard through a neon-lit Tokyo street at night, rain reflections on the pavement, camera tracking alongside, single continuous shot, cinematic lighting, upbeat synthwave music.

https://github.com/user-attachments/assets/4b9a8e87-7db0-469d-a261-3c354f7fe9b8

Astronaut latte art

An astronaut in a white spacesuit pours latte art into a floating cup inside a cozy moon-base cafe, Earth visible through a large window, steam swirling in low gravity, slow dolly-in, warm lighting, gentle ambient cafe sounds.

https://github.com/user-attachments/assets/88072ef8-1ce4-4c80-a05a-bfb5531d1271

Origami ocean

An origami paper whale swims gracefully through a stylized paper-craft ocean, paper waves folding and unfolding, paper seagulls gliding above, soft sunlight, camera slowly orbiting, calm orchestral score.

https://github.com/user-attachments/assets/c1e31341-e53c-4a55-af12-d6bb9432dcf5


Tools

generate_video

Generates or edits one MP4 and returns JSON with video.path, interaction_id, and metadata.

Argument Type Description
prompt string Scene, motion, camera, lighting, mood, and audio direction
task string? text_to_video, image_to_video, reference_to_video, or edit. Inferred if omitted
aspect_ratio string? 16:9 (default) or 9:16
duration_seconds int? Optional preview field, 3 to 10
reference_image_paths list? Up to 6 local image paths
input_video_path string? Local MP4 to upload and edit
delivery string? uri (default, recommended) or inline
previous_interaction_id string? Continue editing a generated video
enhance_prompt bool? Optional LLM prompt enhancement, default false

batch_generate

Runs multiple prompts in parallel batches, capped at 4.

Argument Type Description
prompts list One prompt per video
task, aspect_ratio, duration_seconds, reference_image_paths, delivery, enhance_prompt Shared across the batch, same semantics as generate_video
batch_size int? Parallelism, capped at MAX_BATCH_SIZE

Configuration

Everything is configured through environment variables (or a local .env):

Variable Default Description
GEMINI_API_KEY Required. GOOGLE_API_KEY also accepted
OUTPUT_DIR ~/gemini_omni_videos Where generated MP4s are saved
DEFAULT_ASPECT_RATIO 16:9 16:9 or 9:16
DEFAULT_DELIVERY uri uri or inline
DEFAULT_DURATION_SECONDS unset Optional 3-10s target
REQUEST_TIMEOUT 300 Generation timeout in seconds
FILE_POLL_INTERVAL 5.0 Seconds between Files API polls
FILE_POLL_TIMEOUT 600 Max seconds waiting for file activation
MAX_BATCH_SIZE 4 Max parallel generations
ENABLE_PROMPT_ENHANCEMENT false LLM-enhance prompts before generation
LOG_LEVEL INFO Logging level

Prompting tips

  • Ask for a "single continuous shot" and "no scene cuts" for one-scene outputs.
  • Always include audio direction, for example "gentle ambient sound, no dialogue".
  • For edits, keep the prompt short and add "Keep everything else the same".
  • Use <FIRST_FRAME> and <IMAGE_REF_N> tags to bind reference-image roles.
  • Timing cues like [0-3s], [3-6s], and [6-10s] work well.

Limitations

  • Preview model: 720p, 24fps, MP4 only, SynthID-watermarked.
  • System instructions, temperature, negative prompts, voice edits, YouTube sources, and multi-video reasoning are unsupported.
  • Uploaded-video editing is unavailable in some regions.

Development

git clone https://github.com/nikships/gemini-omni-mcp
cd gemini-omni-mcp
uv sync --all-extras
uv run ruff format .
uv run ruff check .
uv run mypy gemini_omni_mcp/
uv run pytest
uv build

Releases are automated: every push to main bumps the version and publishes to PyPI (see PUBLISHING.md).

License

Gemini Omni MCP is licensed under the MIT license. See LICENSE for details.

推荐服务器

Baidu Map

Baidu Map

百度地图核心API现已全面兼容MCP协议,是国内首家兼容MCP协议的地图服务商。

官方
精选
JavaScript
Playwright MCP Server

Playwright MCP Server

一个模型上下文协议服务器,它使大型语言模型能够通过结构化的可访问性快照与网页进行交互,而无需视觉模型或屏幕截图。

官方
精选
TypeScript
Magic Component Platform (MCP)

Magic Component Platform (MCP)

一个由人工智能驱动的工具,可以从自然语言描述生成现代化的用户界面组件,并与流行的集成开发环境(IDE)集成,从而简化用户界面开发流程。

官方
精选
本地
TypeScript
Audiense Insights MCP Server

Audiense Insights MCP Server

通过模型上下文协议启用与 Audiense Insights 账户的交互,从而促进营销洞察和受众数据的提取和分析,包括人口统计信息、行为和影响者互动。

官方
精选
本地
TypeScript
VeyraX

VeyraX

一个单一的 MCP 工具,连接你所有喜爱的工具:Gmail、日历以及其他 40 多个工具。

官方
精选
本地
graphlit-mcp-server

graphlit-mcp-server

模型上下文协议 (MCP) 服务器实现了 MCP 客户端与 Graphlit 服务之间的集成。 除了网络爬取之外,还可以将任何内容(从 Slack 到 Gmail 再到播客订阅源)导入到 Graphlit 项目中,然后从 MCP 客户端检索相关内容。

官方
精选
TypeScript
Kagi MCP Server

Kagi MCP Server

一个 MCP 服务器,集成了 Kagi 搜索功能和 Claude AI,使 Claude 能够在回答需要最新信息的问题时执行实时网络搜索。

官方
精选
Python
e2b-mcp-server

e2b-mcp-server

使用 MCP 通过 e2b 运行代码。

官方
精选
Neon MCP Server

Neon MCP Server

用于与 Neon 管理 API 和数据库交互的 MCP 服务器

官方
精选
Exa MCP Server

Exa MCP Server

模型上下文协议(MCP)服务器允许像 Claude 这样的 AI 助手使用 Exa AI 搜索 API 进行网络搜索。这种设置允许 AI 模型以安全和受控的方式获取实时的网络信息。

官方
精选