--- id: mcap version: "1.4.0" license: unclear license_treatment: permissive maintenance: active --- # mcap — MCAP libraries for Python License: permissive · Maintenance: active · Downloads: 1.9M/mo ## 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 above — 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 pip install mcap uv add mcap 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_current - Install friction: low - Maintenance: active - Downloads: 1.9M/month (top 5,000 on PyPI) - Known vulnerabilities: none known ## Tags robotics logging format, time-series data serialization, sensor data recording, message log file format, structured data container, mcap file format, robotics data replay, robotics, time-series-logging, serialization [View on SkillFed](https://skillfed.io/packages/mcap) · [View on PyPI](https://pypi.org/project/mcap/)