Skip to main content
Glama

mcp-server-openexr

MCP Server that gives Claude direct access to local OpenEXR, TX texture, and DPX files, including metadata, channel info, pixel statistics, part extraction, aspect ratio reframing, and EXR sequence to video conversion.

Requirements

  • Python 3.11+

  • uv

Related MCP server: Image Analysis MCP Server

Installation

git clone https://github.com/chordee/mcp-server-openexr.git
cd mcp-server-openexr
uv sync

Running

uv run main.py

Tools

EXR

Tool

Description

get_exr_info

Resolution, part count, channel list, compression

get_exr_header

Full header attributes including custom metadata

get_exr_channels

Channel pixel type (HALF/FLOAT/UINT) and sampling

get_exr_pixel_stats

Pixel stats: min/max/mean, percentiles, NaN/Inf

get_exr_sequence_info

Inspect EXR sequences, missing and duplicate frames, and estimated video duration

compare_exr_channels

Compare channel differences between two EXR files

check_exr_validity

Validate EXR integrity and detect NaN/Inf pixels

extract_exr_part

Extract one part into a new single-part EXR file

reframe_exr

Adjust aspect ratio by expanding (black borders) or cropping

exr_sequence_to_video

Convert EXR sequence to mp4 or mov with color space conversion

reframe_exr details

Adjusts an EXR to a target aspect ratio (width/height).

  • mode: expand adds zero-value padding on one axis; crop removes pixels from one axis

  • target_ratio: e.g. 2.35, 1.85, 1.7778 (16:9), 1.0

  • anchor: controls which side stays fixed (default center)

    • Width changes (horizontal): left · center · right

    • Height changes (vertical): top · center · bottom

  • Every part of a multi-part EXR gets the same transform (all parts must share one display window)

  • Calls using the old part_index parameter must remove it before retrying

  • The destination is replaced after the new EXR is written successfully

  • Reframe and part extraction preserve color space, view and frame rate metadata. For tiled EXRs they write level 0 and report whether lower tile levels were discarded.

  • Not supported: deep parts, subsampled channels, and parts whose data window differs from the display window (overscan)

exr_sequence_to_video details

Converts an EXR image sequence to video. The bundled ffmpeg binary is used automatically — no external ffmpeg installation required.

  • codec: h264 (.mp4) · h265 (.mp4) · prores_hq (.mov) · prores_4444 (.mov)

  • input_colorspace: linear (Rec.709 linear, default) · acescg (AP1 linear) · srgb (gamma-encoded)

  • output_colorspace: srgb (default) · linear (Rec.709 linear) · acescg (AP1 linear). This controls the RGB conversion. FFmpeg color tags are not set explicitly.

  • tonemap: none (clamp, default) · reinhard (soft roll-off, useful when source has HDR values > 1)

  • crf: CRF quality for h264/h265 (0–51, lower = better; defaults: h264=18, h265=20). Ignored for ProRes, with a note in the result.

  • exposure: Multiplier applied before tone mapping (default 1.0)

  • scale: Output resolution scale, e.g. 0.5 = 50% (default 1.0)

  • channels: null = auto-detect (R/G/B, plus A for ProRes 4444 alpha); or 3 names e.g. ["beauty.R","beauty.G","beauty.B"]; or 1 packed name e.g. ["beauty.RGBA"]

Use get_exr_sequence_info with the same pattern and fps to preview the groups, duplicate numbers and gaps. The preflight summary uses all matching filenames. max_files limits the header scan. Filename groups are defined by the text before and after the last number in the stem. The summary lists up to 20 groups, with up to 20 missing and duplicate numbers per group and separate totals.

Video export requires one group with unique frame numbers. Missing frames are skipped. Preflight reports the estimated duration from the matched files and the duration of the full frame range for comparison. Frames are rendered at their display window size. Frames that fail to render are skipped and listed in frame_errors. The result includes the encoded duration. FFmpeg must succeed before replacing an existing output. Cancelling before that replacement stops the encoder and discards its staged output.

The conversion is intended for review proxies. RGB is clamped to 0–1 and quantized to 8-bit before encoding, including when the selected codec uses a higher bit-depth pixel format.

Typical usage:

Source EXR

Target

Settings

ACEScg render

sRGB review (mp4)

input_colorspace='acescg', output_colorspace='srgb'

Linear render

sRGB review (mp4)

input_colorspace='linear', output_colorspace='srgb'

ACEScg render

sRGB review proxy (ProRes)

input_colorspace='acescg', output_colorspace='srgb', codec='prores_hq'

TX (MIP-mapped textures)

TX files are MIP-mapped textures generated by maketx (OpenImageIO/Arnold), used in RenderMan and Arnold rendering pipelines.

Tool

Description

get_tx_info

Resolution, MIP pyramid, channel list, tile size, color space

get_tx_header

Full metadata for a given MIP level

get_tx_channels

Channel names, pixel types, and tiling info

get_tx_pixel_stats

Pixel stats per channel; use a higher mip_level for fast approximate stats on large textures

get_tx_sequence_info

Inspect TX sequences, missing and duplicate frames, and inconsistencies

DPX

DPX (Digital Picture Exchange) files are commonly used in film scanning, digital intermediate (DI), and VFX pipelines. Supports 8-, 10-, 12-, and 16-bit formats.

Tool

Description

get_dpx_info

Resolution, image element count, channel list, pixel format, bit depth, and color space

get_dpx_header

Full DPX header metadata including film/TV-specific fields; subimage selects the image element

get_dpx_pixel_stats

Pixel stats: min/max/mean, percentiles, NaN/Inf counts; subimage selects the image element

Tests

uv run pytest

Claude Desktop Configuration

Add the following to claude_desktop_config.json:

{
  "mcpServers": {
    "openexr": {
      "command": "uv",
      "args": [
        "run",
        "--directory",
        "/path/to/mcp-server-openexr",
        "main.py"
      ]
    }
  }
}

Available Tools

18 tools
check_exr_validityA

Validate that an EXR file can be opened and optionally scan for NaN/Inf pixels. By default scans all channels; specify channels to reduce I/O on large files.

Inputs: file_path (required), channels, check_pixels.

compare_exr_channelsA

Compare channels between two EXR files. Reports max, mean, and RMS differences. Useful for QC between different render versions.

Inputs: file_path_a (required), file_path_b (required), channels, part_index.

exr_sequence_to_videoA
Convert an EXR image sequence to video (mp4 or mov).

Reads RGB channels from each EXR frame, applies color space conversion, and encodes
with the bundled ffmpeg binary — no external ffmpeg installation needed.

Color pipeline: decode input gamma/primaries → Rec.709 linear working space
→ exposure → tonemap → convert to output primaries → encode output gamma → uint8.
RGB is clamped to 0–1 and quantized before encoding, including for ProRes.
The selected output color space is reported in the result; color tags are not set explicitly.

Codec options:
- h264: H.264, .mp4 — widely compatible, good for dailies and review
- h265: H.265, .mp4 — better compression, requires modern player support
- prores_hq: Apple ProRes HQ, .mov — review proxy
- prores_4444: Apple ProRes 4444, .mov — review proxy with optional alpha. Alpha is encoded when auto-detection
  finds an A channel or channels names a packed RGBA or layer with .A; three explicit
  channel names (R, G, B) produce video without alpha.

Typical usage:
- ACEScg EXR → sRGB review video: input_colorspace='acescg', output_colorspace='srgb'
- Linear EXR → sRGB review video: input_colorspace='linear', output_colorspace='srgb'
- sRGB EXR → sRGB review video: input_colorspace='srgb', output_colorspace='srgb'

Use tonemap='reinhard' when the source has HDR values well above 1.0.
Frames are sorted by the last numeric run in the filename (e.g. frame.0001.exr, shot.10.beauty.exr).
The pattern must select one sequence with unique frame numbers. Missing frames are skipped;
preflight reports the duration estimate with and without the gaps.
Each frame is rendered at its displayWindow size; frames whose displayWindow differs from
the first frame are skipped. frame_errors lists at most 10 skipped frames and
frame_error_count gives the total. The output file is only replaced
after ffmpeg succeeds. Cancellation before replacement leaves the existing output in place.

Inputs: directory (required), output_path (required), crf, fps, +9 more.

extract_exr_partA
Extract a single part from a multi-part EXR and save it as a new single-part EXR file.

Specify the target part by name (e.g. 'C', 'AO') or by index. Name takes precedence.
Output is written to <source_dir>/<part_name>/<source_filename>.
The output directory must not already exist (non-destructive).
Only essential header attributes are carried over; renderer-specific metadata
(render times, camera matrices, etc.) is omitted since the source file retains
the full record.
For tiled images, the result reports whether lower-resolution tile levels were discarded.

Inputs: file_path (required), part_name, part_index.

get_dpx_headerB

Return all header metadata for the DPX file, including DPX-specific fields such as transfer characteristic, colorimetric, input device, frame position, timecode, and signal standard.

Inputs: file_path (required), subimage.

get_dpx_infoA
Return basic DPX file info: resolution, image element count, channel list, pixel format,
bit depth, transfer characteristic, colorimetric, packing, timecode, and input device.
Good starting point for inspecting a DPX frame from a film scan or digital camera.

Inputs: file_path (required).

get_dpx_pixel_statsA
Compute pixel statistics per channel: min, max, mean, percentiles (p25/p50/p75/p95),
and NaN/Inf pixel counts. Integer DPX (e.g. 10-bit Cineon log) is normalized to 0-1;
floating-point DPX is reported as-is. See the stats_note field for details.

Inputs: file_path (required), channels, subimage, ignore_nan.

get_exr_channelsA
Return channel details for the given part: pixel type (HALF/FLOAT/UINT) and sampling.

Inputs: file_path (required), part_index.

get_exr_headerB

Return all header attributes for the given part, including custom metadata such as Houdini render settings and color space information.

Inputs: file_path (required), part_index.

get_exr_infoA
Return basic EXR file info: resolution, part count, channel list, and compression.
Good starting point for exploring an unfamiliar EXR file.

Inputs: file_path (required).

get_exr_pixel_statsA
Compute pixel statistics per channel: min, max, mean, percentiles (p25/p50/p75/p95),
and NaN/Inf pixel counts. Useful for QC and brightness analysis.

Inputs: file_path (required), channels, ignore_nan, part_index.

get_exr_sequence_infoA

Scan a directory for an EXR sequence. Reports frame range, missing frames, and any inconsistencies in resolution or channels across frames. Preflight groups all matching filenames and reports duplicate frame numbers and estimated durations.

Inputs: directory (required), fps, pattern, max_files.

get_tx_channelsA
Return channel details for the TX file: channel names, pixel types (HALF/FLOAT/UINT8),
and tiling information. Channels are identical across all MIP levels.

Inputs: file_path (required), mip_level.

get_tx_headerA

Return all metadata attributes for the given MIP level, including color space, texture format, software tag, and any custom maketx/Arnold metadata.

Inputs: file_path (required), mip_level.

get_tx_infoA
Return basic TX file info: resolution, MIP pyramid, channel list, tile size,
color space, and compression. Good starting point for inspecting a maketx texture.

Inputs: file_path (required).

get_tx_pixel_statsA
Compute pixel statistics per channel at the specified MIP level: min, max, mean,
percentiles (p25/p50/p75/p95), and NaN/Inf counts. Use a higher MIP level
(e.g. mip_level=4) for fast approximate statistics on large textures.

Inputs: file_path (required), channels, mip_level, ignore_nan.

get_tx_sequence_infoA

Scan a directory for a TX texture sequence. Reports frame range, missing frames, and inconsistencies in resolution, channels, MIP level count, or tile size across frames. Preflight groups all matching filenames and reports duplicate frame numbers.

Inputs: directory (required), pattern, max_files.

reframe_exrA
Adjust an EXR's aspect ratio by expanding (adding black borders) or cropping.

Expand mode: adds zero-value padding on one axis so the image reaches target_ratio.
Crop mode: removes pixels from one axis so the image reaches target_ratio.

The anchor controls which side stays fixed:
- When width changes (horizontal adjustment): left / center / right
- When height changes (vertical adjustment): top / center / bottom

Every part of a multi-part EXR is reframed the same way, since all parts must share
one displayWindow. Deep parts, subsampled channels, and parts whose dataWindow differs
from the displayWindow (overscan) are not supported. Output file must not be the same file as input.
For tiled images, the result lists parts whose lower-resolution tile levels were discarded.

Inputs: input_path (required), output_path (required), target_ratio (required), mode, +2 more.

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections.

Loading tool schema changelog…

    TDQS

    A3.6/5.0

    Scored across 18 tools

    Disambiguation4/5

    The three format families are clearly separated by format-specific tool prefixes, and specialized operations such as sequence scanning, part extraction, reframing, and video export are distinct. Some overlap remains between get_*_info and get_*_header, especially for DPX, and between get_exr_pixel_stats and check_exr_validity because both can report NaN/Inf issues. These are mitigated by descriptions but can still cause some hesitation.

    Naming Consistency4/5

    Most tools follow a predictable get_<format>_<noun> pattern for info, header, channels, pixel stats, and sequence info, which is easy to scan. A few specialized tools deviate with forms like exr_sequence_to_video, extract_exr_part, reframe_exr, compare_exr_channels, and check_exr_validity, but they remain readable and mostly verb_noun oriented.

    Tool Count4/5

    Eighteen tools across EXR, DPX, and TX is slightly above the ideal compact range but reasonable because each format has several distinct inspection or manipulation operations. The count feels justified rather than inflated, though the repeated info/header/channels/pixel-stats pattern across three formats does add bulk.

    Completeness4/5

    The OpenEXR surface is strong: single-file inspection, validation, sequence scanning, channel comparison, pixel stats, part extraction, reframing, and video export are all covered. DPX support is inspection-only with no sequence-level tooling, and TX support lacks conversion or manipulation operations, but these may be intentionally secondary to the EXR focus.

    Maintenance

    ActivityMaintained
    ResponsivenessNo recent community issues

    Related MCP Connectors

    Related MCP Servers