Skip to main content
Glama

RV MCP サーバー

Claude などの AI アシスタントを、業界標準のメディアレビューアプリケーションである Autodesk/Tweak RV に接続する MCP (Model Context Protocol) サーバーです。再生制御、ショットの比較、カラーグレーディングの調整、レビューセッションの管理をすべて自然言語で行えます。

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 45124

2. インストールと登録

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_MCP_HOST

127.0.0.1

RV ネットワークホスト

RV_MCP_PORT

45124

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> DISCONNECT

OCIO カラーマネジメント

サーバーには OCIO v2 の完全なサポートが含まれています。$OCIO が設定されている場合、RV は DCC アプリ(3ds Max/Redshift、Nuke など)で使用されるディスプレイ変換と正確に一致させることができます。

自動設定

RV がメディアを読み込む際に OCIO を自動設定する rv_ocio_setup.py スクリプトが含まれています:

  • 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 設定

ツール

説明

get_ocio_config

アクティブな OCIO 設定からカラースペース、ディスプレイ、ビュー、ルックを一覧表示

set_ocio_colorspace

ソースの入力カラースペースを設定 (OCIOCFile ノードを挿入)

set_ocio_display

ディスプレイ変換を設定 (OCIODisplay ノードを挿入)

set_ocio_look

ソースに OCIO ルックを適用

get_ocio_state

現在の OCIO ノードの状態を JSON で取得

clear_ocio

OCIO ノードを削除し、デフォルトのパイプラインを復元

Redshift + RV のカラーマッチング

Redshift の OCIO 設定 ($OCIO = C:\ProgramData\redshift\Data\OCIO\config.ocio) を使用する場合、そのファイルルールでは EXR が「Raw」としてマークされることに注意してください。rv_ocio_setup.py スクリプトは、浮動小数点形式をシーンリニアとして検出することでこれをオーバーライドし、Redshift のレンダービューと同様に RV で ACES トーンマッパーが適用されるようにします。

ツール (合計 47)

実行 (1)

ツール

説明

execute_mu

任意の Mu コードを実行 — 専用ツールでカバーされていない操作のためのエスケープハッチ

OCIO (6)

ツール

説明

get_ocio_config

OCIO 設定情報を取得 (カラースペース、ディスプレイ、ビュー、ルック)

set_ocio_colorspace

ソースの OCIO 入力カラースペースを設定

set_ocio_display

OCIO ディスプレイ変換を設定

set_ocio_look

OCIO ルックを適用

get_ocio_state

現在の OCIO 状態を JSON で取得

clear_ocio

OCIO ノードを削除し、デフォルトを復元

再生 (17)

ツール

説明

load_source

メディアファイル(画像シーケンス、動画、または単一画像)を読み込み

load_sources

複数のメディアファイルを一度に読み込み

play

再生を開始

stop

再生を停止

toggle_playback

再生/停止を切り替え、新しい状態を返す

get_frame

現在のフレーム番号を取得

set_frame

特定のフレームにジャンプ

step_forward

N フレーム進める (デフォルト 1)

step_backward

N フレーム戻す (デフォルト 1)

set_in_point

インポイント(再生範囲の開始)を設定

set_out_point

アウトポイント(再生範囲の終了)を設定

get_in_out_points

現在のイン/アウトポイントを JSON で取得

set_fps

再生 FPS を設定

get_fps

現在の再生 FPS を取得

set_realtime

リアルタイムモードを有効/無効化 (FPS を維持するためにフレームをスキップ)

set_play_mode

ループモードを設定: loop, once, pingpong

set_playback_speed

再生方向と速度を設定 (1=順方向, -1=逆方向, 2=2倍速など)

get_frame_range

完全な再生状態を JSON で取得 (フレーム、範囲、イン/アウト、再生中、FPS)

ソース (7)

ツール

説明

get_sources

読み込まれたすべてのソースノードを JSON 配列で一覧表示

get_source_media_info

詳細なメディア情報を取得 (解像度、フレーム範囲、FPS、ビット深度、チャンネル)

get_sources_at_frame

特定のフレームで表示されているソースノードを取得

new_session

新しい空のセッションを作成

clear_session

現在のセッションからすべてのソースをクリア

save_session

セッションを .rv ファイルとして保存

get_session_info

セッション状態を JSON で取得 (ビューノード、フレーム範囲、ソース数)

比較 (4)

ツール

説明

set_view_mode

ビューを切り替え: sequence (順次再生), stack (比較用レイヤー), layout (並べて表示)

set_composite_type

スタック合成モードを設定: over, add, difference, -difference, replace, topmost

toggle_wipe

A/B ワイプ比較を切り替え (自動的にスタックビューに切り替わります)

get_view_info

現在のビュー状態を JSON で取得

カラー (12)

ツール

説明

set_lut

ターゲット (look, linearize, display) に LUT ファイル (.3dl, .csp, .cube など) を読み込み

clear_lut

ターゲット上の LUT を無効化

set_cdl

CDL 値を設定 (slope, offset, power, saturation) — 部分更新をサポート

clear_cdl

CDL 色補正を無効化

set_exposure

露出を設定 (チャンネルごと、または一括)

set_gamma

ガンマ補正を設定

set_saturation

彩度を設定

get_color_settings

現在の色補正状態を JSON で取得

set_display_gamma

ディスプレイガンマを設定 (例: sRGB のような場合は 2.2)

set_display_srgb

sRGB ディスプレイ変換を有効/無効化

set_background

ビューポートの背景を設定: black, checker, grey18, grey50, crosshatch

使用例

フッテージの読み込みとレビュー

"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"

2 つのバージョンの比較

"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"

高度な操作 (raw 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 tools
clear_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

    B3.3/5.0

    Scored across 47 tools

    Disambiguation4/5

    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 Consistency3/5

    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.

    Tool Count2/5

    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.

    Completeness4/5

    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

    ActivityInactive
    ResponsivenessNo recent community issues

    Related MCP Connectors

    Related MCP Servers