Unified Go MCP server for AI media generation via Google Gemini API and Vertex AI
- ✓Open-source license (Apache-2.0)
- ✓Actively maintained (<30d)
- ✓Clear description
- ✓Documented (README)
- !Install pipes a remote script into a shell (curl | sh)
claude mcp add gemini-media-mcp -- npx -y skills{
"mcpServers": {
"gemini-media-mcp": {
"command": "npx",
"args": ["-y", "skills"],
"env": {
"GEMINI_API_KEY": "<gemini_api_key>"
}
}
}
}GEMINI_API_KEYMCP Servers overview
# gemini-media-mcp
[](https://github.com/mordor-forge/gemini-media-mcp/actions/workflows/ci.yml)
[](https://go.dev)
[](LICENSE)
An MCP server for Google's generative media models: **images** (Nano Banana 2.1 / Pro), **video** (Veo 3.1 and Gemini Omni Flash), **speech** (Gemini 3.8 TTS) and **music** (Lyria 3.5). It ships as a single Go binary, speaks **stdio and Streamable HTTP** (MCP 2026-07-28), works with the **Gemini API or Vertex AI**, and comes with **agent skills** that teach agents the whole workflow, plus plugin packaging for Claude Code, Codex, Gemini CLI, VS Code/Copilot, Cursor and more.
- **Current models, updated without a release.** A built-in catalog records IDs, aliases, lifecycle, parameters and prices. Retired models redirect to their replacement, and new model IDs work before the catalog knows them. You can override or extend the catalog with a hot-reloaded YAML file.
- **Cost-aware.** Every result reports its estimated cost, and `estimate_cost` compares options before you spend. Spend is recorded in a ledger, capped by session, daily and monthly budgets, and calls above a threshold need explicit approval.
- **Agent-friendly.** Each tool matches a workflow, and errors come back as `[kind] message + Hint`. Image results include inline previews, and outputs can be chained by URI. Video runs as async jobs with long-polling and progress notifications.
- **Skills included.** Six [agent skills](#skills) cover each medium, multi-asset productions and **upscaling past 4K**. The upscale skill re-renders a photo tile by tile and stitches the tiles into an 8K image.
- **Robust.** Backend and credentials are detected the way the Google SDKs do it. Vertex locations are chosen per model, retries and timeouts are built in, files are written atomically with provenance, and HTTP mode ships with security defaults.
> Upgrading from v0? The tools changed. See the [migration table](docs/architecture-review.md#4-migration-from-v0). The review also covers what was broken, why, and the design of v1.
## Quick start
1. **Get credentials.** Either:
- an API key from [Google AI Studio](https://aistudio.google.com/apikey) (`GEMINI_API_KEY`), or
- a Google Cloud project with Vertex AI enabled (`GOOGLE_CLOUD_PROJECT` plus `gcloud auth application-default login`).
2. **Install the binary.** On macOS or Linux:
```bash
mkdir -p ~/.local/bin # must be on your PATH
os=$(uname -s | tr '[:upper:]' '[:lower:]'); arch=$(uname -m | sed 's/x86_64/x64/; s/aarch64/arm64/')
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
gemini-media-mcp version
```
On Windows, download the `windows` zip from the [latest release](https://github.com/mordor-forge/gemini-media-mcp/releases/latest) and put `gemini-media-mcp.exe` on your PATH. With Go 1.26+: `go install github.com/mordor-forge/gemini-media-mcp/cmd/gemini-media-mcp@latest`.
The Gemini CLI extension, the Claude Desktop bundle and the Docker image include the binary, so they skip this step.
3. **Add the server to your agent.** Every config below runs `gemini-media-mcp` from your PATH.
**Claude Code** (plugin: server plus skills):
```
/plugin marketplace add mordor-forge/gemini-media-mcp
/plugin install gemini-media@mordor-forge
```
or just the server: `claude mcp add gemini-media -e GEMINI_API_KEY=... -- gemini-media-mcp`
**Codex** (`~/.codex/config.toml`):
```toml
[mcp_servers.gemini-media]
command = "gemini-media-mcp"
env_vars = ["GEMINI_API_KEY", "GOOGLE_API_KEY", "GOOGLE_CLOUD_PROJECT", "GOOGLE_CLOUD_LOCATION"]
tool_timeout_sec = 300 # 4K images and video polls can exceed the 60 s default
```
**Gemini CLI** (paid API keys, Vertex AI and Gemini Code Assist only, since June 2026): `gemini extensions install https://github.com/mordor-forge/gemini-media-mcp`
**Antigravity CLI:** add the server to `~/.gemini/config/mcp_config.json`, as shown in the [install snippets](packaging/INSTALL-SNIPPETS.md#antigravity-cli).
**Claude Desktop:** download `gemini-media-mcp-<version>.mcpb` from the [latest release](https://github.com/mordor-forge/gemini-media-mcp/releases/latest) and open it.
**VS Code / Copilot:** `code --add-mcp '{"name":"gemini-media","command":"gemini-media-mcp"}'`
**Cursor, Windsurf and other `mcpServers`-style clients** (Zed, OpenCode and Goose use their own formats, see below):
```json
{ "mcpServers": { "gemini-media": { "command": "gemini-media-mcp", "env": { "GEMINI_API_KEY": "..." } } } }
```
If a desktop app reports that `gemini-media-mcp` was not found, it doesn't see your shell's PATH: use the full path from `command -v gemini-media-mcp`. Every client, plus Docker and the skills installer, is covered in [packaging/INSTALL-SNIPPETS.md](packaging/INSTALL-SNIPPETS.md).
4. **If your agent doesn't forward environment variables** (plugins often don't), store the key once:
```bash
echo "$GEMINI_API_KEY" | gemini-media-mcp configure --api-key-stdin
gemini-media-mcp doctor # checks credentials, backend and model availability
```
To run it in Docker instead: `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`
(`--user` makes the generated files yours on Linux; the named `/state` volume keeps spend accounting and video jobs between runs).
## Tools
| Tool | What it does |
|---|---|
| `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 |
Every result includes the saved file's path, a `gemini-media://files/<name>` URI and its cost. You can pass the URI as an input to another tool. Clients that can't read the server's disk (for example over HTTP) can fetch the file with `resources/read`, for files up to 64 MB (larger upscales stay on the server's disk).
## Skills
The [`skills/`](skills) directory contains [Agent Skills](https://agentskills.io) that teach agents the full workflow for each media type: intent, prompt craft, model choice, cost checks, review and iteration. They cover interactive use as well as unattended runs.
| Skill | For |
|---|---|
| `gemini-image` | Images: generation, editing, multi-reference composition, text rendering |
| `gemini-video` | Video: text/image-to-video, frame interpolation, reference ingredients, Omni editing, extension, async jobs |
| `gemini-speech` | Voiceovers, narration, two-speaker dialogue, voice and style selection |
| `gemini-music` | Clips and full songs with structure, lyrics and tempo |
| `gemini-media-production` | Multi-asset projects (storyboard → keyframes → video → voiceover → music → ffmpeg assembly) with a budget plan |
| `gemini-upscale` | Upscaling photos to 1K, 2K, 4K or 8K: one tile up to 4K, a grid of 4K tiles stitched together beyond that, with an optional fix pass for defects such as mismatched eyes. About $0.04 at 1K to $0.50–1.20 at 8K. It invents plausible detail rather than recovering it, so it is not for forensic or archival use |
Plugin installs (Claude Code, Codex, Gemini CLI, VS Code) include the skills. To install them in any Agent Skills–compatible agent, run `npx skills add mordor-forge/gemini-media-mcp`, or copy the folders into `.agents/skills/` or `~/.claude/skills/`.
## Models
Use an alias or a full model ID. Run `gemini-media-mcp models` for the built-in catalog with prices, or call `list_models`, which also applies your override file and, with `live: true`, checks what your key can use.
| Media | Aliases (default first) |
|---|---|
| Image | `nb2` (Nano Banana 2.1, default), `pro` (Nano Banana Pro: highest fidelity), `nb2-lite` (cheapest inputs) |
| Video | `omni` (Gemini Omni Flash, default on the Gemini API: prompt adherence, editing, extension to 40 s; Gemini API only), `lite` (cheapest Veo, default on Vertex AI), `fast` (Veo 4K, references, extension), `standWhat people ask about gemini-media-mcp
What is mordor-forge/gemini-media-mcp?
+
mordor-forge/gemini-media-mcp is mcp servers for the Claude AI ecosystem. Unified Go MCP server for AI media generation via Google Gemini API and Vertex AI It has 9 GitHub stars and its last recorded update is dated 2026-10-12.
How do I install gemini-media-mcp?
+
You can install gemini-media-mcp by cloning the repository (https://github.com/mordor-forge/gemini-media-mcp) or following the README instructions on GitHub. ClaudeWave also provides quick install blocks on this page.
Is mordor-forge/gemini-media-mcp safe to use?
+
Our security agent has analyzed mordor-forge/gemini-media-mcp and assigned a Trust Score of 79/100 (tier: Trusted). See the full breakdown of passed checks and flags on this page.
Who maintains mordor-forge/gemini-media-mcp?
+
mordor-forge/gemini-media-mcp is maintained by mordor-forge. The last recorded GitHub activity is dated 2026-10-12, with 0 open issues.
Are there alternatives to gemini-media-mcp?
+
Yes. On ClaudeWave you can browse similar mcp servers at /categories/mcp, sorted by popularity or recent activity.
Deploy gemini-media-mcp to your cloud
Ship this repo to production in minutes. Each platform spins up its own environment with editable env vars.
Maintain this repo? Add a badge to your README
Drop the badge into your GitHub README to show it's tracked on ClaudeWave. Each badge links back to this page and reflects the live Trust Score.
[](https://claudewave.com/repo/mordor-forge-gemini-media-mcp)<a href="https://claudewave.com/repo/mordor-forge-gemini-media-mcp"><img src="https://claudewave.com/api/badge/mordor-forge-gemini-media-mcp" alt="Featured on ClaudeWave: mordor-forge/gemini-media-mcp" width="320" height="64" /></a>More MCP Servers
Reverse engineer anything with agents, from app behavior down to native binaries.
Fair-code workflow automation platform with native AI capabilities. Combine visual building with custom code, self-host or cloud, 400+ integrations.
User-friendly AI Interface (Supports Ollama, OpenAI API, ...)
An open-source AI agent that brings the power of Gemini directly into your terminal.
Real-time global intelligence dashboard. AI-powered news aggregation, geopolitical monitoring, and infrastructure tracking in a unified situational awareness interface
🕷️ An adaptive Web Scraping framework that handles everything from a single request to a full-scale crawl! Don't be shy, join here: https://discord.gg/EMgGbDceNQ and follow here for daily tips and tricks: https://x.com/Scrapling_dev