PixVerse MCP
一个全面的工具,让您能够通过支持模型上下文协议(MCP)的应用程序(如Claude或Cursor)访问PixVerse的最新视频生成模型。您可以从文本生成视频、为图片添加动画、创建过渡效果、添加唇形同步、音效,以及更多功能!
https://github.com/user-attachments/assets/08ce90b7-2591-4256-aff2-9cc51e156d00(该链接翻译为中文仍为原样,因为网址本身是国际通用的,无需翻译,但可以解释其含义为:GitHub上用户附件资源的一个特定资产链接,具体指向某个文件或资源,通过UUID“08ce90b7-2591-4256-aff2-9cc51e156d00”来唯一标识。)
概述
PixVerse MCP 是一款强大的工具,它使您能够通过支持模型上下文协议(MCP)的应用程序访问 PixVerse 的最新视频生成模型。这种集成让您能够生成高质量视频,并具备包括文本转视频、图片转视频、视频扩展、过渡效果、唇形同步、音效等在内的高级功能。
主要特点
- 文本到视频生成使用文本提示生成创意视频
- 图片转视频动画将静态图像转化为动态视频
- 灵活参数控制调整视频质量、时长、宽高比等
- 视频扩展(或视频插件)无缝延长现有视频,以获得更长的序列
- 场景转换在不同图像之间创建平滑的变形效果
- 唇形同步为使用文本转语音(TTS)或自定义音频的谈话头像视频添加逼真的唇形同步效果
- 音效根据视频内容生成情境音效
- Fusion Video(可译为“融合视频”或根据具体语境译为更贴切的名称,但在此直接保留原英文形式以体现其品牌特性)将多个主体组合到一个场景中(仅限v4.5版本)
- 资源管理从本地文件或URL上传图片和视频
- 与AI助手共同创造与像Claude这样的AI模型合作,以优化您的创意工作流程
系统组件
该系统由两个主要组件构成:
- UVX MCP服务器
- 基于Python的云服务器 - 直接与PixVerse API通信 - 提供完整的视频生成功能
安装与配置
先决条件
- Python 3.10 或更高版本
- UV/UVX(可翻译为“紫外线/增强紫外线”,具体翻译可能根据上下文有所调整)
- PixVerse API密钥:从PixVerse平台获取(此功能需要API积分,需单独购买) PixVerse平台
获取依赖项
- python:
- 从官方Python网站下载并安装 - 确保已将 Python 添加到系统路径中
- UV/UVX:
- 安装uv并设置我们的Python项目和环境:
Mac/Linux(注:Mac指苹果公司的Macintosh系列电脑,Linux指一种开源操作系统)
curl -LsSf https://astral.sh/uv/install.sh | shWindows
powershell -ExecutionPolicy ByPass -c "irm https://astral.sh/uv/install.ps1 | iex"如何使用MCP服务器
获取PixVerse API密钥
- 参观 PixVerse平台
- 注册或登录您的账户
- 在账户设置中创建并复制您的API密钥
- API密钥生成指南
2. 下载所需的依赖项
- python安装 Python 3.10 或更高版本
- UV/UVX(注:UV和UVX通常指紫外线相关技术或产品,但具体含义需根据上下文确定,此处为直译)安装最新稳定版本的UV和UVX
3. 配置MCP客户端
- 打开你的MCP客户端(例如,适用于桌面的Claude或Cursor)
- 找到客户端设置
- 打开 mcp_config.json(或相关配置文件)
- 根据您使用的方法添加配置:
{
"mcpServers": {
"PixVerse": {
"command": "uvx",
"args": [
"pixverse-mcp"
],
"env": {
"PIXVERSE_API_KEY": "your-api-key-here"
}
}
}
}- 在以下位置添加从platform.pixverse.ai获取的API密钥
"PIXVERSE_API_KEY": "xxxx" - 保存配置文件
5. 重启MCP客户端或刷新MCP服务器
- 完全关闭并重新打开您的MCP客户端
- 或者,如果支持的话,使用“刷新MCP服务器”选项
特定于客户端的配置
Claude(适用于桌面版)
- 打开Claude应用程序
- 导航至Claude > 设置 > 开发者 > 编辑配置
- 打开 claude_desktop_config.json 文件
- Windows - Mac:~/Library/Application Support/Claude/claude_desktop_config.json
- 添加上述配置并保存
- 重启克劳德
- 如果连接成功:主页将不会显示任何错误,且MCP状态将为绿色 - 如果连接失败:主页上将显示错误信息
光标
- 打开Cursor应用程序
- 进入设置 > 模型上下文协议
- 添加新服务器
- 按照上述JSON配置填写服务器详细信息
- 保存并重启或刷新MCP服务器
高级用法示例
文本到视频
使用Claude或Cursor的自然语言提示来生成视频。
基本示例:
Generate a video of a sunset over the ocean. Golden sunlight reflects on the water as waves gently hit the shore.带参数的高级示例:
Generate a night cityscape video with the following parameters:
Content: Skyscraper lights twinkling under the night sky, with car lights forming streaks on the road
Aspect Ratio: 16:9
Quality: 540p
Duration: 5 seconds
Motion Mode: normal
Negative Prompts: blur, shaking, text支持的参数:
- 宽高比:16:9,4:3,1:1,3:4,9:16
- 持续时间:5秒或8秒
- 画质:360p,540p,720p,1080p
- 运动模式:正常或快速
脚本 + 视频
使用详细的场景描述或拍摄清单来制作结构更清晰的视频。
场景描述示例:
Scene: A beach in the early morning.
The sun is rising, casting golden reflections on the sea.
Footprints stretch across the sand.
Gentle waves leave white foam as they retreat.
A small boat slowly sails across the calm sea in the distance.
Aspect Ratio: 16:9, Quality: 540p, Duration: 5 seconds.逐帧示例:
Generate a video based on this storyboard:
- Start: Top-down shot of a coffee cup with steam rising
- Close-up: Ripples and texture on the coffee surface
- Transition: Stirring creates a vortex
- End: An open book and glasses next to the cup
Format: 1:1 square, Quality: 540p, Motion: fast- Claude Desktop还支持故事板图像输入。
一键视频
快速生成特定主题或风格的视频,无需详细描述。
主题示例:
Generate a video with a futuristic technology theme, including neon lights and holographic projections.风格示例:
Generate a watercolor-style video of blooming flowers with bright, dreamy colors.创意 + 视频
将人工智能的创造力与视频生成相结合。
风格迁移示例:
This is a photo of a cityscape. Reinterpret it with a retro style and provide a video prompt.故事提示示例:
If this street photo is the opening scene of a movie, what happens next? Provide a short video concept.情感场景示例:
Look at this forest path photo and design a short video concept, either a micro-story or a scene with emotional progression.功能使用指南
文本到视频
Generate a sunset ocean video with golden sunlight reflecting on the water带参数的示例:
Prompt: "A majestic eagle soaring over mountain peaks at sunrise"
Quality: 720p
Duration: 5
Model: v5
Aspect Ratio: 16:9参数质量(360p-1080p)、时长(5秒/8秒)、宽高比(16:9/1:1/9:16)、模型(v4.5/v5)
图像转视频
1. Upload image → Get img_id
2. Use img_id to generate animated video带参数的示例:
Prompt: "The character walks through a magical forest with glowing trees"
img_id: 12345
Quality: 720p
Duration: 5s
Model: v5视频扩展(或视频插件)
Use source_video_id to extend existing video带有参数的示例:
Prompt: "The scene continues with the character discovering a hidden cave"
source_video_id: 67890
Duration: 5s
Quality: 720p
Model: v5场景转换
Upload two images to create smooth morphing animation带参数的示例:
Prompt: "Transform from sunny beach to stormy night sky"
first_frame_img: 11111
last_frame_img: 22222
Duration: 5s
Quality: 720p
Model: v5唇形同步
Video:
TTS: Choose speaker + input text
Audio: Upload audio file + video带参数的示例:
# Method 1: Generated Video + TTS
source_video_id: 33333
lip_sync_tts_speaker_id: "speaker_001"
lip_sync_tts_content: "Welcome to our amazing video tutorial"
# Method 2: Generated Video + Custom Audio
source_video_id: 33333
audio_media_id: 44444
# Method 3: Uploaded Video + TTS
video_media_id: 55555 # Upload your video first
lip_sync_tts_speaker_id: "speaker_002"
lip_sync_tts_content: "This is a custom narration"
# Method 4: Uploaded Video + Custom Audio
video_media_id: 55555 # Upload your video first
audio_media_id: 44444 # Upload your audio first音效
Describe effects: "Ocean waves, seagull calls, gentle wind"带参数的示例:
# Method 1: Generated Video + Sound Effects
sound_effect_content: "Gentle ocean waves, seagull calls, soft wind"
source_video_id: 55555
original_sound_switch: true # Keep original audio
# Method 2: Uploaded Video + Sound Effects
sound_effect_content: "Urban traffic, footsteps, city ambiance"
video_media_id: 66666 # Upload your video first
original_sound_switch: false # Replace original audio
# Method 3: Replace Audio Completely
sound_effect_content: "Epic orchestral music, thunder, dramatic tension"
video_media_id: 77777 # Upload your video first
original_sound_switch: false # Replace with new audioFusion Video(融合视频)
Upload multiple images, use @ref_name references
Example: @person standing in front of @city with @drone flying overhead带有参数的示例:
Prompt: "@hero standing in front of @city with @drone flying overhead"
image_references: [
{type: "subject", img_id: 66666, ref_name: "hero"},
{type: "background", img_id: 77777, ref_name: "city"},
{type: "subject", img_id: 88888, ref_name: "drone"}
]
Duration: 5s
Model:v4.5
Quality: 720p
Aspect Ratio: 16:9📊 状态监控
Check video_id status every 6 seconds until completion带有参数的示例:
video_id: 99999
# Check every 6 seconds until status becomes "completed" or "failed"
# Typical generation time: 60-120 seconds状态待处理 → 进行中 → 已完成/失败
常见问题解答(FAQ)
我如何获取PixVerse API密钥?
- 在PixVerse平台上注册,并在您的账户中“API密钥”下生成它。
如果服务器没有响应,我该怎么办?
- 检查您的API密钥是否有效
- 确保配置文件路径正确
- 查看错误日志(通常位于Claude或Cursor的日志文件夹中)
MCP支持图像转视频或关键帧功能吗?
- 还不行。这些功能仅可通过PixVerse API使用。 API文档
如何获得学分?
- 如果您还没有在API平台上充值,请先进行充值。 PixVerse平台
支持哪些视频格式和尺寸?
- PixVerse支持从360p到1080p的分辨率,以及从9:16(竖屏)到16:9(横屏)的宽高比。
- 我们建议先从540p分辨率和5秒长的视频开始,以测试输出质量。
我在哪里可以找到生成的视频?
- 您将收到一个URL链接,用于查看、下载或分享该视频。
生成视频需要多长时间?
- 通常情况下,根据复杂程度、服务器负载和网络状况,耗时30秒至2分钟不等。
如果遇到 spawn uvx ENOENT 错误,该怎么办?
- 此错误通常是由于UV/UVX安装路径不正确引起的。您可以按照以下方法解决:
对于Mac/Linux系统:
sudo cp ./uvx /usr/local/bin对于Windows:
- 在终端中运行以下命令,以确定UV/UVX的安装路径:
where uvx- 打开文件资源管理器并找到uvx/uv文件。
- 将文件移动到以下目录之一:
- C:\\Program Files (x86) 或 C:\\Program Files
社区与支持
社区
- 加入我们的 Discord服务器 接收更新、分享创作、获取帮助或提供反馈。
技术支持
- 电子邮箱:api@pixverse.ai
- 网站:https://platform.pixverse.ai
发布说明
v2.0.0(最新版)
- 新图片转视频动画
- 新视频扩展以支持更长序列
- 新图像之间的场景过渡
- 新与TTS(文本转语音)和自定义音频的唇形同步
- 新人工智能生成的音效
- 新合成场景的融合视频
- 新文本转语音(TTS)扬声器选择
- 新使用文件或URL上传资源(图片/视频)
- 新实时状态监控
- 改进后的增强的错误处理和用户反馈机制
- 改进后的支持并行视频生成
v1.0.0
- 支持通过MCP进行文本到视频的生成
- 启用视频链接检索
- 与Claude和Cursor集成,提升工作流程效率
- 支持基于云的Python MCP服务器
