Skip to main content

MCP server for 4K video generation using Google VEO 3.1 -- text-to-video, image-to-video, video extension

Project description

VEO 3.1 MCP Server

Professional-grade MCP server for Google VEO 3.1 video generation with async job pattern, API key rotation, and multi-fallback download.

What It Does

Generates AI videos using Google's VEO 3.1 model. Supports text-to-video, image-to-video, video extension, and frame interpolation. Uses an async job pattern where generation starts immediately in the background and returns a job ID for polling.

Tools (9)

Tool Description
veo_generate_video Generate video from a text prompt. Supports resolution (720p/1080p/4K), aspect ratio (16:9/9:16), duration (4/6/8s), negative prompts, reference images, seed control, and batch generation (1-4 videos).
veo_image_to_video Animate a reference image with a text prompt. Supports resolution, aspect ratio, reference images, and seed control.
veo_interpolate_video Create a smooth video transition between a first frame and a last frame image.
veo_extend_video Extend an existing VEO-generated video by ~7 seconds. 720p only, max 148 seconds total. Source must be from a previous VEO generation (tracks provenance server-side).
veo_check_job Check the status of an async video generation job. Call repeatedly until status is 'completed' or 'failed'.
veo_list_jobs List all video generation jobs and their current status.
veo_api_status Show current API key rotation status — keys configured, active key, keys remaining.
veo_pricing_info Show VEO 3.1 pricing per second of generated video for both standard and fast models at all resolutions.
veo_show_output_stats Display statistics about generated videos and active/recent jobs.

Configuration

Variable Description Default
GEMINI_API_KEY Primary Gemini API key (required) --
GEMINI_API_KEY_BACKUP Backup key for automatic rotation on 429 --
VIDEO_OUTPUT_DIR Directory where generated videos are saved ~/veo-videos

Claude Desktop Configuration

{
  "mcpServers": {
    "veo": {
      "command": "python",
      "args": ["path/to/gemini-media-mcp/servers/veo/server.py"],
      "env": {
        "GEMINI_API_KEY": "your_key_here",
        "VIDEO_OUTPUT_DIR": "./videos"
      }
    }
  }
}

Architecture

  • Async Job Pattern: All generation tools return a job ID instantly. Background threads handle the long-running Google API calls, so each MCP call returns in under 5 seconds.
  • API Key Rotation: On 429/RESOURCE_EXHAUSTED, automatically switches to the backup key and retries.
  • 3-Layer Download Fallback: SDK download -> URI fallback -> Wait-for-ACTIVE state. Handles Google's Files API edge cases.
  • Preventive Cleanup: Deletes stuck PROCESSING files before each generation to prevent cascading 500 errors.

Models

Tier Model ID Use Case
Standard veo-3.1-generate-preview Higher quality output
Fast veo-3.1-fast-generate-preview Quicker generation

License

MIT

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

veo_mcp_server-1.1.0.tar.gz (74.6 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

veo_mcp_server-1.1.0-py3-none-any.whl (14.7 kB view details)

Uploaded Python 3

File details

Details for the file veo_mcp_server-1.1.0.tar.gz.

File metadata

  • Download URL: veo_mcp_server-1.1.0.tar.gz
  • Upload date:
  • Size: 74.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.13.12

File hashes

Hashes for veo_mcp_server-1.1.0.tar.gz
Algorithm Hash digest
SHA256 9a430e63aeabb7f04dba63d6626e4a7a3575091b1f996728359c44e190f43213
MD5 faca58e8f6cbc692ff9286e8a0b120c6
BLAKE2b-256 b3df61a5fc39a6e448ffe27ac5a60ac34001ffce5671dca61e941eb093d4be4d

See more details on using hashes here.

File details

Details for the file veo_mcp_server-1.1.0-py3-none-any.whl.

File metadata

  • Download URL: veo_mcp_server-1.1.0-py3-none-any.whl
  • Upload date:
  • Size: 14.7 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.13.12

File hashes

Hashes for veo_mcp_server-1.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 c1dc890967f6bb84d2f0029592fbe5e9986f9dc9c101af4c77f29fd475e2a76d
MD5 6ac2d2ae9ee95d7d2d71a15559973c26
BLAKE2b-256 ad25f4e7a88d91f2da8894602b72e05de1b9385eca8c67210b13e3258338de5b

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page