mcap
MCAP libraries for Python
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 mcapuv
uv add mcappoetry
poetry add mcapInstalling 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
Tags
More Software Development packages
Provides backported and experimental type hints…
permissive · top 100 on PyPI
numpyNumPy provides an N-dimensional array object…
permissive · top 100 on PyPI
fastapiFastAPI is a Python web framework for building…
permissive · top 100 on PyPI
annotated-docProvides a way to document function parameters,…
permissive · top 100 on PyPI
typerTyper builds command-line applications from…
permissive · top 1,000 on PyPI
distlibDistlib provides low-level packaging utilities…
permissive · top 1,000 on PyPI
encordLow-level Python client for the Encord API,…
permissive · top 15,000 on PyPI
mcap-ros2-supportAdds ROS2 message deserialization support to…
permissive · top 15,000 on PyPI
mcap-protobuf-supportAdds protobuf message deserialization support…
permissive · top 15,000 on PyPI
mcap-ros1-supportAdds ROS1 message serialization and…
permissive · top 15,000 on PyPI
foxglove-sdkIntegrates Python applications with the…
permissive · top 15,000 on PyPI
sapienSAPIEN is a physics-rich simulation environment…
permissive · top 15,000 on PyPI
robosuiterobosuite is a MuJoCo-powered simulation…
unclear · top 15,000 on PyPI
flatbuffersFlatBuffers is a serialization library that…
permissive · top 1,000 on PyPI
toppraComputes time-optimal path parameterization for…
permissive · top 15,000 on PyPI