Video Agent MCP Server
An MCP server for AI-powered video creation using the FAL AI API.
Video Agent MCP Server
A comprehensive Model Context Protocol (MCP) server for AI-powered video creation. This server provides tools, resources, and prompts to guide AI agents through complete video production workflows.
Features
- Unified Interface: Single MCP server with all video creation capabilities
- Multi-Service Integration: Supports FAL AI services for image, video, audio, and speech generation
- Intelligent Workflows: Guided prompts that adapt to your project context
- Platform Optimization: Pre-configured settings for YouTube, TikTok, Instagram, and more
- Cost Tracking: Real-time cost estimation and tracking for all operations
- YouTube Integration: Direct upload to YouTube with OAuth2 authentication
- Modular Architecture: Clean separation of tools, resources, and prompts
Quick Start
Prerequisites
- Python 3.11+
- FFmpeg installed on your system
- FAL AI API key
- uv (Python package manager)
Installation with uv
- Clone the repository:
git clone <repository-url>
cd video-gen-mcp-monolithic
- Install uv (if not already installed):
# On macOS/Linux
curl -LsSf https://astral.sh/uv/install.sh | sh
# On Windows
powershell -ExecutionPolicy ByPass -c "irm https://astral.sh/uv/install.ps1 | iex"
- Set up the project with uv:
# uv will automatically:
# - Detect Python 3.11 from .python-version
# - Create a virtual environment
# - Install all dependencies from pyproject.toml
uv sync
# Or if you want to install from requirements.txt:
uv pip install -r requirements.txt
- Set up environment variables:
# Create a .env file in the project root
cat > .env << EOF
FALAI_API_KEY=your-fal-api-key
# Optional: For YouTube search features
GOOGLE_API_KEY=your-google-api-key
EOF
Running the Server
# Run directly with uv (recommended)
uv run python main.py
# Or activate venv and run
source .venv/bin/activate # On Windows: .venv\Scripts\activate
python main.py
Configuring Claude Desktop
Add the following to your Claude Desktop configuration:
On macOS: ~/Library/Application Support/Claude/claude_desktop_config.json
On Windows: %APPDATA%\Claude\claude_desktop_config.json
{
"mcpServers": {
"video-agent": {
"command": "uv",
"args": [
"--directory",
"/absolute/path/to/video-gen-mcp-monolithic",
"run",
"python",
"main.py"
],
"env": {
"FALAI_API_KEY": "your-fal-api-key"
}
}
}
}
Important: Replace /absolute/path/to/video-gen-mcp-monolithic with the actual path to your project directory.
Alternative: Using pyproject.toml script
Since we've defined a script entry point in pyproject.toml, you can also run:
# Install the package in development mode
uv pip install -e .
# Run using the script entry point
uv run video-agent-mcp
Usage Example
Once configured in Claude Desktop, you can start creating videos:
User: Create a 30-second TikTok video about climate change
Claude: I'll help you create a TikTok video about climate change. Let me start by
creating a project and planning the scenes...
[Claude uses the video_creation_wizard prompt and various tools to create the video]
Available Tools
Project Management
create_project- Initialize a new video project with smart defaults based on platformadd_scene- Add scenes to your timeline with description and durationlist_projects- View all projects with their current status
Content Generation
generate_image_from_text- Create images from text prompts with style modifiersgenerate_image_from_image- Transform existing images with AI-powered editinggenerate_video_from_image- Animate still images with AI-generated motion (supports Kling 2.1 and Hailuo 02 models)generate_music- Create background music from text descriptionsgenerate_speech- Generate voiceovers with multiple voice options
Generation Tools
Call generation tools sequentially for clear progress tracking and easier debugging.
Video Assembly
download_assets- Download generated assets from FAL or other sourcesadd_audio_track- Add audio tracks to video with volume controlassemble_video- Combine scenes into final video with quality presets
Utility
analyze_script- Analyze scripts for video production insightssuggest_scenes- Generate scene suggestions based on project scriptupload_image_file- Upload local image files to FAL for use in generation toolsget_server_info- Get information about the Video Agent server
Resources
The server provides dynamic resources for context awareness:
project://current- Current project detailsproject://{id}/timeline- Scene timelineproject://{id}/costs- Cost breakdownplatform://{name}/specs- Platform specifications
Prompts
Interactive prompts guide complex workflows:
video_creation_wizard- Complete video creation workflow with platform optimizationscript_to_scenes- Convert scripts to scene plans with timing recommendationslist_video_agent_capabilities- Comprehensive guide of all server capabilitiescinematic_photography_guide- Professional cinematography techniques for AI visuals
Configuration
Environment variables:
FALAI_API_KEY- Your FAL AI API key (required)VIDEO_AGENT_STORAGE- Storage directory (default: ./storage)DEFAULT_IMAGE_MODEL- Default image model (default: imagen4)DEFAULT_VIDEO_MODEL- Default video model (default: kling_2.1, options: hailuo_02)
Project Structure
video-agent-mcp/
├── src/mcp_server/
│ ├── config/ # Configuration and settings
│ ├── models/ # Data models
│ ├── tools/ # Tool implementations
│ ├── resources/ # Resource handlers
│ ├── prompts/ # Prompt templates
│ └── services/ # External service integrations
├── templates/ # Video templates
└── tests/ # Test suite
Development
Setting up Development Environment
# Clone and enter the project
git clone <repository-url>
cd video-gen-mcp-monolithic
# Install with development dependencies
uv sync --dev
# Or install dev dependencies separately
uv pip install -e ".[dev]"
# Run tests
uv run pytest
# Run linting
uv run ruff check .
# Format code
uv run ruff format .
Adding New Capabilities
- New Tool: Create a file in
src/mcp_server/tools/and register inserver.py - New Resource: Create handler in
resources/and register with decorator - New Prompt: Add to
prompts/for guided workflows
Troubleshooting uv
"No Python interpreter found"
# uv will use the Python version from .python-version (3.11)
# If you need a specific Python version:
uv python install 3.11
uv venv --python 3.11
"Permission denied" on macOS/Linux
# Ensure uv is in PATH
echo 'export PATH="$HOME/.local/bin:$PATH"' >> ~/.bashrc
source ~/.bashrc
"Module not found" errors
# Ensure you're using uv run or have activated the venv
uv run python main.py
# OR
source .venv/bin/activate
python main.py
Claude Desktop can't find the server
- Use absolute paths in the configuration
- Ensure FAL_API_KEY is set in the env section
- Check Claude Desktop logs for errors
- Test the server standalone first:
uv run python main.py
YouTube Integration
For YouTube upload functionality, see YOUTUBE_SETUP.md for detailed OAuth2 setup instructions.
Environment Variables
Create a .env file in the project root:
# Required
FALAI_API_KEY=your-fal-api-key
# Optional
VIDEO_AGENT_STORAGE=/path/to/storage # Default: ./storage
DEFAULT_IMAGE_MODEL=imagen4 # Options: imagen4, flux_pro, flux_kontext
DEFAULT_VIDEO_MODEL=kling_2.1 # Options: kling_2.1, hailuo_02
GOOGLE_API_KEY=your-google-api-key # For YouTube search features
License
[License information]
Contributing
[Contributing guidelines]
Related Servers
i18next MCP Server
An MCP server for managing translations in i18next projects, allowing AI assistants to interact directly with translation files.
DocsetMCP
A server for accessing Dash-style documentation sets locally. Requires a local Dash installation.
MCP Server Toolkit
A comprehensive toolkit for developing, testing, and deploying Model Context Protocol (MCP) servers.
MCP Utils
A Python package with utilities and helpers for building MCP-compliant servers, often using Flask and Redis.
Databutton
An MCP server for initial app planning and creating a good starting point for an app.
302AI Basic MCP Server
A toolkit for enhancing the fundamental capabilities of large language models.
MCPR
Expose R functions through the Model Context Protocol (MCP) for seamless integration with AI assistants.
OpenAPI to MCP
A Go tool for converting OpenAPI specifications into MCP tools.
Azure DevOps
Interact with Azure DevOps Work Items using the Azure DevOps REST API.
GoDoc MCP
Access real-time Go package documentation from pkg.go.dev.