videogen-mcp
A unified MCP server for video generation that intelligently routes requests to either HeyGen (for avatar/presenter videos) or Google Veo (for creative/cinematic content).
Generated by GRIMLOCK MCP Factory.
Features
- Intelligent Routing: Automatically selects the best service based on prompt content
- HeyGen Integration: Avatar-based videos, custom voices, templates
- Google Veo Integration: Cinematic content, image-to-video, creative visuals
- Unified Interface: Single
generate_videotool with automatic service selection - Full Control: Direct access to service-specific tools when needed
Installation
# Clone or download the MCP
cd videogen-mcp
# Create virtual environment
python -m venv venv
source venv/bin/activate # Linux/Mac
# or: venv\Scripts\activate # Windows
# Install dependencies
pip install -e ".[dev]"
Configuration
Create a .env file with your API keys:
# HeyGen API key from Space Settings > API
HEYGEN_API_KEY=your_heygen_api_key_here
# Google AI Studio API key with Veo access
GEMINI_API_KEY=your_gemini_api_key_here
Claude Desktop Configuration
Add to your Claude Desktop config (claude_desktop_config.json):
{
"mcpServers": {
"videogen": {
"command": "python",
"args": ["-m", "videogen_mcp.server"],
"cwd": "/path/to/videogen-mcp",
"env": {
"HEYGEN_API_KEY": "your_heygen_key",
"GEMINI_API_KEY": "your_gemini_key"
}
}
}
}
Or using the installed entry point:
{
"mcpServers": {
"videogen": {
"command": "videogen-mcp",
"env": {
"HEYGEN_API_KEY": "your_heygen_key",
"GEMINI_API_KEY": "your_gemini_key"
}
}
}
}
Available Tools
Unified Interface (3 tools)
| Tool | Description |
|---|---|
generate_video |
Generate video with intelligent routing to HeyGen or Veo |
get_video_status |
Check job status (works for both services) |
download_video |
Get download URL for completed video |
HeyGen-Specific (6 tools)
| Tool | Description |
|---|---|
list_avatars |
List available avatars (stock + custom) |
list_voices |
List available voices for avatar videos |
create_avatar_video |
Create video with specific avatar/voice |
list_templates |
List available video templates |
get_template_details |
Get template variables and details |
generate_from_template |
Generate video from template |
Veo-Specific (2 tools)
| Tool | Description |
|---|---|
generate_creative_video |
Generate cinematic video with full Veo controls |
generate_video_from_image |
Animate a static image into video |
Usage Examples
Automatic Routing
"Create a video where someone presents our Q4 results"
→ Routes to HeyGen (presenter/speaking content)
"Cinematic aerial shot of mountains at sunset"
→ Routes to Veo (creative/visual content)
Explicit Service Selection
# Force HeyGen
generate_video(
prompt="Create any video",
service_hint="heygen"
)
# Force Veo
generate_video(
prompt="A tutorial video",
service_hint="veo"
)
HeyGen Avatar Video
# 1. List avatars and voices
avatars = list_avatars(filter_gender="female")
voices = list_voices(filter_language="en")
# 2. Create video
job = create_avatar_video(
script="Hello! Welcome to our company.",
avatar_id="Angela-inblackskirt-20220820",
voice_id="1bd001e7e50f421d891986aad5158bc8",
background={"type": "color", "value": "#0066CC"},
aspect_ratio="16:9"
)
# 3. Poll for completion
status = get_video_status(job_id=job["job_id"], service="heygen")
# 4. Download when complete
result = download_video(job_id=job["job_id"], service="heygen")
Veo Creative Video
# Generate cinematic content
job = generate_creative_video(
prompt="A slow dolly shot through a neon-lit Tokyo alley at night, rain reflections, cinematic color grading",
negative_prompt="blurry, low quality, text overlays",
aspect_ratio="16:9",
duration=8,
model="veo-3.1-generate-preview"
)
# Poll and download
status = get_video_status(job_id=job["job_id"], service="veo")
result = download_video(job_id=job["job_id"], service="veo")
Image to Video
# Animate a still image
job = generate_video_from_image(
image_url="https://example.com/product-photo.jpg",
prompt="Slow zoom in with subtle product rotation",
duration=6
)
Routing Logic
The generate_video tool uses keyword detection to route requests:
HeyGen triggers (avatar/presenter content):
- speak, present, explain, tutorial, avatar, host, narrator
- talking, announce, introduce, walk through, demo, spokesperson
Veo triggers (creative/cinematic content):
- cinematic, scene, visual, b-roll, animation, shot, footage
- landscape, abstract, artistic, dramatic, aerial, timelapse
Ambiguous prompts default to Veo unless avatar/presenter language is detected.
Video Wait Times
- HeyGen: 1-5 minutes (varies by content length)
- Veo: 2-10 minutes (varies by complexity)
Poll get_video_status until status is completed or failed.
Error Handling
All tools return structured error objects:
{
"error": true,
"code": "QUOTA_EXCEEDED",
"message": "API credits exhausted. Check your account."
}
Common error codes:
AUTH_FAILED- Invalid API keyQUOTA_EXCEEDED- API credits exhaustedINVALID_AVATAR/INVALID_VOICE- ID not foundCONTENT_BLOCKED- Safety filter triggeredVIDEO_NOT_READY- Generation still in progressJOB_NOT_FOUND- Invalid job ID
Development
# Run tests
pytest
# Run tests with coverage
pytest --cov=videogen_mcp
# Type checking
mypy src/
# Linting
ruff check src/ tests/
License
MIT License
Credits
- HeyGen API
- Google Veo API
- Generated by GRIMLOCK MCP Factory
Metadata
Release files for videogen-mcp 1.0.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | |
|---|---|---|---|---|
| videogen_mcp-1.0.0.tar.gz | 23.6 kB | Without provenance | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| videogen_mcp-1.0.0-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 52.2 kB
Release files / videogen_mcp-1.0.0.tar.gz
| Download URL | videogen_mcp-1.0.0.tar.gz |
|---|---|
| Size | 23.6 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
656f10c901eb108cc27f0d561ac508fc6947641b0b8f143467c40ceadce2efcf
|
|
BLAKE2b-256 checksum How to use checksums |
19025bb076625f9122c9487e8640aed93293acc519e694ecc85853a09c116f7e
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.12.3
|
Release files / videogen_mcp-1.0.0-py3-none-any.whl
| Download URL | videogen_mcp-1.0.0-py3-none-any.whl |
|---|---|
| Size | 28.6 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
2f20df318e251fa34580b4d8f8ebd3f9c82c2f9a8f88bcefa1161dc327dea784
|
|
BLAKE2b-256 checksum How to use checksums |
9997b19de176aeda9fcd58aea5ec0cd64cada8fc419f98c491da5eb5801b0efa
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.12.3
|
Security for videogen-mcp 1.0.0
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.