Analyze PX4 flight logs (.ulg files) using the Bagel MCP server. Use when the user wants to inspect, query, or analyze ULog flight data.
Bagel is an MCP server that parses ULog data, builds Arrow tables, and runs DuckDB SQL queries to return structured results.
In a separate terminal:
cd ~/code/bagel
docker compose run --service-ports px4
Wait until you see:
INFO: Uvicorn running on http://0.0.0.0:8000
Copy .ulg files into ~/code/bagel/logs/. This directory is volume-mounted into the container at /home/ubuntu/data.
claude mcp add --transport sse bagel http://0.0.0.0:8000/sse
Verify with claude mcp get bagel.
export MAX_MCP_OUTPUT_TOKENS=250000
/home/ubuntu/data/<filename>.ulgdescribe_data_source to see what topics and metadata are availabledescribe_topic to understand the schema of topics you want to queryquery_messages with SQL to extract and analyze specific dataread_loggings to check for warnings/errors during the flight