ai-video-mcp
Allows searching and retrieving stock videos from Pexels for each chapter of the video script.
This server does not currently have a deployable release on Glama. Follow the repository's setup instructions to install and configure it for your MCP client, including any required credentials and local dependencies.
π¬ AI Video MCP Server
Turn text scripts into complete videos with stock footage, AI narration, and subtitles. Standard MCP tool β works with Claude, OpenClaw, Cursor, and any MCP-compatible AI assistant.
β¨ Features
π Script-driven β Just provide text, auto-split into chapters
π₯ Smart footage β Auto-matches stock videos from Pexels per chapter
π£οΈ TTS narration β Minimax voice synthesis, 6 voice options
πΊ Auto subtitles β Generates SRT subtitles from narration
π¬ One-click compose β ffmpeg auto-merges into final video
π MCP standard β Compatible with all MCP-enabled AI assistants
Related MCP server: ittybitty MCP server
π Quick Start
1. Install
pip install ai-video-mcpOr from source:
git clone https://github.com/yqyqstart-crypto/ai-video-mcp.git
cd ai-video-mcp
pip install -e .2. Set API Keys
export MINIMAX_API_KEY="your-minimax-key"
export PEXELS_API_KEY="your-pexels-key"Key | Get it from | Purpose |
MINIMAX_API_KEY | TTS voice synthesis | |
PEXELS_API_KEY | Stock video search |
3. Use
Command Line
ai-video-mcpMCP Config (Claude Desktop / OpenClaw / Cursor)
{
"mcpServers": {
"ai-video": {
"command": "ai-video-mcp",
"env": {
"MINIMAX_API_KEY": "your-key",
"PEXELS_API_KEY": "your-key"
}
}
}
}Once configured, just tell the AI:
"Generate a video from this script: /path/to/script.txt"
The AI will call the generate_video tool automatically.
π Tools
generate_video
Generate a complete video from a text script.
Parameters:
Param | Type | Default | Description |
| string | required | Path to script file |
| string |
| Output directory |
| string |
| TTS voice ID |
| float |
| Speech speed (0.5-2.0) |
| string |
| Output resolution |
| int |
| Pexels clip duration per chapter (sec) |
Returns:
{
"success": true,
"final_video": "out/final_video.mp4",
"chapters": 3,
"details": [
{
"chapter": 0,
"title": "Chapter 1",
"query": "search keywords",
"video": "out/chapter_00/chapter.mp4",
"tts": true
}
]
}list_voices
List available TTS voice IDs.
list_styles
List available video styles (planned).
π Script Format
Plain text (.txt) β Split with ---
Artificial intelligence is changing our lives. From smartphones to self-driving cars, AI is everywhere.
---
In healthcare, AI helps doctors diagnose diseases more accurately.
---
In the future, AI will continue to drive social progress.Markdown (.md) β Split with ##
## The Rise of AI
Artificial intelligence is changing our lives...
## Healthcare Revolution
In healthcare, AI helps doctors...
## Future Outlook
In the future, AI will continue...ποΈ Available Voices
ID | Name | Gender |
| Youth | Male |
| Girl | Female |
| Elite Male | Male |
| Elegant Lady | Female |
| Male Host | Male |
| Female Host | Female |
π Output Structure
out/
βββ final_video.mp4 # β Final complete video
βββ concat.txt # ffmpeg merge list
βββ chapter_00/
β βββ source.mp4 # Pexels raw footage
β βββ audio.mp3 # TTS narration audio
β βββ audio.srt # Subtitle file
β βββ chapter.mp4 # Composed chapter video
βββ chapter_01/
β βββ ...
βββ chapter_02/
βββ ...ποΈ Workflow
βββββββββββββββ
β Text Script β
β .txt / .md β
ββββββββ¬βββββββ
β
ββββββββΌβββββββ
βParse Chaptersβ
ββββββββ¬βββββββ
β
ββββββββββββββΌβββββββββββββ
β β β
ββββββββΌβββββββ ββββΌβββββ βββββββΌββββββ
β Pexels Searchβ β TTS β β Subtitles β
β Stock Videos β β Voice β β SRT β
ββββββββ¬βββββββ ββββ¬βββββ βββββββ¬ββββββ
β β β
ββββββββββββββΌβββββββββββββ
β
ββββββββΌβββββββ
βffmpeg Composeβ
βVideo+Audio+Subβ
ββββββββ¬βββββββ
β
ββββββββΌβββββββ
β final.mp4 β
βββββββββββββββπ§ Requirements
Python 3.8+
ffmpeg (system install)
requests
fastmcp
π‘ Why MCP?
MCP (Model Context Protocol) lets AI assistants call external tools directly. With this MCP Server installed:
β Claude Desktop can generate videos
β OpenClaw can generate videos
β Cursor can generate videos
β Any MCP-enabled AI assistant works
No coding needed. No command line. Just tell the AI.
π License
MIT
π€ Contributing
PRs welcome! Especially:
More TTS engines (Edge TTS, Azure TTS)
More video sources (Pixabay, Coverr)
AI image generation (DALL-E, Stable Diffusion)
Custom subtitle styles
Background music mixing
β Star this repo
If you find this useful, give it a β to help others discover it!
This server cannot be deployed
Maintenance
Related MCP Connectors
AI video producer: directs your idea or script into a finished, fact-checked video. MCP-native.
Turn documents and photos into narrated AI videos from Claude, ChatGPT, Codex or any MCP client.
Make Reddit story, text message, quiz and article short videos from your AI assistant. MP4 out.
Turn PDFs, PPTX decks, product photos, and briefs into QA-checked commercial videos via MCP.
Related MCP Servers
AlicenseAqualityBmaintenanceCreate AI-powered videos from any MCP-compatible client. Generate videos with AI narration, visuals, and synced captions for short-form and long-form content.253 npm6MIT- AlicenseNot gradedqualityAmaintenanceEnables AI agents to generate narrated videos from topics or scripts, with stock footage, home videos, or local AI clips.2MIT
- AlicenseAqualityDmaintenanceMCP server for faceless YouTube video automation, turning LLM-authored scripts into narrated, captioned videos with AI-generated images and motion.9MIT
- AlicenseBqualityBmaintenanceEnables AI agents to take a raw script all the way to a finished, downloadable short-drama .mp4, covering AI rewrite, character consistency, storyboards, frames, video shots, TTS voiceover, and final cut with quote-before-spend billing from any MCP client.1328,006 npmMIT