MCP Video Generation with Veo2
Use this MCP server to generate Google Veo videos and configured image-model images, then list or retrieve saved media through MCP clients over stdio, HTTP, or SSE.
Generate videos from text prompts.
Generate videos from image inputs: base64, MCP image object, allowed HTTPS URL, or allowed local file path.
Generate images from text prompts.
Generate a video from a generated image in one step.
List generated videos and images.
Retrieve a saved image by UUID.
Receive metadata plus
videos://<uuid>orimages://<uuid>resource links; optionally include full media data when within size limits.Configure video/image settings such as aspect ratio, duration, negative prompt, person-generation mode, and inclusion of full data.
Run over MCP stdio, Streamable HTTP, or legacy SSE; HTTP/SSE require
MCP_AUTH_TOKEN.Use discovery, templates, and saved-media access without a Google API key; generation requires one.
Configure models, storage directory, host/port, allowed hosts/origins, image URL allowlist, timeouts, and media-size limits via environment variables.
Integrates with Google's Veo2 video generation capabilities, allowing generation of videos from text prompts or images with various configuration options such as aspect ratio, duration, and person generation settings.
Click on "Deploy Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@MCP Video Generation with Veo2 generate a cinematic video of a sunset over mountains with golden hour lighting"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
Google Veo and Gemini image MCP server
Generate videos with Google Veo and images with Gemini. The package name remains
mcp-video-generation-veo2 for existing installations; version 2 uses maintained,
configurable models and MCP SDK 2.
Install and run
Use Node.js 22 or 24. From this repository:
npm ci
npm run build
node dist/index.jsFor an MCP host, launch node directly with the absolute dist/index.js path.
Do not launch npm start as the stdio child: npm's own banners can corrupt the
JSON-RPC stream. The installed package also provides mcp-video-generation-veo2.
{
"mcpServers": {
"veo": {
"command": "node",
"args": ["/absolute/path/mcp-veo2/dist/index.js"],
"env": {
"GOOGLE_API_KEY": "YOUR_GOOGLE_API_KEY",
"VIDEO_MODEL": "veo-3.1-generate-preview",
"IMAGE_MODEL": "gemini-3.1-flash-image"
}
}
}
}An API key is needed only for generation; discovery, templates, and saved-media access work without one. Google model access, billing and quota must be enabled. Generation may incur charges even if the MCP request is cancelled or times out. The server never automatically retries a paid creation request.
Related MCP server: hyper-video-service
HTTP and existing SSE clients
Set MCP_AUTH_TOKEN to a random value of at least 24 characters, then run:
node dist/index.js httpOpen http://127.0.0.1:3000/ for the included browser connection check. It asks for
the MCP token, keeps it in memory, and lists saved media using real MCP requests.
/mcp: MCP 2026-07-28 and stateless legacy Streamable HTTP./sseplus/messages?sessionId=...: legacy SSE compatibility for existing clients such as LibreChat. Each connection owns its own MCP server; request bodies are parsed once. SSE sessions expire after 10 minutes without a POST.node dist/index.js sseremains an alias for the same HTTP listener.Send
Authorization: Bearer <MCP_AUTH_TOKEN>on every MCP request, including the initial SSE GET. The Google API key is a separate, server-only credential.
The default bind address is loopback. To expose the service, configure HOST,
ALLOWED_HOSTS and ALLOWED_ORIGINS for the proxy deployment and terminate TLS at
that proxy. Only exact configured Host values and browser origins are trusted.
Each deployment and storage directory belongs to one operator; do not share its
bearer token/storage across untrusted tenants. This is static bearer deployment
authentication, not a complete OAuth authorization server.
Issue #5's file:// frontend and /sse/tool/listGeneratedVideos URL were never an
MCP REST API. Use the included page or an MCP client. Opaque Origin: null and
hostile origins are rejected; no wildcard CORS is enabled. The old public
/videos directory server has been removed.
Tools and media
All seven tool names are retained:
Tool | Inputs |
|
|
|
|
|
|
|
|
| No inputs |
| No inputs |
| Saved image UUID, optional |
Settings are flat tool arguments, for example:
{
"prompt": "A slow camera pan through a sunlit forest",
"aspectRatio": "16:9",
"durationSeconds": 8,
"resolution": "720p"
}Veo 3.1 accepts durations 4, 6, or 8 seconds; 1080p/4k requires 8 seconds. Text
generation uses personGeneration=allow_all; image animation uses
allow_adult, subject to Google's regional restrictions and filtering. One
video/image is generated per call. Explicit unsupported settings fail before
provider generation.
An image input can be a base64 string, an MCP image object
{ "type": "image", "mimeType": "image/png", "data": "..." }, an allowed HTTPS URL,
or an absolute file path beneath IMAGE_INPUT_DIR. PNG, JPEG and WebP are checked
by MIME type and file signature. Input images are limited to 10 MiB. URL imports
require an explicit IMAGE_URL_HOSTS allowlist controlled by the operator; redirects
must remain in that allowlist. Do not allow hosts you do not trust.
Outputs contain metadata and videos://<uuid> or images://<uuid> resource links.
Resources return actual media blobs; video data is never mislabeled as an MCP
image. includeFullData=true additionally embeds media in the tool result, limited
to 8 MiB. Resources are likewise limited to 8 MiB for interoperability. Larger
assets remain in STORAGE_DIR for the operator to retrieve on the server.
Video downloads always run on the server. API keys are sent in headers, never in returned or saved URLs. Redirects are bounded; cross-host redirects do not receive the Google key. Downloaded bytes, metadata and API responses have size limits. Provider error bodies and raw request arguments are not logged. Startup rewrites valid historical metadata through an allowlist, dropping old key-bearing URLs and absolute paths while preserving media files. Rotate keys previously exposed by an older release and remove historical copies from any downstream logs/backups.
Configuration
Copy .env.example or set environment variables:
Variable | Default / meaning |
| Provider key; |
|
|
|
|
|
|
|
|
| Required for HTTP/SSE, at least 24 characters |
| Additional comma-separated exact |
| Additional comma-separated exact HTTP(S) origins |
|
|
| Empty; comma-separated trusted HTTPS source hosts |
| 600000, maximum 1800000 |
| 10000 |
| 67108864; maximum 134217728 |
Veo 2, Imagen 3 and Imagen 4 are not suitable defaults for the end of 2026.
Google's Veo guide documents the current
video interface; image generation
lists current Gemini image models. This implementation uses the supported
generateContent image API; Google's
Interactions overview
confirms it remains supported. Recheck model availability and
deprecations before deployment.
Configurable model IDs permit compatible replacements; they do not guarantee that
a future model accepts the same parameters. Veo 3.1's current identifier is a
preview, so end-of-2026 availability cannot be promised.
Version 2 migration
MCP stdio and HTTP serve revision 2026-07-28 through SDK2's actual
serveStdio/createMcpHandlerentries. Legacy stdio/HTTP/SSE remains tested.Duration 5/7,
numberOfVideos=2,numberOfImages>1, unsupported person modes,enhancePrompt=true, andautoDownload=falsenow fail explicitly.Media always downloads locally, and public storage directory access is removed.
Use direct Node/package binary for MCP stdio. Missing generation credentials no longer prevent listing tools.
Unsupported resource subscriptions are not advertised.
Verification
npm run checkTests use credential-free provider fixtures and actual stdio, Streamable HTTP, legacy SSE and production-only packed installs. They cover schema errors, cancellation, key handling, redirects, size limits, media types, path boundaries, connection isolation, Host/Origin/auth checks, and clean EOF. CI runs on Node 22 and 24. No paid generation is performed in automated tests; a live account test is still required to establish provider billing, regional access and visual quality.
MIT license. Original examples remain in example-files/.
Available Tools
7 toolsgenerateImageC
Generate an image from a text prompt using Google Imagen
Inputs: prompt (required), numberOfImages, includeFullData.
generateVideoFromGeneratedImageC
Generate a video from a generated image (one-step process)
Inputs: prompt (required), aspectRatio, videoPrompt, autoDownload, +7 more.
generateVideoFromImageC
Generate a video from an image
Inputs: image (required), prompt, aspectRatio, autoDownload, +6 more.
generateVideoFromTextC
Generate a video from a text prompt
Inputs: prompt (required), aspectRatio, autoDownload, enhancePrompt, +5 more.
getImageB
Get a specific image by ID
Inputs: id (required), includeFullData.
listGeneratedImagesB
List all generated images
listGeneratedVideosB
List all generated videos
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 7 tools
Most tools have distinct purposes, but generateVideoFromGeneratedImage and generateVideoFromImage overlap in functionality; one is described as 'one-step process' but the distinction is not immediately clear from names alone.
Tool names follow a verb_noun pattern, but there is inconsistency: 'generateImage' uses a direct object while video tools use 'from' prepositional phrases. Also, 'getImage' differs from 'listGeneratedImages/listGeneratedVideos' in tense.
With 7 tools, the set is well-scoped for an image/video generation server, covering creation and listing without being overly numerous.
The tool surface includes generation and listing but lacks retrieval of individual videos (no getVideo), update, and delete operations, leaving notable gaps in lifecycle management.
Maintenance
Related MCP Connectors
MCP server for Google Veo AI video generation
MCP server for Kling AI video generation
MCP server for Hailuo (MiniMax) AI video generation
MCP server for Wan AI video generation
Related MCP Servers
- AlicenseNot gradedqualityDmaintenanceAn async video generation MCP server with multi-provider support. Currently in skeleton phase with stub implementations, it will eventually enable video generation through providers like Veo 3.1, Grok Imagine Video, and Sora 2 Pro.MIT
- FlicenseNot gradedqualityDmaintenanceMCP server for programmatic video generation. Send a prompt, get an MP4.-
- AlicenseNot gradedqualityBmaintenanceMCP server for generating images and videos using Google Gemini and VEO models, with support for multiple AI models and credential modes.1Apache 2.0
- AlicenseAqualityDmaintenanceMCP server for Google Veo 3.1 video generation. Supports text/video/image-based generation, extension, and interpolation with cost estimation and batch processing.428 npm1MIT