Skip to main content
Glama
ex-takashima

Google Veo 3.1 MCP Server

by ex-takashima

Google Veo 3.1 MCP Server

MCP Server and CLI batch tool for Google Veo 3.1 Video Generation API.

Features

  • MCP Server for integration with Claude Desktop and other MCP clients

  • Batch CLI Tool for processing multiple video generation jobs

  • Text-to-Video: Generate videos from text prompts

  • Image-to-Video: Animate static images

  • Reference Images: Use up to 3 images for character/style consistency

  • Video Extension: Extend existing videos by 7 seconds

  • Frame Interpolation: Generate video between two keyframes

  • Cost Estimation: Calculate costs before execution

Related MCP server: veo-mcp-server

Installation

npm install
npm run build

Setup

  1. Get your Google API key from Google AI Studio

  2. Create a .env file:

GOOGLE_API_KEY=your_api_key_here

Or set the environment variable directly:

export GOOGLE_API_KEY=your_api_key_here

MCP Server Usage

Claude Desktop Configuration

Add to your Claude Desktop configuration (%APPDATA%\Claude\claude_desktop_config.json on Windows):

{
  "mcpServers": {
    "veo3": {
      "command": "node",
      "args": ["C:/path/to/google-veo3-1-mcp-server/dist/index.js"],
      "env": {
        "GOOGLE_API_KEY": "your_api_key_here"
      }
    }
  }
}

Or using npx after publishing:

{
  "mcpServers": {
    "veo3": {
      "command": "npx",
      "args": ["google-veo3-1-mcp-server"],
      "env": {
        "GOOGLE_API_KEY": "your_api_key_here"
      }
    }
  }
}

Available Tools

generate_video

Generate video from text prompt or image.

{
  "prompt": "A golden retriever running through autumn leaves",
  "model": "veo-3.1-generate-preview",
  "resolution": "1080p",
  "duration_seconds": 8,
  "generate_audio": true,
  "output_path": "./output/video.mp4"
}

Parameters:

  • prompt: Text description of the video (required unless image provided)

  • model: veo-3.1-generate-preview (default), veo-3.1-fast-generate-preview, or veo-3.1-lite-generate-preview

  • aspect_ratio: 16:9 (default) or 9:16

  • resolution: 720p (default), 1080p, or 4k (4k not available for lite model)

  • duration_seconds: 4, 6, or 8 (default: 8; must be 8 when using 1080p/4K or reference images)

  • generate_audio: Whether to generate audio (default: true)

  • negative_prompt: Elements to avoid

  • image: Image for Image-to-Video mode

  • reference_images: Array of reference images for consistency

  • sample_count: Number of videos to generate per request (default: 1)

  • output_path: Path to save the video

  • wait: Set to false to return the operation_name immediately instead of blocking until the video is ready (default: true). Also supported by extend_video and interpolate_frames.

extend_video

Extend an existing video by 7 seconds.

{
  "video": "./input/video.mp4",
  "prompt": "Continue with the character walking forward",
  "output_path": "./output/extended.mp4"
}

Requirements:

  • Input video: 1-30 seconds, 24fps, 720p or 1080p

  • Output: 7 seconds at 720p

interpolate_frames

Generate video transitioning between two keyframes.

{
  "first_frame": "./images/start.jpg",
  "last_frame": "./images/end.jpg",
  "prompt": "Smooth camera pan",
  "duration_seconds": 8,
  "generate_audio": true,
  "output_path": "./output/interpolated.mp4"
}

get_video_status

Check the status of a video generation operation. When used with wait: false generation, poll this tool until done is true, then download the result.

{
  "operation_name": "models/veo-3.1-generate-preview/operations/abc123",
  "download": true,
  "output_path": "./output/video.mp4"
}

Parameters:

  • operation_name: Operation name returned by a generation tool (required)

  • download: When the operation is done, download the video(s) to output_path or OUTPUT_DIR (default: false)

  • output_path: Where to save the downloaded video (implies download)

Async workflow example:

  1. generate_video with "wait": false → returns operation_name in seconds

  2. get_video_status with the operation_namedone: false while processing

  3. Once done: true, call again with "download": true (or include output_path) to save the video

Batch CLI Usage

# Estimate costs only
veo3-batch config.json --estimate-only

# Execute batch
veo3-batch config.json --output-dir ./output

# With options
veo3-batch config.json --max-concurrent 3 --no-audio --format json

CLI Options

Option

Description

-o, --output-dir <path>

Output directory for videos

-f, --format <text|json>

Output format (default: text)

-c, --max-concurrent <n>

Parallel jobs (1-5, default: 2)

-p, --poll-interval <ms>

Polling interval

-t, --timeout <ms>

Total batch timeout

-e, --estimate-only

Only estimate costs

--no-audio

Generate without audio (reduces cost)

--allow-any-path

Allow absolute output paths

Batch Configuration Format

{
  "jobs": [
    {
      "prompt": "A cat playing piano",
      "duration_seconds": 8,
      "resolution": "1080p",
      "generate_audio": true
    },
    {
      "type": "extend",
      "video": "./videos/source.mp4",
      "prompt": "Continue the scene"
    },
    {
      "type": "interpolate",
      "first_frame": "./images/start.jpg",
      "last_frame": "./images/end.jpg"
    }
  ],
  "output_dir": "./output",
  "max_concurrent": 2,
  "default_model": "veo-3.1-generate-preview"
}

Pricing

Prices are per second of generated video. Audio is always included.

Model

720p

1080p

4K

Standard (veo-3.1-generate-preview)

$0.40/sec

$0.40/sec

$0.60/sec

Fast (veo-3.1-fast-generate-preview)

$0.10/sec

$0.12/sec

$0.30/sec

Lite (veo-3.1-lite-generate-preview)

$0.05/sec

$0.08/sec

N/A

Note: Gemini API preview models always generate audio. The generate_audio parameter is not currently supported. Use Vertex AI for audio control.

Cost Examples

Video Type

Model

Resolution

Duration

Cost

Text-to-Video

Standard

1080p

8 sec

$3.20

Text-to-Video

Fast

1080p

8 sec

$0.96

Image-to-Video

Fast

720p

4 sec

$0.40

Video Extension

Standard

720p

7 sec

$2.80

Frame Interpolation

Standard

720p

8 sec

$3.20

Models

Model

Description

Resolutions

Speed

veo-3.1-generate-preview

High quality

720p, 1080p, 4K

Standard

veo-3.1-fast-generate-preview

Faster generation

720p, 1080p, 4K

Fast

veo-3.1-lite-generate-preview

Cheapest

720p, 1080p

Fast

Reference Images

Use reference images to maintain consistency:

{
  "prompt": "The character walks through a forest",
  "reference_images": [
    {
      "image": "./character.jpg",
      "reference_type": "asset"
    }
  ]
}
  • asset: For characters/objects (max 3 images)

  • style: For visual style (max 1 image)

Environment Variables

Variable

Description

Default

GOOGLE_API_KEY

Google API key (required)

-

OUTPUT_DIR

Default output directory

./output

DEBUG

Enable debug logging

false

VIDEO_POLL_INTERVAL

Polling interval (ms)

15000

VIDEO_MAX_POLL_ATTEMPTS

Max polling attempts

120

API Documentation

For detailed API specifications, see:

License

MIT

Available Tools

4 tools
extend_videoA

Extend an existing video by 7 seconds using Veo 3.1 API.

The extension continues from the last second of the input video.

Requirements:

  • Input video: 1-30 seconds, 24fps, 720p or 1080p

  • Output: Always 7 seconds at 720p

Estimated cost: ~$2.80 per extension (7 seconds x $0.40/sec)

ParametersJSON Schema
NameRequiredDescriptionDefault
waitNoIf false, return the operation_name immediately without waiting for completion. Default: true
videoYesVideo to extend. Can be a GCS URI (gs://), file path, URL, or base64 string
promptNoOptional prompt to guide the extension
output_pathNoPath to save the extended video

TDQS

A4.2/5.0
Behavior4/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

No annotations are present, so the description carries the behavioral disclosure burden. It discloses key traits: the extension starts from the last second, input requirements, fixed output format/resolution, and cost. It does not cover all behaviors (e.g., async behavior, error handling), but the provided details add substantial transparency beyond the schema.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is well-structured and concise: a lead sentence with the core purpose, followed by bulleted requirements and cost. Every sentence adds value, no filler or redundancy. It is front-loaded and easy to scan.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a tool with no output schema and no annotations, the description covers the essential context: input constraints, output format, cost, and continuation behavior. It does not explain the wait parameter's implications (async workflow) or how to retrieve the result, but the schema documents wait and the sibling get_video_status implies the flow. Overall, it is fairly complete.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

The input schema already has 100% coverage with descriptive comments for all parameters, so the baseline is 3. The description adds context about input video constraints (duration/fps/resolution) and output resolution, which relates to the video parameter, but it does not provide per-parameter semantics beyond the schema. This is adequate but not exemplary.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description uses the specific verb 'extend' with the resource 'existing video' and a precise duration (7 seconds). It clearly distinguishes from sibling tools: generate_video creates new videos, interpolate_frames alters frame rates, and get_video_status checks status. No ambiguity about what this tool does.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines4/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description establishes clear context: use this tool when you have an existing video and need to extend it. It also provides input constraints (duration, fps, resolution) that help the agent decide if the tool is appropriate. However, it does not explicitly name alternatives or state when not to use it, so it falls short of a 5.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

generate_videoA

Generate a video using Google Veo 3.1 API.

Supports:

  • Text-to-Video: Generate video from a text prompt

  • Image-to-Video: Animate a static image

  • Reference Images: Use up to 3 asset images or 1 style image for consistency

Models:

  • veo-3.1-generate-preview: High quality (default)

  • veo-3.1-fast-generate-preview: Faster generation

  • veo-3.1-lite-generate-preview: Cheapest, 720p/1080p only

Pricing (per second, audio always included):

  • Standard: $0.40 (720p/1080p), $0.60 (4K)

  • Fast: $0.10 (720p), $0.12 (1080p), $0.30 (4K)

  • Lite: $0.05 (720p), $0.08 (1080p)

ParametersJSON Schema
NameRequiredDescriptionDefault
seedNoRandom seed for reproducibility (0-4294967295)
waitNoIf false, return the operation_name immediately without waiting for completion. Poll with get_video_status and download with its download option. Default: true
imageNoImage for Image-to-Video mode. Can be a file path, URL, or base64 string
modelNoModel to use for generation. Default: veo-3.1-generate-preview
promptNoText prompt describing the video to generate. Required unless image is provided.
resolutionNoVideo resolution. 4K not available for lite model. 1080p/4K require duration_seconds: 8. Default: 720p
output_pathNoPath to save the generated video. If not provided, uses OUTPUT_DIR env var
aspect_ratioNoAspect ratio of the video. Default: 16:9
sample_countNoNumber of videos to generate per request (1-4). Default: 1
generate_audioNoWhether to generate audio. Note: Gemini API preview always generates audio (this parameter is ignored). Use Vertex AI for audio control.
negative_promptNoElements to avoid in the generated video
duration_secondsNoDuration of the video in seconds (4, 6, or 8). Must be 8 when using 1080p/4K or reference images. Default: 8
reference_imagesNoReference images for consistency. Max 3 asset images or 1 style image
person_generationNoControl person generation: allow_adult (default), dont_allow, allow_all

TDQS

A4.1/5.0
Behavior4/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

With no annotations provided, the description carries the full burden and does so well. It discloses pricing per second, audio always included, model constraints (4K not available for lite), resolution/duration dependencies, the async behavior via the wait parameter, and that generate_audio is ignored on Gemini API. It does not cover error handling or return format, but the provided details exceed the minimum.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description uses compact bullet points and clear grouping (Supports, Models, Pricing), making it easy to scan. It is longer than average but every section earns its place—especially pricing, which helps select the right model. No filler or redundancy, though it could be trimmed slightly by folding pricing into the model list.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a tool with 14 parameters, no annotations, and no output schema, the description covers the essential decision points: modes, models, pricing, constraints, and async options. It does not describe the return value or error scenarios, but the schema covers parameter details, and the description compensates for the lack of annotations. A near-complete picture for a complex tool.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

The input schema already covers all 14 parameters with descriptions, so the baseline is 3. The description adds meaningful value beyond the schema: pricing differences inform model selection, constraints like '1080p/4K require duration_seconds: 8' and 'Max 3 asset images or 1 style image' are highlighted, and the note about audio always being generated adds practical semantics that the schema omits.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description opens with a specific verb+resource: 'Generate a video using Google Veo 3.1 API.' It clearly distinguishes from sibling tools (extend_video, interpolate_frames, get_video_status) by focusing on creation from text or image. The supported modes are explicitly listed, leaving no ambiguity about the tool's core function.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines3/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description provides rich context about models, pricing, and supported input types, but it does not explicitly state when to use this tool vs. the sibling tools (e.g., extend_video, interpolate_frames). No exclusionary guidance is given, so the agent must infer from the name and scope that this is for new video generation only.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

get_video_statusA

Check the status of a video generation operation.

Returns the current status (done/pending) and video URL if completed. Can also download the completed video (use after generate_video with wait: false).

ParametersJSON Schema
NameRequiredDescriptionDefault
downloadNoIf true and the operation is done, download the video to output_path (or OUTPUT_DIR). Default: false
output_pathNoPath to save the video when downloading. Implies download. If not provided, uses OUTPUT_DIR env var
operation_nameYesThe operation name returned from generate_video, extend_video, or interpolate_frames

TDQS

A4.5/5.0
Behavior4/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

With no annotations provided, the description carries the full burden. It discloses that the tool returns status (done/pending) and video URL when completed, and that it can download the video. It doesn't mention edge cases like errors or polling behavior, but it is transparent about the main actions and outcomes.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is three sentences, front-loaded with the primary purpose. No filler or redundant information; each sentence earns its place by covering status, return value, and download capability.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness5/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a simple status-checking tool with no output schema, the description adequately covers the core functionality, return values, and usage guidance. It provides enough context for an agent to select and invoke the tool correctly, especially given the sibling tool references.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 100%, so the parameters are already well-documented. The description adds minimal new meaning beyond the schema, and the schema already explains that `output_path` implies `download` and that `operation_name` comes from sibling tools. Thus a baseline score of 3 is appropriate.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the tool checks the status of a video generation operation, distinguishing it from sibling tools that generate or modify videos. It also specifies the additional capability of downloading the completed video, making the tool's purpose unambiguous.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines5/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description explicitly says to use it after `generate_video` with `wait: false`, providing a concrete usage context. It also names the sibling tools that return the `operation_name`, giving clear guidance on when this tool is appropriate.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

interpolate_framesA

Generate a video that smoothly transitions between two keyframes using Veo 3.1 API.

Creates a video that starts at the first frame and ends at the last frame with AI-generated motion in between.

Pricing: Same as generate_video based on duration (audio always included)

ParametersJSON Schema
NameRequiredDescriptionDefault
waitNoIf false, return the operation_name immediately without waiting for completion. Default: true
promptNoOptional prompt to guide the interpolation
last_frameYesEnding frame image. Can be a file path, URL, or base64 string
first_frameYesStarting frame image. Can be a file path, URL, or base64 string
output_pathNoPath to save the generated video
generate_audioNoWhether to generate audio. Note: Gemini API preview always generates audio (ignored).
duration_secondsNoDuration of the video in seconds. Frame interpolation requires 8 seconds. Default: 8

TDQS

A3.7/5.0
Behavior3/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

No annotations are provided, so the description carries the transparency burden. It adds useful details like pricing and 'audio always included', but it does not disclose async behavior, return formats, or side effects such as saving to output_path.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is tight and front-loaded: first sentence states the core purpose, second clarifies behavior, and the third adds relevant pricing/audio context. Every sentence earns its place with no redundancy.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness3/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a complex video-generation tool with 7 parameters and no output schema, the description gives adequate purpose and pricing but omits return-value behavior, asynchronous operation details, and explicit usage scenarios. It relies heavily on the schema for parameter-level completeness.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

The input schema has 100% parameter description coverage, so the schema already documents all parameters. The description adds no parameter-specific meaning beyond mentioning pricing and audio, which are already hinted at in the generate_audio parameter note.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description states a specific action ('Generate a video that smoothly transitions between two keyframes') and names the API (Veo 3.1). It clearly differentiates from sibling tools like generate_video and extend_video by emphasizing the two-frame interpolation behavior.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines3/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description implies the tool is for creating interpolated motion between two keyframes, but it does not explicitly state when to choose it over generate_video or extend_video. The only sibling mention is a pricing note, not usage guidance.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Tool Schema Changelog

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

  1. 4 tool updatesv1.2.0
    • First observedextend_video
    • First observedgenerate_video
    • First observedget_video_status
    • First observedinterpolate_frames

TDQS

A4.2/5.0

Scored across 4 tools

Disambiguation5/5

Each tool targets a distinct video operation: generating from text/image, extending an existing video, interpolating between keyframes, and checking status. The descriptions clearly differentiate inputs and purposes, leaving no ambiguity for an agent.

Naming Consistency5/5

All tool names follow a consistent verb_noun pattern: generate_video, extend_video, interpolate_frames, get_video_status. The pattern is predictable and mixes well with the domain.

Tool Count5/5

The server has exactly four tools, which is well-scoped for a video generation service. It covers the core generation capabilities plus status checking without unnecessary clutter.

Completeness4/5

The tool surface covers generation, extension, interpolation, and status retrieval, which are the primary workflows. A minor gap is the lack of a cancel or list operations, but agents can work around this with the existing status tool.

Maintenance

ActivityStale
ResponsivenessNo issues

Related MCP Connectors

Related MCP Servers