skillfed

mcap

MCAP libraries for Python

mcap v1.4.0 1.9M downloads/30d#3,440 on PyPI1,041
Permissive license Active released

What it is and what it does

MCAP is a file format and Python library for logging structured data, designed with robotics applications in mind. It handles recording of timestamped messages (such as sensor readings) into a single file that can be replayed or analyzed later. The format is serialization-agnostic, meaning you can store any message type, and it includes built-in compression support via lz4 and zstandard to handle large datasets efficiently.

The library is part of a cross-language ecosystem (C++, Go, JavaScript/TypeScript, Swift, Rust, and Python) maintained by Foxglove, so data recorded in one language can be read in another. It's designed to work well under resource constraints and varying durability requirements, making it suitable for embedded systems, edge devices, and production robotics deployments where reliability and efficiency matter.

Use it for:

  • Record sensor streams (camera, lidar, IMU) from a robot for offline analysis and algorithm development
  • Log timestamped messages during autonomous system operation for debugging and performance review
  • Archive structured telemetry data from multiple sources into a single queryable file for post-processing
  • Share recorded robot runs across teams using a standardized, compressed format
  • Replay recorded data through a pipeline to test perception or control algorithms without live hardware

Worth the install?

AI-flagged interpretation of the facts on this page — verify before relying

MCAP is a logging library and file format for serializing structured data, commonly used in robotics to record and replay sensor streams and messages under various resource and durability constraints.

Yes. MCAP is actively maintained, has no known vulnerabilities, installs with minimal friction, and is widely used in robotics. The permissive MIT license poses no restrictions. Install it if you need to log or replay structured time-series data in robotics, autonomous systems, or similar domains where message-based recording is standard.

Install

mcap on PyPI

pip

pip install mcap

uv

uv add mcap

poetry

poetry add mcap

Installing mcap

Before you install

Low install friction with only two runtime dependencies (lz4 and zstandard). The package is actively maintained with recent commits and has been in development since 2022-02-14, indicating stable ongoing support.

License in practice

Licensed under MIT (permissive), allowing free use, modification, and distribution in both open-source and commercial projects with minimal restrictions.

Quickstart

pip install mcap

import mcap

# Write a simple MCAP file
with mcap.Writer(open('data.mcap', 'wb')) as writer:
    writer.write_message(topic='/sensor', message=b'data')

Requires Python >=3.7; lz4 and zstandard must be installed (handled automatically via pip).

Verify before relying

  • Whether the package provides high-level APIs for common robotics use cases or requires lower-level serialization handling
  • Performance characteristics (throughput, latency) under typical robotics workloads
  • Interoperability with ROS or other robotics middleware ecosystems

Package facts

License not declared (permissive)
Python support supports the current Python release (>=3.7)
Install friction low — pure-Python wheel
Runtime dependencies 2 — lz4, zstandard
Maintenance actively maintained — 57 days since the last release
Last repo commit
First released
Downloads 1,905,258/month — #3,440 on PyPI (30-day window, as of 2026-08-14)
Known vulnerabilities none known (OSV.dev, checked 2026-08-14)

Evidence: mcap-1.4.0-py3-none-any.whl

License :: OSI Approved :: MIT LicenseOperating System :: OS IndependentProgramming Language :: Python :: 3

Tags

robotics logging formattime-series data serializationsensor data recordingmessage log file formatstructured data containermcap file formatrobotics data replay
roboticstime-series-loggingserialization

More Software Development packages