MCP Video Generation with Veo2
使用 Veo2 生成 MCP 视频
该项目实现了一个模型上下文协议 (MCP) 服务器,该服务器公开了 Google 的 Veo2 视频生成功能。它允许客户端根据文本提示或图像生成视频,并通过 MCP 资源访问生成的视频。
特征
根据文本提示生成视频
从图像生成视频
通过 MCP 资源访问生成的视频
视频生成模板示例
支持 stdio 和 SSE 传输
Related MCP server: hyper-video-service
示例图像
图像转视频示例
先决条件
Node.js 18 或更高版本
可访问 Gemini API 和 Veo2 模型的 Google API 密钥(= 您需要使用 API 密钥设置信用卡!-> 转到 aistudio.google.com)
安装
在FLUJO中安装
单击“添加服务器”
将 Github URL 复制并粘贴到 FLUJO 中
单击解析、克隆、安装、构建和保存。
通过 Smithery 安装
要通过Smithery自动为 Claude Desktop 安装 mcp-video-generation-veo2:
npx -y @smithery/cli install @mario-andreschak/mcp-veo2 --client claude手动安装
克隆存储库:
git clone https://github.com/yourusername/mcp-video-generation-veo2.git cd mcp-video-generation-veo2安装依赖项:
npm install使用您的 Google API 密钥创建一个
.env文件:cp .env.example .env # Edit .env and add your Google API key.env文件支持以下变量:GOOGLE_API_KEY:您的 Google API 密钥(必需)PORT:服务器端口(默认值:3000)STORAGE_DIR:存储生成视频的目录(默认值:./generated-videos)LOG_LEVEL:日志记录级别(默认值:致命)可用级别:详细、调试、信息、警告、错误、致命、无
对于开发,设置为
debug或info以获取更详细的日志对于生产环境,保持为
fatal以最小化控制台输出
构建项目:
npm run build
用法
启动服务器
您可以使用 stdio 或 SSE 传输启动服务器:
stdio 传输(默认)
npm start
# or
npm start stdio上交所运输
npm start sse这将在端口 3000(或.env文件中指定的端口)上启动服务器。
MCP 工具
该服务器公开以下 MCP 工具:
生成视频文本
根据文本提示生成视频。
参数:
prompt(字符串):视频生成的文本提示config(对象,可选):配置选项aspectRatio(字符串,可选):“16:9”或“9:16”personGeneration(字符串,可选):“dont_allow”或“allow_adult”numberOfVideos(数字,可选):1 或 2durationSeconds(数字,可选):5 到 8 之间enhancePrompt(boolean,可选):是否增强提示negativePrompt(字符串,可选):描述不生成内容的文本
例子:
{
"prompt": "Panning wide shot of a serene forest with sunlight filtering through the trees, cinematic quality",
"config": {
"aspectRatio": "16:9",
"personGeneration": "dont_allow",
"durationSeconds": 8
}
}从图像生成视频
从图像生成视频。
参数:
image(字符串):Base64 编码的图像数据prompt(字符串,可选):指导视频生成的文本提示config(对象,可选):配置选项(与上面相同,但 personGeneration 仅支持“dont_allow”)
列出生成的视频
列出所有生成的视频。
MCP 资源
服务器公开以下 MCP 资源:
视频://{id}
通过 ID 访问生成的视频。
视频://模板
访问示例视频生成模板。
发展
项目结构
src/:源代码index.ts:主入口点server.ts:MCP 服务器配置config.ts:配置处理tools/:MCP 工具实现resources/:MCP 资源实现services/:外部服务集成utils/:实用函数
建筑
npm run build开发模式
npm run dev执照
麻省理工学院
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.165 PyPI1Apache 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.41MIT