- Explore MCP Servers
- mcp-imageToVideo
Mcp Imagetovideo
What is Mcp Imagetovideo
mcp-imageToVideo is a Model Context Protocol (MCP) server that converts static images into videos using Replicate’s minimax/video-01-live model.
Use cases
Use cases include creating promotional videos from product images, generating animated social media posts, converting artwork into dynamic presentations, and producing video content for educational purposes.
How to use
To use mcp-imageToVideo, clone the repository, install the dependencies using ‘npm install’, and start the server with ‘npm start’. The server listens for MCP commands and processes images located in the ‘./input_images’ directory.
Key features
Key features include the ability to convert any static image into a short video with motion, customize the number of frames and frame rate, add custom text prompts for video generation, and support background processing with status tracking.
Where to use
mcp-imageToVideo can be used in various fields such as digital marketing, content creation, social media, and any application that requires the transformation of images into engaging video content.
Clients Supporting MCP
The following are the main client software that supports the Model Context Protocol. Click the link to visit the official website for more information.
Overview
What is Mcp Imagetovideo
mcp-imageToVideo is a Model Context Protocol (MCP) server that converts static images into videos using Replicate’s minimax/video-01-live model.
Use cases
Use cases include creating promotional videos from product images, generating animated social media posts, converting artwork into dynamic presentations, and producing video content for educational purposes.
How to use
To use mcp-imageToVideo, clone the repository, install the dependencies using ‘npm install’, and start the server with ‘npm start’. The server listens for MCP commands and processes images located in the ‘./input_images’ directory.
Key features
Key features include the ability to convert any static image into a short video with motion, customize the number of frames and frame rate, add custom text prompts for video generation, and support background processing with status tracking.
Where to use
mcp-imageToVideo can be used in various fields such as digital marketing, content creation, social media, and any application that requires the transformation of images into engaging video content.
Clients Supporting MCP
The following are the main client software that supports the Model Context Protocol. Click the link to visit the official website for more information.
Content
Image-to-Video MCP Server
图像转视频 MCP 服务器
This is a Model Context Protocol (MCP) server that converts static images to videos using Replicate’s minimax/video-01-live model.
这是一个基于模型上下文协议(MCP)的服务器,使用Replicate的minimax/video-01-live模型将静态图像转换为视频。
Features
功能特点
-
Convert any image to a short video with motion
-
Customize number of frames and frame rate
-
Add custom text prompts to guide video generation
-
Background processing with status tracking
-
将任何静态图像转换为带有动态效果的短视频
-
自定义帧数和帧率
-
添加自定义文本提示以引导视频生成
-
后台处理并跟踪状态
Prerequisites
前提条件
-
Node.js 18 or higher
-
Replicate API token (included in the server code)
-
Node.js 18 或更高版本
-
Replicate API 令牌(已包含在服务器代码中)
Installation
安装
-
Clone this repository
-
Install dependencies:
-
克隆此仓库
-
安装依赖项:
npm install
Usage
使用方法
Start the server:
启动服务器:
npm start
The server will start and listen for MCP commands on stdin/stdout.
服务器将启动并通过stdin/stdout监听MCP命令。
Directory Structure
目录结构
By default, the server expects:
默认情况下,服务器期望:
-
Input images to be in
./input_imagesdirectory (configurable) -
Output videos will be saved to
./output_videosdirectory (configurable) -
输入图像位于
./input_images目录(可配置) -
输出视频将保存到
./output_videos目录(可配置)
Make sure these directories exist or specify your own paths when using the generate tool.
确保这些目录存在,或在使用生成工具时指定您自己的路径。
API
API接口
The server exposes two tools:
服务器提供两个工具:
hello
A simple greeting tool that returns a hello message.
一个简单的问候工具,返回一条问候消息。
generate
Generates a video from an image.
从图像生成视频。
Parameters:
参数:
-
image_name(string, optional): Name of the input image file (defaults to “output_0.webp”) -
input_dir(string, optional): Directory containing the input image (defaults to “./input_images”) -
output_dir(string, optional): Directory where the output video will be saved (defaults to “./output_videos”) -
num_frames(number, optional, 1-60): Number of frames to generate (defaults to 16) -
fps(number, optional, 1-30): Frames per second (defaults to 8) -
prompt(string, optional): Text prompt to guide video generation (defaults to “Generate a video from this image”) -
image_name(字符串,可选): 输入图像文件名(默认为 “output_0.webp”) -
input_dir(字符串,可选): 包含输入图像的目录(默认为 “./input_images”) -
output_dir(字符串,可选): 输出视频将保存的目录(默认为 “./output_videos”) -
num_frames(数字,可选,1-60): 要生成的帧数(默认为 16) -
fps(数字,可选,1-30): 每秒帧数(默认为 8) -
prompt(字符串,可选): 引导视频生成的文本提示(默认为 “Generate a video from this image”)
Returns:
返回:
-
Immediate response with processing status and prediction ID
-
Background process that downloads the video when ready
-
Result file with metadata saved alongside the video
-
立即返回处理状态和预测ID
-
后台进程在视频准备好时下载
-
结果文件与元数据一起保存在视频旁边
Example response:
响应示例:
{
"status": "processing",
"message": "Video generation started in background",
"prediction_id": "prediction_id_here",
"check_file": "/path/to/output/filename.output.mp4.result.json",
"output_path": "/path/to/output/filename.output.mp4",
"urls": {
"get": "https://api.replicate.com/v1/predictions/prediction_id_here",
"cancel": "https://api.replicate.com/v1/predictions/prediction_id_here/cancel"
},
"parameters": {
"num_frames": 16,
"fps": 8,
"output_format": "mp4",
"input_dir": "/path/to/input",
"output_dir": "/path/to/output"
}
}
How It Works
工作原理
-
The server reads the input image and converts it to base64
-
The image is sent to Replicate’s API with the specified parameters
-
A background process monitors the prediction status
-
When the video is ready, it’s downloaded to the specified output directory
-
A result JSON file is created with metadata about the generation process
-
服务器读取输入图像并将其转换为base64格式
-
图像与指定参数一起发送到Replicate的API
-
后台进程监控预测状态
-
当视频准备好时,将其下载到指定的输出目录
-
创建一个包含生成过程元数据的JSON结果文件
Error Handling
错误处理
The server provides error reporting in two ways:
服务器通过两种方式提供错误报告:
-
Immediate errors are returned in the API response
-
Background process errors are logged to an error JSON file in the output directory
-
即时错误会在API响应中返回
-
后台进程错误会记录到输出目录中的错误JSON文件中
License
许可证
MIT
This project is licensed under the MIT License - see the LICENSE file for details.
本项目采用MIT许可证 - 详情请参阅 LICENSE 文件。
Dev Tools Supporting MCP
The following are the main code editors that support the Model Context Protocol. Click the link to visit the official website for more information.










