# mordor-forge/gemini-media-mcp [Health: Active]

**Category:** 🎥 Multimedia Process  
**Repository:** https://github.com/mordor-forge/gemini-media-mcp  
**GitHub Stars:** 14  
**Views:** 5  
**Installs:** 0  
**Upvotes:** 0  
**Directory Page:** https://allmcps.com/mcp/mordor-forge-gemini-media-mcp

## Description
Unified Gemini media generation: Nano Banana (images, editing, multi-reference composition), Veo 3.1 (video, image-to-video, extend), TTS, and Lyria 3 (music with vocals). Single Go binary, 12 tools, supports Gemini API key and Vertex AI.

## Tools
Capabilities this server exposes over MCP:

- **generate_image** — Text-to-image with up to 14 reference images, 1K–4K, many aspect ratios, 1–4 variations, optional Google Search grounding
- **edit_image** — Change an existing image (add/remove/restyle/relight/outpaint) while keeping the rest
- **tile_image** — Step 1 of an upscale to any target size (1K–16K): plan the cheapest crops that cover it, shaped to the edit model's aspect ratios (one tile up to about 4K, a grid beyond, or regions such as faces). Free and local
- **stitch_tiles** — Align the edited tiles with the image, match their color, blend the overlaps and save one large PNG (8K by default). Free and local
- **generate_video** — Clip with native audio from text, a first frame, first+last frames, or reference images: Veo (4–8 s, up to 3 references) or Gemini Omni Flash (`omni`: 3–10 s, 360p drafts to 4K, up to 10 references). Returns a `jobId
- **get_video** — Wait for a job (long-poll, default 45 s); downloads the video when done. Safe to repeat
- **extend_video** — Continue a finished clip: Omni adds up to 10 s (40 s total), Veo about 7 s (up to 148 s total)
- **edit_video** — Change a finished clip or a video file of up to 10 s with an instruction (Gemini Omni)
- **generate_speech** — Text-to-speech (WAV): one voice, or a two-speaker dialogue, with per-line style control and 30 voices
- **generate_music** — 30-second clips or full songs with lyrics, structure tags, tempo, instrumental mode and image inspiration
- **list_models** — Current models, aliases, status, prices; `detail` for supported parameters, `live` to check what your key can use
- **estimate_cost** — Price a request before running it and compare models
- **get_usage** — Estimated spend by period, model and tool; budgets remaining; running jobs
- **get_config** — Active backend and why it was chosen, output directory, defaults, warnings

## Claude Desktop Quick Installation
No generated config for this server: it installs through its own setup steps.

The project's own setup steps (from https://github.com/mordor-forge/gemini-media-mcp), copied verbatim. Follow them in order; they are not an mcpServers config.

1. Install:

```sh
mkdir -p ~/.local/bin   # must be on your PATH
```

2. Install:

```sh
curl -fsSL "https://github.com/mordor-forge/gemini-media-mcp/releases/latest/download/$os.$arch.gemini-media-mcp.tar.gz" \
     | tar -xz -C ~/.local/bin gemini-media-mcp
```

3. Add to Claude Code:

```sh
claude mcp add gemini-media -e GEMINI_API_KEY=... -- gemini-media-mcp
```

4. Add to VS Code:

```sh
code --add-mcp '{"name":"gemini-media","command":"gemini-media-mcp"}'
```

5. Check the setup:

```sh
gemini-media-mcp doctor   # checks credentials, backend and model availability
```

6. Start the server:

```sh
docker run -i --rm --user "$(id -u):$(id -g)" -e GEMINI_API_KEY -v "$PWD/media:/output" -v gemini-media-state:/state ghcr.io/mordor-forge/gemini-media-mcp
```

## Documentation

## What mordor-forge/gemini-media-mcp does

The mordor-forge/gemini-media-mcp MCP server connects agents to Google's generative media models for image, video, speech, and music work. It packages the functionality as a single Go binary and exposes 12 tools over MCP. The server can use a Gemini API key or Vertex AI credentials, making it suitable for local agent clients and HTTP deployments.

Image workflows include text-to-image generation with reference images, image edits such as restyling or relighting, and a two-step upscale process. `tile_image` plans crops locally, while `stitch_tiles` aligns edited tiles, matches color, blends overlaps, and writes a larger PNG. Video tools cover generation, job polling, extension, and edits to clips of up to 10 seconds. Speech generation produces WAV files with either one voice or a two-speaker dialogue. Music generation supports short clips or complete songs with lyrics, structure tags, tempo, instrumental mode, and image inspiration.

## How it works

The mordor-forge/gemini-media-mcp MCP server returns saved output paths, `gemini-media://files/<name>` URIs, and estimated cost information. A URI from one result can be supplied to another tool, which supports chained production workflows. Clients that can access MCP resources can fetch generated files through `resources/read`; files larger than 64 MB remain on the server's disk.

Video generation is asynchronous. `generate_video` returns a job ID, and `get_video` waits for completion with long polling, using a 45-second default interval. Repeating the retrieval is supported. The server also reports progress notifications, includes retries and timeouts, writes files atomically with provenance, and detects the backend and credentials using Google SDK conventions.

Model and spending information is available through `list_models`, `estimate_cost`, and `get_usage`. The model catalog contains IDs, aliases, lifecycle information, parameters, and prices. A YAML catalog can be overridden or extended and is hot-reloaded. Session, daily, and monthly budgets can limit spending, while requests above a configured threshold can require approval.

## Setup and configuration

Install the binary from a release on macOS, Linux, or Windows, install it with Go 1.26 or later, or use the supplied Docker image. The Claude Desktop bundle and Gemini CLI extension include the binary. Configure either `GEMINI_API_KEY` for Google AI Studio or Vertex AI with `GOOGLE_CLOUD_PROJECT` and Google Application Default Credentials. `GOOGLE_API_KEY` and `GOOGLE_CLOUD_LOCATION` are also supported in client environment configuration.

The server works with stdio and Streamable HTTP. Client-specific installation instructions are provided for Claude Desktop, Claude Code, Codex, Gemini CLI, VS Code/Copilot, Cursor, and Windsurf. If a desktop client cannot find the executable, configure its full filesystem path. The `configure --api-key-stdin` command can store an API key when a client does not forward environment variables, and `doctor` checks credentials, backend selection, and model availability.

## Tools and capabilities

- Generate images with up to 14 references, multiple aspect ratios, 1K–4K output, variations, and optional Google Search grounding.
- Edit images while preserving unaffected content, or plan and assemble tiled upscales up to 16K targets.
- Generate Veo or Gemini Omni Flash video from text, frames, or references, then poll, extend, or edit the result.
- Produce 30-voice speech output and music with lyrics, structure, tempo, or instrumental settings.
- Inspect model availability, estimate prices, review usage, and inspect active configuration.

## Limitations and notes

Model capabilities and limits vary by backend and selected model. Veo clips are 4–8 seconds, while Gemini Omni Flash supports 3–10 seconds and up to 4K output according to the tool description. Omni extensions add up to 10 seconds, and Veo extensions add about 7 seconds. Video generation and retrieval require handling asynchronous jobs.

The server depends on Google model access, valid credentials, and the applicable model availability or pricing. HTTP deployments should account for file access and authentication in the surrounding environment. Large upscale outputs may stay on the server rather than being readable through MCP resources. The project is licensed under Apache-2.0.

_Full upstream README: https://allmcps.com/mcp/mordor-forge-gemini-media-mcp/readme_

