video-mcp
video-mcp
阶段 2a 骨架 — 仅存根,尚未连接实时 API。 实时 Veo 连接将在阶段 2a.2 中实现。
一个支持多提供商的异步视频生成 MCP 服务器。
状态
⚠️ 这是阶段 2a 骨架。 所有提供商均返回存根响应 — 即在约 2 秒的实际时间后,从
submitted(已提交)变为pending(处理中)再到complete(已完成)的虚假作业 ID。不会生成任何真实的视频字节。实时 Veo 3.1 连接是下一个里程碑(阶段 2a.2)。
Related MCP server: hyper-video-service
目的
提供一个 MCP 接口,用于使用多个后端提供商进行异步视频生成。专为与 amplifier-bundle-creative 编排包配合使用而设计。
相关链接
规范 + 决策日志: https://github.com/michaeljabbour/amplifier-bundle-creative/blob/main/spec/DECISIONS.md
D018:异步模式 —
generate_video立即返回job_id;调用者通过get_job_status进行轮询D021:VideoProvider ABC 形状(本仓库的
src/providers/base.py)
姊妹图像 MCP: https://github.com/michaeljabbour/imagen-mcp(图像生成)
提供商
提供商 | 状态 | 备注 |
Veo 3.1 Standard | 存根 — 等待实时连接 | $0.40/秒,4K,最佳唇形同步 |
Veo 3.1 Fast | 存根 — 等待实时连接 | $0.15/秒,1080p,更快的迭代 |
Veo 3.1 Lite | 存根 — 等待实时连接 | $0.05/秒,720p/1080p,高容量 |
Grok Imagine Video | 仅存根 — 引发 NotImplementedError | D019:等待 xAI DPA/MSA |
Sora 2 Pro | 仅存根 — 引发 NotImplementedError | D010:API 于 2026-09-24 终止支持 |
存根行为: Veo 存根返回一个虚假的 job_id(例如 stub_veo_standard_abc123)。使用该 ID 调用 get_job_status 将在约 2 秒内返回 status: pending,然后返回 status: complete 以及占位符 output_url。不会产生真实的视频。
设置
所需环境变量:
变量 | 目的 |
| Veo 3.1 提供商(等待实时连接) |
可选:
变量 | 默认值 | 目的 |
| — | Grok Imagine Video(受限 — 见 D019) |
|
| 基础输出目录 |
|
| 请求超时(秒) |
|
| 将完整提示词记录到事件日志 |
快速入门
generate_video
提交视频生成作业(立即返回 job_id):
{
"tool": "generate_video",
"params": {
"prompt": "A serene mountain lake at golden hour, camera slowly panning right",
"provider": "veo-3.1-standard",
"duration": 8.0,
"aspect_ratio": "16:9"
}
}响应:
## ✅ Video Job Submitted
**Provider:** veo-3.1-standard
**Job ID:** `stub_veo_standard_a1b2c3d4e5f6`
**Status:** submitted
### ⏰ Polling Instructions
Call `get_job_status` with job_id `stub_veo_standard_a1b2c3d4e5f6` every ~15 seconds.
Typical completion: 30–120s for live Veo calls (2s for stubs).get_job_status
轮询完成状态:
{
"tool": "get_job_status",
"params": {
"job_id": "stub_veo_standard_a1b2c3d4e5f6"
}
}响应(使用存根约 2 秒后):
## ✅ Video Complete
**Job ID:** `stub_veo_standard_a1b2c3d4e5f6`
**Status:** complete
**Progress:** 100%
**Output URL:** https://stub.example.com/video/stub_veo_standard_a1b2c3d4e5f6.mp4项目结构
video-mcp/
├── src/
│ ├── server.py # MCP entry point — generate_video, get_job_status
│ ├── config/
│ │ ├── constants.py # VEO_MODELS, STUBBED_PROVIDERS, limits
│ │ ├── settings.py # Env-var settings (GEMINI_API_KEY, XAI_API_KEY, ...)
│ │ ├── paths.py # Output path resolution
│ │ └── dotenv.py # .env loader shim
│ ├── providers/
│ │ ├── base.py # VideoProvider ABC, VideoCapabilities, VideoJobResult, JobStore
│ │ ├── veo_provider.py # Veo 3.1 Standard/Fast/Lite stubs
│ │ ├── sora_provider.py # Sora 2 stub (D010)
│ │ ├── grok_provider.py # Grok Imagine stub (D019)
│ │ ├── selector.py # Provider routing (override + default)
│ │ └── registry.py # Provider factory + JobStore routing
│ ├── models/
│ │ └── input_models.py # Pydantic models for MCP tools
│ ├── exceptions.py # VideoError hierarchy
│ └── services/
│ └── logging_config.py # Structured JSONL event logging
└── tests/
├── test_providers.py
└── test_server.py开发
# Clone and install
git clone https://github.com/michaeljabbour/video-mcp.git
cd video-mcp
python3 -m venv venv && source venv/bin/activate
pip install -e ".[dev]"
# Run tests
pytest tests/ -v
# Verify server loads
python3 -c "from src.server import mcp; print('Server loads OK')"
# Start server (waits for MCP stdio)
python -m src.server许可证
MIT
This server cannot be deployed
Maintenance
Related MCP Connectors
MCP server for Google Veo AI video generation
MCP server for Wan AI video generation
MCP server for MiniMax H3 multimodal video generation
MCP server for Kling AI video generation
Related MCP Servers
- AlicenseBqualityDmaintenanceMCP server that exposes Google's Veo2 video generation capabilities, allowing clients to generate videos from text prompts or images.735MIT
- FlicenseNot gradedqualityDmaintenanceMCP server for programmatic video generation. Send a prompt, get an MP4.-
- AlicenseAqualityDmaintenanceA unified MCP server for video generation that intelligently routes requests to HeyGen (for avatar/presenter videos) or Google Veo (for creative/cinematic content).11MIT
- AlicenseAqualityCmaintenanceMCP server for Google Veo 3.1 video generation. Supports text/video/image-based generation, extension, and interpolation with cost estimation and batch processing.16426 npm1MIT