Skip to content

MCP Servers for Genmedia x Gemini CLI

Use the MCP Servers for Genmedia with the Gemini CLI (launch announcement blog post)

geminicli x genmedia mcp (full video)

To install these MCP servers, please see Installation.

To configure these servers for gemini cli, you can either add these to your ~/.gemini/settings.json (see Configuration) or create an Extension (preferred, Extensions).

Existing Users: If you have previously installed the GenMedia extension using the older JSON format, please see the Migration Guide for quick instructions on upgrading to the new interactive setup.

.gemini/settings.json: Global Tool Timeout

Section titled “.gemini/settings.json: Global Tool Timeout”

If you intend to use long-running tools like Veo (which takes minutes to generate video) or complex Gemini TTS prompts, you MUST increase the global tool execution timeout in your ~/.gemini/settings.json file.

The MCP_REQUEST_MAX_TOTAL_TIMEOUT environment variable controls the wait time for a specific server, but the Gemini CLI itself has a hard global timeout that will kill the connection if not adjusted.

Add the toolExecutionTimeout (in milliseconds) to the experimental or general block:

{
"experimental": {
"enableAgents": true,
"toolExecutionTimeout": 240000
}
}

Add the following to your .gemini/settings.json mcpServers - you can do this at your ~/.gemini or per project directory.

A sample_settings.json is provided for your convenience.

{
"mcpServers": {
"veo": {
"command": "mcp-veo-go",
"env": {
"MCP_REQUEST_MAX_TOTAL_TIMEOUT": "240000",
"MCP_SERVER_REQUEST_TIMEOUT": "30000",
"GENMEDIA_BUCKET": "YOUR_GOOGLE_CLOUD_STORAGE_BUCKET",
"PROJECT_ID": "YOUR_GOOGLE_CLOUD_PROJECT_ID"
}
},
"imagen": {
"command": "mcp-imagen-go",
"env": {
"MCP_SERVER_REQUEST_TIMEOUT": "55000",
"GENMEDIA_BUCKET": "YOUR_GOOGLE_CLOUD_STORAGE_BUCKET",
"PROJECT_ID": "YOUR_GOOGLE_CLOUD_PROJECT_ID"
}
},
"chirp3-hd": {
"command": "mcp-chirp3-go",
"env": {
"MCP_SERVER_REQUEST_TIMEOUT": "55000",
"GENMEDIA_BUCKET": "YOUR_GOOGLE_CLOUD_STORAGE_BUCKET",
"PROJECT_ID": "YOUR_GOOGLE_CLOUD_PROJECT_ID"
}
},
"lyria": {
"command": "mcp-lyria-go",
"env": {
"GENMEDIA_BUCKET": "YOUR_GOOGLE_CLOUD_STORAGE_BUCKET",
"PROJECT_ID": "YOUR_GOOGLE_CLOUD_PROJECT_ID",
"MCP_SERVER_REQUEST_TIMEOUT": "55000"
}
},
"avtool": {
"command": "mcp-avtool-go",
"env": {
"PROJECT_ID": "YOUR_GOOGLE_CLOUD_PROJECT_ID",
"MCP_SERVER_REQUEST_TIMEOUT": "55000"
}
},
"gemini": {
"command": "mcp-gemini-go",
"env": {
"PROJECT_ID": "YOUR_GOOGLE_CLOUD_PROJECT_ID",
"MCP_REQUEST_MAX_TOTAL_TIMEOUT": "120000",
"MCP_SERVER_REQUEST_TIMEOUT": "55000"
}
}
}
}

Please note, you can add "trust": true to any of the MCP Servers to allow trusting the MCP server and its tools to bypass confirmations. See the Configuration docs.

If you are running a local OpenTelemetry (OTel) collector for tracing, you may need to configure the MCP servers to send traces to it using an insecure connection. You can do this by adding the OTEL_EXPORTER_OTLP_INSECURE environment variable to your mcpServers configuration in settings.json or your gemini-extension.json file.

Here is an example of how to configure the veo server to use an insecure connection:

{
"mcpServers": {
"veo": {
"command": "mcp-veo-go",
"env": {
"OTEL_EXPORTER_OTLP_INSECURE": "true",
"MCP_REQUEST_MAX_TOTAL_TIMEOUT": "240000",
"MCP_SERVER_REQUEST_TIMEOUT": "30000",
"GENMEDIA_BUCKET": "YOUR_GOOGLE_CLOUD_STORAGE_BUCKET",
"PROJECT_ID": "YOUR_GOOGLE_CLOUD_PROJECT_ID"
}
}
}
}

When this variable is set to "true", the MCP server will connect to the OTel collector without using TLS. This is useful for local development, but should not be used in production.

.gemini/extensions/google-genmedia Extension

Section titled “.gemini/extensions/google-genmedia Extension”

Extensions are the way to extend the gemini cli capabilities and bundle MCP servers.

First, create a directory for your extension - this can be at the home directory level (below), or per project directory.

Terminal window
mkdir -p ~/.gemini/extensions/google-genmedia-extension/

A sample_extensions directory is provided for your convenience.

Then, add to that directory a gemini-extension.json

{
"name": "google-genmedia",
"version": "1.0.0",
"settings": [
{
"name": "Google Cloud Project ID",
"description": "The GCP Project ID where Vertex AI is enabled.",
"envVar": "PROJECT_ID",
"sensitive": false
},
{
"name": "GenMedia GCS Bucket",
"description": "The GCS bucket URI (gs://your-bucket) to save generated media.",
"envVar": "GENMEDIA_BUCKET",
"sensitive": false
}
],
"mcpServers": {
"veo": {
"command": "mcp-veo-go",
"env": {
"MCP_REQUEST_MAX_TOTAL_TIMEOUT": "240000",
"MCP_SERVER_REQUEST_TIMEOUT": "30000"
}
},
"nanobanana": {
"command": "mcp-nanobanana-go",
"env": {
"MCP_SERVER_REQUEST_TIMEOUT": "55000"
}
},
"chirp3-hd": {
"command": "mcp-chirp3-go",
"env": {
"MCP_SERVER_REQUEST_TIMEOUT": "55000"
}
},
"lyria": {
"command": "mcp-lyria-go",
"env": {
"MCP_SERVER_REQUEST_TIMEOUT": "55000"
}
},
"avtool": {
"command": "mcp-avtool-go",
"env": {
"MCP_SERVER_REQUEST_TIMEOUT": "55000"
}
},
"gemini": {
"command": "mcp-gemini-go",
"env": {
"MCP_REQUEST_MAX_TOTAL_TIMEOUT": "120000",
"MCP_SERVER_REQUEST_TIMEOUT": "55000"
}
}
}
}

With the new settings array in gemini-extension.json, Gemini CLI will interactively ask you for your PROJECT_ID and GENMEDIA_BUCKET when you install the extension. These values are automatically stored securely in the extension’s .env file and passed to the MCP servers!

Terminal window
gemini extensions install ./sample_extensions/google-genmedia

If you only want a subset of the GenMedia tools, we have provided partial configurations:

  • Images Only: gemini extensions install ./sample_extensions/google-genmedia-images (Installs nanobanana and imagen)
  • Video Only: gemini extensions install ./sample_extensions/google-genmedia-video (Installs veo and avtool)

We have uplifted our expert media workflows into a dedicated skills/ directory. These skills provide Gemini CLI with deep domain expertise for audio engineering, video editing, and visual arts.

1. Remote Installation (Direct from GitHub)

Section titled “1. Remote Installation (Direct from GitHub)”

You can install these skills directly from this repository without cloning it:

Terminal window
# Install the high-level Producer skill
gemini skills install https://github.com/GoogleCloudPlatform/vertex-ai-creative-studio.git --path experiments/mcp-genmedia/skills/genmedia-producer
# Install the Video Editor skill
gemini skills install https://github.com/GoogleCloudPlatform/vertex-ai-creative-studio.git --path experiments/mcp-genmedia/skills/genmedia-video-editor

If you have already cloned the repository, you can link the entire skills directory to your current workspace:

Terminal window
/skills link ../../skills --scope workspace

Once linked or installed, Gemini CLI can automatically activate these skills when relevant:

  • genmedia-producer: The orchestrator for complex multi-step media workflows (podcasts, storyboards).
  • genmedia-video-editor: Expert in FFmpeg composition, overlays, and GIF generation.
  • genmedia-audio-engineer: Specialist in TTS synthesis, music generation, and multi-track mixing.
  • genmedia-image-artist: Expert in high-fidelity visual generation and prompt optimization.
  • genmedia-voice-director: Expert in casting, directing, and generating expressive text-to-speech using Gemini TTS.

Once the genmedia-producer skill is active, you gain access to expert workflows:

  • /producer:storyboard "A futuristic city" -> Automatically generates a structured 5-shot markdown storyboard.
  • /producer:podcast "The future of AI" -> Initiates the multi-voice Chirp 3 HD audio assembly workflow.

Now, when you start up gemini cli you should see the mpc servers listed when issuing the slash command, /mcp

geminicli x genmedia mcp

If you encounter errors like the following when starting Gemini CLI:

Error connecting to MCP server 'veo': failed to start or connect to MCP server 'veo' {"command":"mcp-veo-go","trust":true};
Error: spawn mcp-veo-go ENOENT
Error connecting to MCP server 'imagen': failed to start or connect to MCP server 'imagen' {"command":"mcp-imagen-go","trust":true};
Error: spawn mcp-imagen-go ENOENT
Error connecting to MCP server 'chirp3-hd': failed to start or connect to MCP server 'chirp3-hd' {"command":"mcp-chirp3-go","trust":true};
Error: spawn mcp-chirp3-go ENOENT
Error connecting to MCP server 'lyria': failed to start or connect to MCP server 'lyria' {"command":"mcp-lyria-go","trust":true};
Error: spawn mcp-lyria-go ENOENT
Error connecting to MCP server 'avtool': failed to start or connect to MCP server 'avtool' {"command":"mcp-avtool-go","trust":true};
Error: spawn mcp-avtool-go ENOENT
Error connecting to MCP server 'gemini': failed to start or connect to MCP server 'gemini' {"command":"mcp-gemini-go","trust":true};
Error: spawn mcp-gemini-go ENOENT

Cause: This error indicates that the Genmedia MCP server binaries (installed via Go) are not in your terminal’s PATH. The Gemini CLI cannot locate the commands like mcp-veo-go, mcp-imagen-go, etc.

Solution: Add the Go binary directory to your PATH.

Temporary Fix (Current Terminal Session Only)

Section titled “Temporary Fix (Current Terminal Session Only)”

Run the following command in your terminal:

Terminal window
export PATH=$PATH:~/go/bin

This adds ~/go/bin (the default location for Go-installed binaries) to your PATH for the current session only.

To ensure the Go binaries are always available, add the export command to your shell’s configuration file:

For Bash (most common):

Terminal window
echo 'export PATH=$PATH:~/go/bin' >> ~/.bashrc
source ~/.bashrc

For Zsh (macOS default since Catalina):

Terminal window
echo 'export PATH=$PATH:~/go/bin' >> ~/.zshrc
source ~/.zshrc

For Fish:

Terminal window
fish_add_path ~/go/bin

Note: If you have a custom GOBIN or GOPATH set, adjust the path accordingly. You can check your Go environment with:

Terminal window
go env GOBIN
go env GOPATH

If GOBIN is set, use that path. Otherwise, use $GOPATH/bin or the default ~/go/bin.

After updating your PATH, verify that the MCP servers are accessible:

Terminal window
which mcp-veo-go
which mcp-imagen-go
which mcp-chirp3-go
which mcp-gemini-go

Each command should return a path like /home/username/go/bin/mcp-veo-go. If they do, your PATH is configured correctly.

You can also test individual servers directly:

Terminal window
mcp-imagen-go --help

This should display the help message for the Imagen MCP server without errors.