Remotion Video Production MCP Server
Remotion 视频制作 MCP 服务器
一个世界级的模型上下文协议(MCP)服务器,充当 AI 代理的智能桥梁,用于分析音频节拍、使用 Google Gemini TTS 合成语音,并使用 Remotion (v4.0+) 和 React 以编程方式构建和渲染专业视频。
支持两种传输方式:
💻 本地 STDIO 传输:适用于本地 AI 客户端(Antigravity、Claude Desktop、Cursor)。
🌐 远程流式 HTTP 传输:适用于云部署(Render)和基于 Web 的 AI 客户端(Claude Web,网址为 https://claude.ai/new)。
🚀 主要特性
🎬 编程式脚手架:创建零配置的 React/Remotion 视频项目,内置宽高比:TikTok/Reels(
tiktok-916)、YouTube(youtube-169)和社交平台(social-11)。🎙️ Gemini 3.1 Flash TTS 集成:生成具有地区口音的高保真语音场景对白,并生成词级时间码以制作动态字幕。
🎵 Librosa 音频节拍同步:分析背景音乐以提取 BPM、节拍边界、RMS 能量下降/上升,并推荐帧级精确的场景剪辑点。
📸 视觉预览快照:在任何帧索引处即时渲染帧快照(PNG/JPEG/WebP),供 AI 进行视觉验证。
⚡ 无头渲染:以多核并发控制和进度跟踪方式,编程式编译高质量 MP4/WebM 视频。
🔒 Bearer 令牌认证:在部署到公共云服务时保护您的 HTTP MCP 端点。
Related MCP server: remotion-vision-mcp
🛠️ 前提条件
要运行此 MCP 服务器并渲染视频,宿主环境需要:
Node.js(建议 v20.0.0 或更高版本)和 npm。
Python 3(建议 v3.10+)并安装音频包:
pip install librosa numpy scipy google-genaiRemotion 浏览器依赖:无头启动 Chrome 需要 Chromium。通过 CLI 安装:
npx @remotion/cli browser ensure
🌐 远程 MCP / Claude Web 与流式 HTTP 部署
此服务器支持 MCP 流式 HTTP 传输规范(@modelcontextprotocol/sdk v1.29.0),允许诸如 Claude Web(https://claude.ai/new)之类的基于 Web 的客户端远程连接。
1. 在本地运行 HTTP 服务器
构建并启动流式 HTTP 服务器:
npm install
npm run build
npm run start:http默认情况下,服务器监听:
健康检查:
GET http://localhost:3000/healthMCP 端点:
http://localhost:3000/mcp
2. 环境变量
创建 .env 文件或导出环境变量:
环境变量 | 描述 | 默认值 |
| HTTP 监听端口 |
|
| 主机接口绑定 |
|
| 用于 Bearer 认证的密钥令牌( | (为空则不认证) |
| 允许的 CORS 来源(逗号分隔,例如 |
|
| 用于 TTS 合成的 Google Gemini API 密钥 | (合成音频回退) |
3. 保护 HTTP MCP 端点
部署到公共服务器时,配置 MCP_AUTH_TOKEN:
export MCP_AUTH_TOKEN=your-secret-token-here
npm run start:http对 /mcp 的传入请求必须包含以下标头:
Authorization: Bearer your-secret-token-here缺少或指定无效令牌的请求将收到 401 Unauthorized 响应。
4. 测试 HTTP 与健康端点
验证健康状态:
curl http://localhost:3000/health # Response: {"status":"ok","service":"remotion-mcp-server"}验证 MCP 初始化:
curl -X POST http://localhost:3000/mcp \ -H "Content-Type: application/json" \ -H "Authorization: Bearer your-secret-token-here" \ -d '{ "jsonrpc": "2.0", "id": 1, "method": "initialize", "params": { "protocolVersion": "2024-11-05", "capabilities": {}, "clientInfo": { "name": "curl-test", "version": "1.0.0" } } }'
5. 部署到 Render(一键 / Blueprint)
该仓库包含一个 render.yaml blueprint 和一个生产就绪的 Dockerfile,其中打包了 Node 20、Chromium、FFmpeg 和 Python 音频库。
将您的仓库推送到 GitHub。
登录 Render,点击 New + -> Blueprint。
连接您的仓库(
remotionMcpServer)。Render 将自动检测render.yaml。在 Render Dashboard 中配置环境变量:
MCP_AUTH_TOKEN:您的自定义密钥令牌。GEMINI_API_KEY:您的 Gemini API 密钥。
部署!您的远程 MCP URL 将是:
https://YOUR-SERVICE-NAME.onrender.com/mcp
6. 连接到 Claude Web
打开自定义 MCP 连接器设置。
输入您的远程 MCP URL:
https://YOUR-SERVICE-NAME.onrender.com/mcp如果启用了认证,请配置
Authorization标头,值为Bearer <your-mcp-auth-token>。保存并连接。Claude Web 将列出全部 5 个可用的 Remotion 工具。
💻 本地 STDIO 设置(Antigravity 与本地客户端)
一键即时设置(推荐)
将单条命令复制并粘贴到您的终端中:
🍎 macOS / Linux(终端)
curl -fsSL https://raw.githubusercontent.com/ivalenzuela/remotion-mcp-server/main/autoinstall.sh | bash🪟 Windows(PowerShell)
iwr -useb https://raw.githubusercontent.com/ivalenzuela/remotion-mcp-server/main/autoinstall.ps1 | iex手动 STDIO 配置
编译服务器:
git clone https://github.com/ivalenzuela/remotion-mcp-server.git cd remotion-mcp-server npm install npm run build在 AI 客户端中注册(
mcp_config.json/claude_desktop_config.json):{ "mcpServers": { "remotion": { "command": "node", "args": ["/path/to/remotion-mcp-server/dist/index.js"], "env": { "GEMINI_API_KEY": "YOUR_GEMINI_API_KEY_HERE" } } } }
🤖 可用的 MCP 工具
所有五个工具在 STDIO 和 流式 HTTP 传输方式下均完全相同:
1. remotion_scaffold_project
使用预构建模板、标准布局组件搭建完整的 React/Remotion 项目,并自动安装 npm 依赖。
参数:
projectName(字符串,必填):目标项目的文件夹名称。template(枚举:tiktok-916、youtube-169、social-11,必填):宽高比。targetDir(字符串,必填):父目录路径。
2. remotion_analyze_audio
使用 Python Librosa 对音频文件执行信号处理,返回 BPM、节拍帧、能量分布、推荐的场景剪辑帧号,并对齐 SRT 字幕。
参数:
audioPath(字符串,必填):输入音频轨道的路径。srtPath(字符串,可选):SRT 字幕文件的路径。outputPath(字符串,可选):保存输出 JSON 分析结果的路径。fps(数字,默认30):目标合成帧率。minSceneDuration(数字,默认3.5):场景剪辑之间的最小秒数。
3. remotion_generate_tts
使用 Google Gemini 3.1 Flash TTS(gemini-3.1-flash-tts-preview)合成语音,并输出按字符加权的词级时间码。如果不存在 GEMINI_API_KEY,则自动回退到干净的合成音频。
参数:
text(字符串,必填):要合成的对白文本。outputPath(字符串,必填):保存生成的.wav文件的路径。voice(字符串,默认"Puck"):Gemini 预置语音名称。accent(字符串,可选):可选的地区口音指令。fps(数字,默认30):帧率。
4. remotion_preview_frame
使用 Remotion 的 CLI 渲染合成中特定帧的静态快照图像(PNG/JPEG/WebP)。
参数:
projectDir(字符串,必填):Remotion 项目的路径。compositionId(字符串,必填):目标合成 ID。frame(数字,默认0):要捕获的帧索引。imageFormat(枚举:png、jpeg、webp,默认png):格式。props(对象,可选):输入的 React props。
5. remotion_render_video
将合成编译为生产级视频(MP4/WebM)。
参数:
projectDir(字符串,必填):Remotion 项目的路径。compositionId(字符串,必填):目标合成 ID。outputPath(字符串,可选):输出视频路径。concurrency(数字/字符串,默认"auto"):使用的 CPU 线程数。codec(字符串,默认"h264"):目标编解码器。props(对象,可选):输入的 React props。
🎨 预构建的 React 组件
脚手架项目包含以下生产就绪的布局组件:
SubtitleOverlay:逐词动态缩放和自定义文本阴影发光("Efecto Lupa PRO"),用于双语字幕。KenBurnsImage:基于插值的干净图像缩放和平移,无需 CSS 动画。AudioSpectrum:声音频谱可视化条,与配乐反应式同步。LowerThird:优雅的下三分之一弹出框,用于社交媒体个人资料或名片。
🧪 测试与验证
运行完整的 E2E 测试套件以验证工具执行、路径解析和 CLI 渲染:
npm test📄 许可证
本项目根据 MIT 许可证 授权。
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
This server cannot be deployed
Maintenance
Related MCP Connectors
AI video editor your agent can drive: plan scenes, edit a multi-track timeline, and render MP4s.
The agentic video editor for ChatGPT and Claude. Ask in your chat and it cuts, captions, adds music, titles and motion graphics on a real timeline you can open and adjust.
Open-source AI video editor: cut, caption, clip and animate real Revline projects from your agent.
Agentic AI video editor: edit a real timeline, generate clips, music and voice, then render.
Related MCP Servers
- AlicenseAqualityCmaintenanceEnables AI assistants to create professional YouTube videos using Remotion with a design-system-first approach. Provides 20+ video components, 7 themes, and animated elements optimized for engagement and retention.1524Apache 2.0
- FlicenseNot gradedqualityDmaintenanceEnables agentic vision loops for Remotion by providing tools to discover projects, list compositions, take screenshots, and render storyboards, returning images for model evaluation.-
- AlicenseNot gradedqualityDmaintenanceEnables AI agents to analyze audio beats, synthesize voices with Google Gemini TTS, and programmatically construct and render professional videos using Remotion and React.MIT
- AlicenseBqualityBmaintenanceEnables AI agents to turn natural-language creative direction, transcripts, and source media into fully structured, editable video projects, then verify and render delivery files.378MIT