RV MCP Server
RV MCP Server
MCP-сервер (Model Context Protocol), который связывает ИИ-ассистентов, таких как Claude, с Autodesk/Tweak RV, отраслевым стандартом приложений для просмотра медиаконтента. Управляйте воспроизведением, сравнивайте кадры, настраивайте цветокоррекцию и управляйте сеансами просмотра — и всё это с помощью естественного языка.
Внутри RV не требуется установка плагинов. Используется встроенный сетевой прослушиватель RV с поддержкой скриптов Mu через remote-eval.
Требования
OpenRV (или RV 2022.3.1+) с включенным сетевым режимом
Python 3.10+
Менеджер пакетов uv
Related MCP server: davinci-resolve-mcp-free
Быстрый старт
1. Запуск RV с поддержкой сети
Включите сеть в RV через RV → Networking → Enable Network (порт по умолчанию 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Сервер поддерживает постоянное TCP-соединение с RV, используя пользовательский протокол на основе RvCommunicator из RV. Ключевые проектные решения:
Постоянное соединение с автоматическим переподключением при потере сокета
Потокобезопасность через
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> DISCONNECTУправление цветом OCIO
Сервер включает полную поддержку OCIO v2. Когда установлена переменная $OCIO, RV может соответствовать точному преобразованию дисплея, используемому в ваших DCC-приложениях (3ds Max/Redshift, Nuke и т. д.).
Автоматическая настройка
В комплект входит скрипт rv_ocio_setup.py, который автоматически настраивает OCIO при загрузке медиа в RV:
Файлы EXR/HDR/TX автоматически определяются как scene-linear (ACEScg через роль
scene_linear)Преобразование дисплея устанавливается из настроек конфигурации по умолчанию (например,
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/Встроенный пакет ocio_source_setup в RV обнаружит и автоматически применит это переопределение.
Ручное управление OCIO через MCP
Инструмент | Описание |
| Список цветовых пространств, дисплеев, представлений и луков из активной конфигурации OCIO |
| Установка входного цветового пространства для источника (вставляет узел OCIOFile) |
| Установка преобразования дисплея (вставляет узел OCIODisplay) |
| Применение лука OCIO к источнику |
| Получение текущего состояния узла OCIO в формате JSON |
| Удаление узлов OCIO и восстановление конвейера по умолчанию |
Сопоставление цветов Redshift + RV
Если вы используете конфигурацию OCIO от Redshift ($OCIO = C:\ProgramData\redshift\Data\OCIO\config.ocio), обратите внимание, что правила файлов помечают EXR как "Raw". Скрипт rv_ocio_setup.py переопределяет это, определяя форматы с плавающей запятой как scene-linear, гарантируя, что тональный компрессор ACES применяется в RV так же, как в окне рендеринга Redshift.
Инструменты (всего 47)
Выполнение (1)
Инструмент | Описание |
| Запуск произвольного кода Mu — «черный ход» для всего, что не покрыто специализированными инструментами |
OCIO (6)
Инструмент | Описание |
| Получение информации о конфигурации OCIO (цветовые пространства, дисплеи, представления, луки) |
| Установка входного цветового пространства OCIO для источника |
| Установка преобразования дисплея OCIO |
| Применение лука OCIO |
| Получение текущего состояния OCIO в формате JSON |
| Удаление узлов OCIO, восстановление значений по умолчанию |
Воспроизведение (17)
Инструмент | Описание |
| Загрузка медиафайла (последовательность изображений, фильм или одиночное изображение) |
| Загрузка нескольких медиафайлов одновременно |
| Запуск воспроизведения |
| Остановка воспроизведения |
| Переключение воспроизведение/стоп, возвращает новое состояние |
| Получение номера текущего кадра |
| Переход к определенному кадру |
| Шаг вперед на N кадров (по умолчанию 1) |
| Шаг назад на N кадров (по умолчанию 1) |
| Установка начальной точки (начало диапазона воспроизведения) |
| Установка конечной точки (конец диапазона воспроизведения) |
| Получение текущих точек входа/выхода в формате JSON |
| Установка частоты кадров воспроизведения |
| Получение текущей частоты кадров воспроизведения |
| Включение/выключение режима реального времени (пропуск кадров для поддержания FPS) |
| Установка режима цикла: |
| Установка направления и скорости воспроизведения (1=вперед, -1=назад, 2=2x и т. д.) |
| Получение полного состояния воспроизведения в формате JSON (кадр, диапазон, точки входа/выхода, воспроизведение, FPS) |
Источники (7)
Инструмент | Описание |
| Список всех загруженных узлов-источников в виде массива JSON |
| Получение подробной информации о медиа (разрешение, диапазон кадров, FPS, глубина цвета, каналы) |
| Получение узлов-источников, видимых на конкретном кадре |
| Создание нового пустого сеанса |
| Очистка всех источников из текущего сеанса |
| Сохранение сеанса в файл |
| Получение информации о сеансе в формате JSON (узел просмотра, диапазон кадров, количество источников) |
Сравнение (4)
Инструмент | Описание |
| Переключение вида: |
| Установка режима композитинга стека: |
| Переключение сравнения A/B (автоматически переключается в режим стека) |
| Получение текущего состояния вида в формате JSON |
Цвет (12)
Инструмент | Описание |
| Загрузка файла LUT ( |
| Деактивация LUT на цели |
| Установка значений CDL (наклон, смещение, степень, насыщенность) — поддерживаются частичные обновления |
| Деактивация цветокоррекции CDL |
| Установка экспозиции (поканально или равномерно) |
| Установка гамма-коррекции |
| Установка насыщенности |
| Получение текущего состояния цветокоррекции в формате JSON |
| Установка гаммы дисплея (например, 2.2 для sRGB-подобных) |
| Включение/выключение преобразования дисплея 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Устранение неполадок
"Could not connect to 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.1MIT
- 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