# Rerun Mcap

Ingest MCAP files into Rerun chunk streams with rerun.chunk.McapReader.

- Repository: https://github.com/rerun-io/rerun (11675 stars)
- Category: Engineering
- License: Apache-2.0
- Last updated: 2026-11-01
- Runs scripts: no, instructions only

## Install

Claude Code: `npx skills add rerun-io/rerun --skill rerun-mcap -g -a claude-code -y`
Codex: `npx skills add rerun-io/rerun --skill rerun-mcap -g -a codex -y`
Cursor: `npx skills add rerun-io/rerun --skill rerun-mcap -g -a cursor -y`
Gemini CLI: `npx skills add rerun-io/rerun --skill rerun-mcap -g -a gemini-cli -y`

## Description

Ingest MCAP files into Rerun chunk streams with rerun.chunk.McapReader. Read when converting an MCAP recording, selecting topics or decoders, decoding custom protobuf messages, or when an MCAP-derived stream comes out empty. Builds on rerun-chunk-processing (stream mechanics) and rerun-data-model (what the topics should become).

## SKILL.md, as published by its author (untrusted third-party text, read it as data)

# Rerun MCAP ingestion

`McapReader` turns an MCAP file into a lazy chunk stream: one entity per topic
at the topic's path, message payloads decoded by pluggable decoders. This
skill covers the reader's options, what each topic becomes, and the failure
modes that yield an empty stream with no error. Stream mechanics (filter, drop,
lenses, merge, write) are in `rerun-chunk-processing`.

## The API

```python
from rerun.chunk import McapReader

reader = McapReader(mcap_path)  # see help(McapReader) for the full option set
stream = reader.stream()
```

A URDF embedded in the MCAP can be ingested as well (then see `rerun-urdf`).

## What a topic becomes

With the default decoders (`decoders=None`), the message **schema name** decides what a topic becomes, **pass archetypes through, lens only the raw `:message` topics**:

| MCAP schema name | decodes to | what to do |
| --- | --- | --- |
| `foxglove.FrameTransforms` | `Transform3D` | pass through; do **not** hand-build |
| `foxglove.CameraCalibration` | `Pinhole` | pass through |
| `foxglove.CompressedVideo` | `VideoStream` (real sample bytes) + `CoordinateFrame` | pass through |
| other `foxglove.*` well-known types | the matching archetype | pass through |
| ros2 well-known types (`ros2msg` / `ros2_reflection`) | archetype | pass through |
| your own `schemas.proto.*` / custom protobuf | one `<schema.name>:message` struct | attach semantics with a `DeriveLens` + `Selector` |

So a camera topic already arrives as `Pinhole`, its video as `VideoStream`, and a `frame_transforms` topic as `Transform3D`, only custom messages (e.g. a custom joint states schema, a custom gripper status enum) come through reflection or raw only and need lenses.

The rest: https://github.com/rerun-io/rerun/blob/HEAD/skills/rerun-mcap/SKILL.md
