RV MCP Server
RV MCP 服务器
MCP (Model Context Protocol) 服务器,将 Claude 等 AI 助手连接到行业标准媒体审阅应用程序 Autodesk/Tweak RV。通过自然语言控制播放、比较镜头、调整色彩分级并管理审阅会话。
RV 内部无需插件。使用 RV 内置的网络监听器,通过 remote-eval 执行 Mu 脚本。
要求
OpenRV (或 RV 2022.3.1+),并启用网络模式
Python 3.10+
uv 包管理器
Related MCP server: davinci-resolve-mcp-free
快速入门
1. 启动带有网络功能的 RV
通过 RV → Networking → Enable Network 启用 RV 中的网络功能(默认端口 45124)。
或者通过命令行:
rv -network -networkPort 451242. 安装与注册
Claude Code (CLI):
claude mcp add --scope user rv-mcp -- uv run --no-sync --directory /path/to/RV_MCP rv-mcp注意:
--no-sync可防止多个 Claude 会话共享同一个 MCP 服务器时出现文件锁冲突。在更改依赖项后手动运行uv sync。
Claude Desktop (~/.claude.json):
{
"mcpServers": {
"rv-mcp": {
"command": "uv",
"args": ["run", "--no-sync", "--directory", "/path/to/RV_MCP", "rv-mcp"]
}
}
}环境变量 (可选):
变量 | 默认值 | 描述 |
|
| RV 网络主机 |
|
| RV 网络端口 |
3. 使用方法
让 Claude 加载媒体、控制播放、比较镜头或调整颜色。服务器会自动将自然语言转换为 RV 命令。
架构
Claude (stdio/MCP) --> FastMCP Server --> RV Network Protocol (TCP:45124) --> RV服务器使用基于 RV RvCommunicator 的自定义协议与 RV 保持 持久 TCP 连接。关键设计决策:
持久连接:在套接字丢失时自动重连
线程安全:通过
threading.Lock实现并发工具调用安全关闭:通过
atexit处理程序发送DISCONNECT(否则 RV 将拒绝后续连接)Mu 字符串处理:返回值会自动取消引用和转义
协议流程
1. Connect TCP to 127.0.0.1:45124
2. Send: NEWGREETING <len> rv-mcp rvController
3. Send: PINGPONGCONTROL 1 0 (disable heartbeat)
4. Recv: NEWGREETING <len> <rv-name> (consume RV's greeting)
5. For each command:
Send: MESSAGE <len> RETURNEVENT remote-eval * { require commands; <mu_code> }
Recv: MESSAGE <len> RETURN <value>
6. On shutdown:
Send: MESSAGE <len> DISCONNECTOCIO 色彩管理
服务器包含完整的 OCIO v2 支持。当设置 $OCIO 时,RV 可以匹配 DCC 应用程序(3ds Max/Redshift、Nuke 等)使用的精确显示变换。
自动配置
包含一个 rv_ocio_setup.py 脚本,当 RV 加载媒体时会自动配置 OCIO:
EXR/HDR/TX 文件:自动检测为场景线性(通过
scene_linear角色使用 ACEScg)显示变换:根据配置的默认值设置(例如
sRGB/ACES 1.0 SDR-video)色度元数据:EXR 中的色度元数据与活动配置的色彩空间相匹配
要安装,请将 rv_ocio_setup.py 复制到您的 RV 支持路径:
# Windows
copy rv_ocio_setup.py %APPDATA%\RV\Python\
# Linux/macOS
cp rv_ocio_setup.py ~/.rv/Python/RV 内置的 ocio_source_setup 包将自动检测并使用此覆盖设置。
通过 MCP 进行手动 OCIO 操作
工具 | 描述 |
| 从活动 OCIO 配置中列出色彩空间、显示、视图和外观 |
| 设置源的输入色彩空间(插入 OCIOFile 节点) |
| 设置显示变换(插入 OCIODisplay 节点) |
| 将 OCIO 外观应用于源 |
| 以 JSON 格式获取当前 OCIO 节点状态 |
| 移除 OCIO 节点并恢复默认管线 |
Redshift + RV 色彩匹配
如果您使用 Redshift 的 OCIO 配置($OCIO = C:\ProgramData\redshift\Data\OCIO\config.ocio),请注意其文件规则将 EXR 标记为“Raw”。rv_ocio_setup.py 脚本通过将浮点格式检测为场景线性来覆盖此设置,确保在 RV 中应用 ACES 色调映射,就像在 Redshift 的渲染视图中一样。
工具 (共 47 个)
执行 (1)
工具 | 描述 |
| 运行任意 Mu 代码 — 用于处理专用工具未涵盖的任何操作 |
OCIO (6)
工具 | 描述 |
| 获取 OCIO 配置信息(色彩空间、显示、视图、外观) |
| 设置源的 OCIO 输入色彩空间 |
| 设置 OCIO 显示变换 |
| 应用 OCIO 外观 |
| 以 JSON 格式获取当前 OCIO 状态 |
| 移除 OCIO 节点,恢复默认设置 |
播放 (17)
工具 | 描述 |
| 加载媒体文件(图像序列、电影或单张图像) |
| 同时加载多个媒体文件 |
| 开始播放 |
| 停止播放 |
| 切换播放/停止,返回新状态 |
| 获取当前帧号 |
| 跳转到特定帧 |
| 向前步进 N 帧(默认 1) |
| 向后步进 N 帧(默认 1) |
| 设置入点(播放范围的开始) |
| 设置出点(播放范围的结束) |
| 以 JSON 格式获取当前入/出点 |
| 设置播放帧率 |
| 获取当前播放 FPS |
| 启用/禁用实时模式(跳帧以保持 FPS) |
| 设置循环模式: |
| 设置播放方向和速度(1=正向,-1=反向,2=2倍速等) |
| 以 JSON 格式获取完整播放状态(帧、范围、入/出点、播放状态、FPS) |
源 (7)
工具 | 描述 |
| 以 JSON 数组列出所有已加载的源节点 |
| 获取详细媒体信息(分辨率、帧范围、FPS、位深、通道) |
| 获取在特定帧可见的源节点 |
| 创建新的空会话 |
| 清除当前会话中的所有源 |
| 将会话保存到 |
| 以 JSON 格式获取会话状态(视图节点、帧范围、源计数) |
比较 (4)
工具 | 描述 |
| 切换视图: |
| 设置堆叠合成模式: |
| 切换 A/B 擦除比较(自动切换到堆叠视图) |
| 以 JSON 格式获取当前视图状态 |
颜色 (12)
工具 | 描述 |
| 在目标( |
| 取消目标上的 LUT |
| 设置 CDL 值(斜率、偏移、幂、饱和度) — 支持部分更新 |
| 取消 CDL 色彩校正 |
| 设置曝光(按通道或统一) |
| 设置伽马校正 |
| 设置饱和度 |
| 以 JSON 格式获取当前色彩校正状态 |
| 设置显示伽马(例如 sRGB 类显示器为 2.2) |
| 启用/禁用 sRGB 显示变换 |
| 设置视口背景: |
使用示例
加载并审阅素材
"Load the EXR sequence at /shots/sh010/comp/sh010_comp.1-100#.exr"
"Play it back at 24fps"
"Go to frame 50"
"Set in point at 20 and out point at 80"比较两个版本
"Load both /shots/sh010/comp_v1.mov and /shots/sh010/comp_v2.mov"
"Switch to stack view"
"Set composite to difference mode"
"Toggle the wipe to compare side by side"色彩校正
"Apply CDL with slope [1.1, 0.95, 1.0] and saturation 1.2"
"Load the ACES LUT from /luts/sRGB.cube"
"Set exposure to 0.5"
"Show me the current color settings"高级 (原始 Mu)
"Execute this Mu code: { require commands; let s = sources(); string(s.size()); }"项目结构
RV_MCP/
├── pyproject.toml # Package config, entry point, dependencies
├── README.md
├── .gitignore
└── src/
├── __init__.py
├── server.py # FastMCP server + RvClient instantiation
├── rv_client.py # Persistent TCP client (RV network protocol)
└── tools/
├── __init__.py
├── execute.py # execute_mu — raw Mu escape hatch
├── playback.py # 17 playback/transport tools
├── sources.py # 7 source & session tools
├── compare.py # 4 view/compare tools
├── color.py # 12 color/LUT/CDL tools
└── ocio.py # OCIO v2 color management tools故障排除
“无法连接到 RV”
确保 RV 在启动时带有
-network标志检查 45124 端口是否未被防火墙阻止
使用
-networkPort 45124显式设置端口
RV 在崩溃后拒绝连接
如果服务器在未发送 DISCONNECT 的情况下退出,RV 可能会拒绝新连接。重启 RV 以清除状态。服务器包含一个 atexit 处理程序,以防止在正常操作下发生这种情况。
Mu 代码错误
始终将代码块包装在
{ require commands; ... }中Mu 会评估
if/then/else的两个分支 — 避免在可能不存在的节点上访问属性文件路径必须使用正斜杠;
escape_mu_string()会自动处理此问题
超时错误
默认超时为 30 秒。如果 Mu 代码执行时间过长(例如加载大型序列),可能会超时。对于长时间操作,请使用 execute_mu 并考虑将其拆分为更小的步骤。
开发
# Install dependencies
uv sync
# Run the server directly
uv run rv-mcp
# Run with debug logging
uv run python -m src.server许可证
MIT
Available Tools
47 toolsclear_cdlA
Deactivate CDL color correction.
Inputs: no named parameters. Returns: result
clear_lutA
Deactivate the LUT on a target.
Args: target: Which LUT to clear: "look", "linearize", or "display".
Inputs: target. Returns: result
clear_ocioA
Remove OCIO nodes and restore default RV pipeline.
Args: target: What to clear — "linearize", "display", "look", or "all".
Inputs: target. Returns: result
clear_sessionA
Clear all sources from the current session.
Inputs: no named parameters. Returns: result
execute_muA
Execute arbitrary Mu code in RV and return the result.
The code is evaluated via remote-eval. Use 'require commands;' at the start if you need commands functions like play(), stop(), etc.
Examples: execute_mu("{ require commands; string(frame()); }") execute_mu("{ require commands; play(); "playing"; }") execute_mu("{ require commands; sources(); }")
Inputs: code (required). Returns: result
get_color_settingsA
Get current color correction settings as JSON.
Requires at least one source loaded in the session.
Inputs: no named parameters. Returns: result
get_fpsA
Get the current playback FPS.
Inputs: no named parameters. Returns: result
get_frameA
Get the current frame number in RV.
Inputs: no named parameters. Returns: result
get_frame_rangeA
Get the full frame range and current state as JSON.
Returns JSON with: frame, frameStart, frameEnd, inPoint, outPoint, playing, fps.
Inputs: no named parameters. Returns: result
get_in_out_pointsA
Get the current in/out points as JSON.
Inputs: no named parameters. Returns: result
get_ocio_configA
Get OCIO config information as JSON.
Returns color spaces, displays, views, and looks from the active OCIO config (or a specific config file).
Args: config_path: Optional path to an OCIO config file. If omitted, uses the $OCIO environment variable.
Inputs: config_path. Returns: result
get_ocio_stateA
Get current OCIO state for all sources and display as JSON.
Returns which sources have OCIO nodes and their settings.
Inputs: no named parameters. Returns: result
get_session_infoB
Get current session information as JSON.
Returns: viewNode, frame, frameStart, frameEnd, sourceCount.
Inputs: no named parameters. Returns: result
get_source_media_infoB
Get detailed media info for a source node.
Args: source_node: The source node name (e.g. "sourceGroup000000").
Inputs: source_node (required). Returns: result
get_sourcesB
List all sources currently loaded in RV as JSON.
Returns a JSON array with source node names.
Inputs: no named parameters. Returns: result
get_sources_at_frameA
Get source nodes visible at a specific frame.
Args: frame: Frame number to query (-1 for current frame).
Inputs: frame. Returns: result
get_view_infoA
Get current view state as JSON.
Returns: viewNode, viewType, and wipe state.
Inputs: no named parameters. Returns: result
load_sourceA
Load a media file (image sequence, movie, or single image) into RV.
Args: file_path: Path to the media file. For sequences use RV notation e.g. "/path/to/image.1-100#.exr" or just the path to one frame.
Inputs: file_path (required). Returns: result
load_sourcesA
Load multiple media files into RV at once.
Args: file_paths: List of paths to media files.
Inputs: file_paths (required). Returns: result
new_sessionA
Create a new empty session, clearing all current sources.
Inputs: no named parameters. Returns: result
playB
Start playback in RV.
Inputs: no named parameters. Returns: result
save_sessionC
Save the current session to an .rv file.
Args: file_path: Path for the .rv session file.
Inputs: file_path (required). Returns: result
set_backgroundB
Set the viewport background.
Args: method: One of "black", "checker", "grey18", "grey50", "crosshatch".
Inputs: method. Returns: result
set_cdlB
Set CDL (Color Decision List) values.
All parameters are optional — only provided values are changed.
Args: slope: RGB slope values [r, g, b]. offset: RGB offset values [r, g, b]. power: RGB power values [r, g, b]. saturation: Global saturation value.
Inputs: slope, offset, power, saturation. Returns: result
set_composite_typeA
Set the compositing mode when in stack view.
Automatically switches to stack view if not already in it.
Args: composite_type: One of "over", "add", "difference", "-difference", "replace", "topmost".
Inputs: composite_type. Returns: result
set_display_gammaB
Set display gamma.
Args: gamma: Display gamma value (e.g. 2.2 for sRGB-like).
Inputs: gamma (required). Returns: result
set_display_srgbA
Enable or disable sRGB display transform.
Args: enabled: True to enable sRGB, False to disable.
Inputs: enabled. Returns: result
set_exposureB
Set exposure adjustment.
Args: value: Exposure value (0.0 = no change). channel: "all" for uniform, or "r", "g", "b" for per-channel.
Inputs: value (required), channel. Returns: result
set_fpsC
Set the playback frames per second.
Args: fps: Target FPS value.
Inputs: fps (required). Returns: result
set_frameB
Go to a specific frame in RV.
Args: frame: The frame number to jump to.
Inputs: frame (required). Returns: result
set_gammaB
Set gamma correction.
Args: value: Gamma value (1.0 = no change).
Inputs: value (required). Returns: result
set_in_pointB
Set the in-point (start of playback range).
Args: frame: Frame number for the in-point.
Inputs: frame (required). Returns: result
set_lutA
Load a LUT file and activate it.
Args: lut_file_path: Path to the LUT file (.3dl, .csp, .cube, etc.). target: Where to apply: "look" (color pipeline), "linearize" (input linearization), "display" (display transform).
Inputs: lut_file_path (required), target. Returns: result
set_ocio_colorspaceA
Set the OCIO input color space for a source.
Inserts an OCIOFile node into the source's linearize pipeline, converting from the specified color space to scene-linear.
Args: colorspace: Input color space name (e.g. "sRGB - Texture", "ACEScg"). source_node: Source group name (e.g. "sourceGroup000000"). If omitted, uses the first source.
Inputs: colorspace (required), source_node. Returns: result
set_ocio_displayB
Set the OCIO display transform.
Inserts an OCIODisplay node into the display pipeline.
Args: display: Display name (e.g. "sRGB - Display"). view: View name (e.g. "ACES 1.0 - SDR Video").
Inputs: display (required), view (required). Returns: result
set_ocio_lookA
Apply an OCIO look to a source.
Inserts an OCIOLook node into the source's look pipeline.
Args: look: Look name from the OCIO config. direction: "forward" or "inverse". source_node: Source group name. If omitted, uses the first source.
Inputs: look (required), direction, source_node. Returns: result
set_out_pointB
Set the out-point (end of playback range).
Args: frame: Frame number for the out-point.
Inputs: frame (required). Returns: result
set_playback_speedA
Set the playback increment (direction and speed).
Args: direction: Positive for forward, negative for reverse. 1 = normal forward, -1 = normal reverse, 2 = 2x forward, etc.
Inputs: direction. Returns: result
set_play_modeA
Set the playback loop mode.
Args: mode: One of "loop", "once", or "pingpong".
Inputs: mode. Returns: result
set_realtimeA
Enable or disable realtime playback mode.
When enabled, RV will skip frames to maintain the target FPS.
Args: enabled: True to enable realtime, False to play every frame.
Inputs: enabled. Returns: result
set_saturationB
Set saturation.
Args: value: Saturation value (1.0 = normal, 0.0 = desaturated).
Inputs: value (required). Returns: result
set_view_modeA
Switch RV's view mode.
Args: mode: One of "sequence" (play sources in order), "stack" (layer sources for comparison), "layout" (tile sources side by side).
Inputs: mode (required). Returns: result
step_backwardB
Step backward by N frames.
Args: count: Number of frames to step backward (default 1).
Inputs: count. Returns: result
step_forwardA
Step forward by N frames.
Args: count: Number of frames to step forward (default 1).
Inputs: count. Returns: result
stopA
Stop playback in RV.
Inputs: no named parameters. Returns: result
toggle_playbackA
Toggle play/stop in RV. Returns the new state.
Inputs: no named parameters. Returns: result
toggle_wipeA
Toggle wipe mode on/off for A/B comparison in stack view.
Automatically switches to stack view first.
Inputs: no named parameters. Returns: result
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 47 tools
Most tools have distinct purposes, with clear descriptions differentiating them. There is some potential confusion between similar 'clear' tools and frame-info tools, but overall an agent can distinguish well.
Naming uses underscores consistently but verb style varies (clear_, get_, set_, load_, play, stop, toggle). The pattern is not strictly verb_noun throughout, e.g., 'execute_mu' and 'new_session' deviate. Still readable.
With 47 tools, the server is quite heavy. While the domain (media playback and color correction) can justify many tools, this count feels excessive and could be streamlined.
The tool set covers most aspects of RV control: session management, source loading, playback, frame navigation, color correction (CDL, LUT, OCIO), display settings, and view modes. A notable gap is the lack of a tool to remove individual sources.
Maintenance
Related MCP Connectors
Edit video by talking to your AI — search footage, cut timelines, apply effects, add captions.
Video review and collaboration for teams and agents: a full review interface for agentic video and motion graphics, feedback by voice, screen and drawing on the frame, agents that iterate version by version, and every version's notes and source files saved for the team.
QC, conform and AI video, image and sound generation for film. Priced before every run.
Edit video and audio using natural language.
Related MCP Servers
- AlicenseBqualityDmaintenanceEnables AI-driven DaVinci Resolve 21 automation with 88 tools for project management, timeline editing, color grading, AI analysis, rendering, and dailies creation.884MIT
- AlicenseNot gradedqualityDmaintenanceEnables AI assistants to control DaVinci Resolve (Free and Studio) through natural language, providing 162 tools for timeline editing, color grading, rendering, and more. Includes local AI replacements for Studio-only features like voice isolation, background removal, and transcription.2MIT
- AlicenseBqualityCmaintenanceEnables AI-driven video editing and color grading in DaVinci Resolve, including beat-synced cuts, algorithmic 3D LUT generation, media transcoding, and hands-free playback control through natural language.212MIT
- AlicenseNot gradedqualityCmaintenanceEnables MCP-compatible AI assistants to control Adobe Premiere Pro through natural language, automating project and media management, timeline editing, color and audio adjustments, titles and markers, and batch exports via a local bridge.1MIT