ai-video-mcp

ai-video-mcp

Turns text scripts into complete videos with stock footage, AI narration, and subtitles via MCP tools for AI assistants.

Category
Visit Server

README

🎬 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.

smithery Python License


✨ 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

πŸš€ Quick Start

1. Install

pip install ai-video-mcp

Or 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 platform.minimaxi.com TTS voice synthesis
PEXELS_API_KEY pexels.com/api Stock video search

3. Use

Command Line

ai-video-mcp

MCP 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
script_path string required Path to script file
output_dir string out Output directory
voice string male-qn-qingse TTS voice ID
speed float 1.05 Speech speed (0.5-2.0)
resolution string 1920x1080 Output resolution
video_duration int 10 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
male-qn-qingse Youth Male
female-shaonv Girl Female
male-qn-jingying Elite Male Male
female-yujie Elegant Lady Female
presenter male Male Host Male
presenter female 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!

Recommended Servers

playwright-mcp

playwright-mcp

A Model Context Protocol server that enables LLMs to interact with web pages through structured accessibility snapshots without requiring vision models or screenshots.

Official
Featured
TypeScript
Magic Component Platform (MCP)

Magic Component Platform (MCP)

An AI-powered tool that generates modern UI components from natural language descriptions, integrating with popular IDEs to streamline UI development workflow.

Official
Featured
Local
TypeScript
Audiense Insights MCP Server

Audiense Insights MCP Server

Enables interaction with Audiense Insights accounts via the Model Context Protocol, facilitating the extraction and analysis of marketing insights and audience data including demographics, behavior, and influencer engagement.

Official
Featured
Local
TypeScript
VeyraX MCP

VeyraX MCP

Single MCP tool to connect all your favorite tools: Gmail, Calendar and 40 more.

Official
Featured
Local
graphlit-mcp-server

graphlit-mcp-server

The Model Context Protocol (MCP) Server enables integration between MCP clients and the Graphlit service. Ingest anything from Slack to Gmail to podcast feeds, in addition to web crawling, into a Graphlit project - and then retrieve relevant contents from the MCP client.

Official
Featured
TypeScript
Kagi MCP Server

Kagi MCP Server

An MCP server that integrates Kagi search capabilities with Claude AI, enabling Claude to perform real-time web searches when answering questions that require up-to-date information.

Official
Featured
Python
Neon Database

Neon Database

MCP server for interacting with Neon Management API and databases

Official
Featured
E2B

E2B

Using MCP to run code via e2b.

Official
Featured
Exa Search

Exa Search

A Model Context Protocol (MCP) server lets AI assistants like Claude use the Exa AI Search API for web searches. This setup allows AI models to get real-time web information in a safe and controlled way.

Official
Featured
Qdrant Server

Qdrant Server

This repository is an example of how to create a MCP server for Qdrant, a vector search engine.

Official
Featured