Logo Bagel

Bagel

Tổ chức
Extelligence-ai

Query robotics, drone, and IoT data in plain English through an MCP server, with an intelligent edge data reduction pipeline that keeps only the data that matters.

Nhà phát hànhExtelligence-ai
Kho mãbagel
Ngôn ngữPython
Bản fork
30
Sao
397
Công cụ có sẵn
0
Phương thức truyền tảistdio
Giấy phépApache-2.0
Liên kết
  • Kết nối công cụ với quy trình làm việc AI

    Bagel cung cấp các khả năng MCP mà ứng dụng khách và tác nhân AI tương thích có thể sử dụng.

  • 0 công cụ có sẵn

    Xem các thao tác có thể gọi bên dưới, kèm tên và mô tả nếu máy chủ cung cấp.

  • Cấu hình sẵn để sao chép

    Dùng các đoạn cấu hình cài đặt mẫu để thiết lập máy chủ này trong ứng dụng khách MCP bạn muốn dùng.

  • Chỉ số quan tâm đến mã nguồn mở

    397 sao và 30 bản fork từ kho mã được liên kết.

Bagel by Extelligence lets you ask questions about robotics, drone, and IoT data in plain English. Every calculation over your message data is DuckDB SQL, not model guesswork, and Bagel shows you the query so you can audit it.

Is my IMU sensor overheating?

Bagel also has an intelligent edge data reduction pipeline: describe an event and Bagel runs the detection on the robot, keeping the windows that matter and dropping the rest. An MCP server puts all of it in your LLM's hands: Claude Code, Gemini, Cursor, or a fully local model.

Bagel was the first MCP server to ship a real analysis toolkit for robotics data, and it keeps the LLM where it belongs: in front of your logs, never in your robot's control loop.

🥯 Key Features

  • Ask in plain language: No deep domain expertise needed.
  • Transparent calculations: Deterministic SQL queries. No black-box LLM math.
  • Natural-language pipelines: "Keep 10s around every hard brake, drop the rest": one sentence becomes an auditable pipeline: previewed before a byte is written, then run once, across a fleet, or standing at the edge.
  • Broad LLM support: Claude Code, Gemini, Cursor, Codex, and more.
  • Dockerized environments: No local dependencies required.
  • Extensible capabilities: Bagel can learn new tricks.
  • Wide format coverage: Missing your data format? Open a ticket.

🥯 Try it in 60 seconds

No MCP client, no LLM, no config: run the same deterministic checks against a bundled sample log and get a robot-health report card straight to your terminal.

bash
docker run -it --rm ghcr.io/extelligence-ai/bagel/px4:latest demo
sample.ulg - 41.5s, 2018 messages, 77 topics

Power      ⚠️  min 21.07V, largest drop 2.37V at ~t=+4.8s, end 23.45V (battery_status_0)
IMU        ✅  accel_z stddev 1.6x the log baseline at ~t=+36.8s (sensor_combined_0)
GPS        —  skipped: no GPS topic
Data gaps  ✅  no gap > 1.05x median interval (checked battery_status_0, sensor_combined_0)
...

The ROS2 images (ros2-kilted, ros2-jazzy, ros2-iron, ros2-humble) run demo the same way, against a lighter bundled sample (px4 is the one that ships with a flight log rich enough to show every check). Point it at your own log with demo /path/to/log (mount it with -v first), or keep reading for the full MCP setup below.

⚡️ Quickstart

[!TIP] Already have Claude Code? Just paste the link to this repo and tell Claude what environment you want:

Set up https://github.com/Extelligence-ai/bagel for ROS2 Kilted.

Claude will clone the repo, start Docker, and wire up the MCP connection for you.

📋 Prerequisites

Install Docker Desktop and Claude Code (or another MCP-enabled LLM).

1. Clone and start Bagel

bash
git clone https://github.com/Extelligence-ai/bagel.git && cd bagel
docker compose run --service-ports ros2-kilted

[!TIP] Port 8000 already in use? Set MCP_SERVER_PORT to something else, for example MCP_SERVER_PORT=8100 docker compose run --service-ports ros2-kilted, and use that port in step 2.

Pick the service that matches your environment:

ServiceUse case
ros2-kiltedROS2 Kilted (latest)
ros2-jazzyROS2 Jazzy
ros2-ironROS2 Iron
ros2-humbleROS2 Humble
ros1-noeticROS1 Noetic
ros1-noetic-cvROS1 Noetic + CV
px4PX4 flight logs
ardupilotArduPilot flight logs
betaflightBetaflight flight logs
iotIoT / MQTT (live)

[!TIP] To give Bagel access to your local files, edit compose.yaml before starting Docker: uncomment and update the volumes section under your chosen service.

Wait for this output:

INFO:     Uvicorn running on http://0.0.0.0:8000 (Press CTRL+C to quit)

2. Connect Claude Code

In a new terminal:

bash
claude mcp add --transport sse bagel http://localhost:8000/sse

[!NOTE] The MCP endpoint is bound to localhost only (not exposed to the LAN) for security. To share it with other machines, drop the 127.0.0.1 prefix in compose.yaml and put an authenticated proxy in front: see SECURITY.md.

3. Prompt

bash
claude

Summarize the metadata of the ROS2 bag "./data/sample/ros2/mcap".

That’s it: you’re chatting with your data.

🔒 Prefer fully offline?

Swap step 2 for a local model: your data and your LLM stay on the machine:

bash
brew install ollama && ollama serve &                                  # or ollama.com
ollama pull qwen3:8b
uvx ollmcp --mcp-server-url http://localhost:8000/sse --model qwen3:8b

Model picks, expectations, and troubleshooting: Local LLMs guide.

Bagel works with any MCP-enabled LLM. Setup runbooks for tested alternatives:

Can’t find your LLM? Open a ticket.

🔌 Agent plugins (Claude Code and Codex)

Bagel ships an agent plugin: four skills that teach the agent when and how to drive the server (log triage, pipeline authoring, live sinks, visualization export) plus the MCP connection, wired automatically. The same plugin/ directory serves both Claude Code and OpenAI Codex.

/plugin marketplace add Extelligence-ai/bagel
/plugin install bagel@bagel

Codex and ChatGPT users: install bagel from the OpenAI Plugins Directory (one click), or clone the repo and add it as a plugin marketplace (the repo carries .agents/plugins/marketplace.json). Directory installs bundle the skills only, so also connect the server once in ~/.codex/config.toml:

toml
[mcp_servers.bagel]
url = "http://localhost:8000/mcp"

Repo-marketplace and Claude Code installs wire this connection automatically.

Then start the container for your data format (see Quickstart): the plugin connects to http://localhost:8000/mcp by default. Any other MCP client can discover the same workflows server-side via the list_agent_capabilities tool.

Keep what matters, drop the rest

A robot records more data than you can afford to move. Bagel turns a question into a detector, runs it where the data is recorded, and ships only the windows around real events.

Here it is in one conversation:

The session above: a 20-minute (1,200 s) recording and the prompt "keep 10 seconds before and after every deceleration harder than −10 m/s²". The preview detects 7 events, merges them into 4 windows, and keeps 92 s of the 1,200 (7.6%); the run writes a 2.1 GB bag down to 161 MB. These figures are illustrative demo output, not a measured benchmark: the ratio is event-window duration over total duration, so it depends entirely on your workload.

✅ Supported Data Formats

IndustryFormats
RoboticsROS1, ROS2, MCAP (any profile), Copper (via MCAP export), ROS text logs (~/.ros/log)
Robot learningGantry Bench evidence bundles — a dataset verdict's working (per-clip signal checks, robot-test ladder, findings) as queryable tables
DronesPX4, ArduPilot, Betaflight
AutomotiveASAM MDF4 (.mf4), CAN captures (.blf/.asc + DBC) · beta
IoTMQTT (live, Sparkplug B), PostgreSQL / TimescaleDB, InfluxDB 3
Hardware stateWaffleForm snapshots (.waffleform.yaml), auto-detected via waffle-iron · beta

🆚 Bagel vs. the Tools You Already Use

You already have ros2 *, PlotJuggler, and grep. Bagel doesn't replace them: it answers the questions they make you work for, then hands off to them:

You do this todayAsk Bagel instead
ros2 bag info for metadata"Summarize this bag": same prompt works on PX4, ArduPilot, MCAP, MQTT, Postgres
ros2 topic echo /imu and eyeball raw values"What's the peak z-deceleration in /imu? Running average over 5 s?" · real SQL underneath: peaks, running averages, percentiles, cross-topic correlations
Scrub PlotJuggler timelines hunting for the event"Find every deceleration under −10 m/s² and cut ±30 s snippets": then open the result in PlotJuggler with a pre-framed layout
rqt_console, or grep ~/.ros/log"Read the ERRORs from ~/.ros/log and tell me what went wrong": tracebacks included, no bag needed
Echo two topics in two terminals, correlate in a spreadsheet"What's the correlation between current and voltage?": topics live in one SQL relation, so joins and corr() are one question
ros2 bag record -a and babysit the diskA standing edge pipeline: record continuously, keep only event windows, drop the rest
A bash loop over 200 bags"Run this pipeline on every bag in the folder": one pipeline, whole fleet, with a combined report
scp/aws s3 sync scripts to ship data off the robotUpload to S3, GCS, or Azure as a pipeline step, checksum-skipping files already there
A different viewer per format: FlightPlot for PX4, MAVExplorer for ArduPilot, Blackbox Explorer for BetaflightThe same conversation for all of them, and ROS, MCAP, MQTT, Postgres, InfluxDB
Write a one-off pandas script per questionAsk the question; Bagel writes and runs the query

One sentence of plain language, one answer, instead of a pipeline of commands and a script you'll delete tomorrow.

💬 What Can I Prompt?

You can ask Bagel almost anything. For example:

What’s the correlation between current and voltage in the /spot/status/battery_states topic?

I think the robot hit a pothole. Can you check for sudden deceleration on the z-axis to confirm?

Every time the drone decelerates harder than -10 m/s², keep 10 seconds before and after. Drop everything else.

Did anything change on this robot since last week?

Time to put Bagel to the test: can it catch a drone doing barrel rolls? Spoiler: 🎉 It totally can.

💡 How Bagel Works

When you ask a question, Bagel analyzes your data source’s metadata and topics to build a high-level understanding.

Based on your prompt, if further inspection is needed, Bagel identifies the most relevant topics and interprets their meaning and structure. Bagel then writes the relevant topic messages to an Apache Arrow file and uses DuckDB to generate and execute queries against it.

This process is repeated as needed, running new queries until Bagel finds the best answer to your question.

LLMs excel at language but struggle with math. Bagel overcomes this by generating deterministic DuckDB SQL queries. These queries are displayed for you to audit, and you can guide Bagel to correct any errors.

🐶 Teach Bagel a New Trick

Bagel learns new capabilities through POML files: a structured set of instructions that describe a “trick,” such as computing latency statistics.

✍️ Create a .poml file

For example, let’s define ./src/agent/examples/woof.poml.

poml
<poml>
    <task>
        Count the topics in the data source.
        If the count is odd, say "woof", else say "meow".
    </task>

    <output-format>
        Return the sound, the topic count, and a few cute emojis. Nothing else.
    </output-format>
</poml>

🗣️ Use the capability

Prompt Bagel:

Run the POML capability "./src/agent/examples/woof.poml" on the ROS2 bag "./data/sample/ros2/mcap".

Result:

meow 🐱 4 topics 🐱💤🎯

Teach it your own tricks (no rebuild)

Bagel discovers your own capabilities from ~/.bagel/capabilities/:

  • In conversation: do a workflow once, then say "save that as a capability called battery-triage" — Claude calls save_agent_capability and it's reusable in any future session.
  • As a file: drop a markdown file with your steps (or a POML file, if you want parameterized templates — see src/agent/compose/pipeline.poml for the house style) into ~/.bagel/capabilities/.

Either way it shows up in list_agent_capabilities as user/<name> and runs with run_poml_capability — from Claude Code, Claude Desktop, or any MCP client. Teams: keep the directory in your own git repo and sync it to every robot; it's just files. On Linux, run mkdir -p ~/.bagel/capabilities once before starting the container so the mount is owned by you, not root.

📚 Guides

📦 Integrations

  • Rerun · "show me that event in Rerun": any time window as a ready-to-open recording
  • Lichtblick / Foxglove · event windows as MCAP + pre-framed layouts for either viewer
  • PlotJuggler · open Bagel's MCAP outputs directly; one-sentence pre-framed sessions, flattened CSV/Parquet exports
  • Cloudini · decode cloudini-compressed pointclouds, or compress a bag's PointCloud2 topics into CompressedPointCloud2
  • Slack · pipelines post to your ops channel when they fire: "🚨 hard brake on {asset}"
  • LeRobot (beta) · detected events become training episodes: a LeRobotDataset v3.0

🚧 Limitations

Rough edges we know about, so you don't find them the hard way:

  • Two formats are beta. The automotive MDF4/CAN readers are verified against files we generate with the same libraries that read them (asammdf, python-can); real CANape/INCA/Vector-produced captures haven't crossed our test bench yet. LeRobot exports load-test clean with the real lerobot package, but no policy has been trained from a Bagel export yet.
  • Reduction ratios are workload-dependent, and unbenchmarked. The ratio is event-window duration over total duration: quiet recordings reduce dramatically, eventful ones much less. The figures in this README are illustrative demo output, not a measured benchmark.
  • No authentication on the MCP endpoint. By design it binds to localhost only; treat it like a database socket and see SECURITY.md before sharing it beyond your machine.
  • Small local models struggle with multi-step pipelines. A 4-8B model handles tool selection and simple SQL; event-windowed reduction and multi-topic joins want a bigger model. See the Local LLMs guide.
  • Live-database end-to-end tests run outside CI. The InfluxDB and Postgres suites' pure tests run in CI; their live end-to-end cases only execute against an instance you point them at. Everything else, including the ROS bag write paths, runs in CI.

🫶 Contributing

We’d love your help! The easiest way to support the project is by giving it a ⭐ on GitHub.

Other great ways to contribute:

  • Request new features
  • Report bugs
  • Improve documentation
  • Add new capabilities

Before contributing, please review the guidelines.

Join the conversation in our Discord server. We hang out there regularly.

📄 License

Bagel is open source under the Apache License 2.0.

Agent discovery and reproducible workflows

For maintainers: discovery audits and evaluation, listing maintenance, and reproducible user reports.

Dùng MCP Bagel với nhiều mô hình AI

TypingMind kết nối các công cụ MCP ở cấp không gian làm việc, nên sau khi kết nối Bagel, bạn có thể dùng với nhiều mô hình AI khác nhau trong TypingMind thay vì phải thiết lập riêng cho từng mô hình. MCP này chạy cục bộ thông qua trình kết nối MCP của TypingMind trên thiết bị của bạn.

Hướng dẫn thiết lập để dùng trình kết nối cục bộ

Dùng cách này khi máy chủ MCP cần truy cập các tệp, ứng dụng hoặc tài nguyên riêng tư trên máy tính của bạn.

1

Mở cài đặt MCP

Trong TypingMind, vào Cài đặt, Cài đặt nâng cao, rồi đến Giao thức ngữ cảnh mô hình và chọn Cài trình kết nối.

  1. Mở TypingMind trong trình duyệt của bạn.
  2. Nhấp vào biểu tượng Cài đặt.
  3. Vào Cài đặt nâng cao.
  4. Mở mục Giao thức ngữ cảnh mô hình.
  5. Nhấp vào Cài trình kết nối rồi chọn Thiết bị này.
Màn hình thiết lập trình kết nối MCP của TypingMind với tùy chọn Thiết bị này được chọn
2

Chạy lệnh trình kết nối

Chọn Thiết bị này, sao chép lệnh từ TypingMind và chạy trong Terminal. Giữ tiến trình chạy trong khi bạn dùng MCP.

  1. Sao chép lệnh thiết lập hiển thị trong TypingMind.
  2. Mở Terminal trên macOS hoặc Windows Terminal trên Windows.
  3. Dán và chạy lệnh.
  4. Xác nhận cài đặt gói nếu Terminal hỏi bạn có muốn tiếp tục không.
  5. Giữ tiến trình trong cửa sổ Terminal chạy trong khi dùng các công cụ MCP.
3

Thêm Bagel làm máy chủ

Khi trạng thái trình kết nối là Sẵn sàng, nhấp vào Sửa máy chủ và dán cấu hình máy chủ MCP.

  1. Đợi đến khi trạng thái trình kết nối hiển thị Sẵn sàng.
  2. Nhấp vào Sửa máy chủ.
  3. Dán cấu hình máy chủ MCP của Bagel.
  4. Lưu danh sách máy chủ.
  5. Làm mới nếu bạn muốn xác nhận trình kết nối vẫn sẵn sàng.
Cài đặt MCP của TypingMind hiển thị máy chủ đang hoạt động và nút Sửa máy chủ
{
  "mcpServers": {
    "bagel": {
      "command": "npx",
      "args": [
        "-y",
        "<mcp-server-package>"
      ]
    }
  }
}
4

Dùng kết nối với nhiều mô hình

Lưu danh sách máy chủ, mở Plugin, bật các công cụ MCP của Bagel, sau đó chọn bất kỳ mô hình AI nào được hỗ trợ trong TypingMind và dùng các công cụ trong cuộc trò chuyện hoặc gán chúng cho một tác nhân AI.

  1. Mở trang Plugin trong TypingMind.
  2. Bật các công cụ MCP của Bagel.
  3. Bắt đầu cuộc trò chuyện và chọn mô hình AI bạn muốn dùng.
  4. Dùng các công cụ MCP trong cuộc trò chuyện hoặc gán chúng cho một tác nhân AI.
  5. Chuyển sang mô hình AI khác bất cứ khi nào cần mà không phải kết nối lại MCP.
Cuộc trò chuyện TypingMind dùng các công cụ MCP đã bật với một mô hình AI được chọn
Bạn có thể dùng Bagel giúp tôi làm việc này không?
Bagel
Được. Tôi đã đọc.
Đây là kết quả tôi tìm được bằng Bagel.

Câu hỏi thường gặp

Máy chủ MCP Bagel dùng để làm gì?

Bagel là máy chủ MCP cho phép các ứng dụng AI tương thích kết nối với công cụ và ngữ cảnh bên ngoài. Trong TypingMind, bạn chỉ cần thêm máy chủ MCP này một lần để các công cụ của nó có sẵn trong không gian làm việc AI của bạn.

Bạn có thể dùng MCP Bagel với nhiều mô hình AI trong TypingMind không?

Có. TypingMind kết nối các công cụ MCP ở cấp không gian làm việc, nên bạn có thể dùng Bagel với nhiều mô hình AI như Claude, ChatGPT, Gemini hoặc các mô hình khác đã cấu hình trong TypingMind mà không cần thiết lập máy chủ MCP riêng cho từng mô hình.

Vì sao nên dùng MCP Bagel với TypingMind?

TypingMind là một trong những giao diện trò chuyện với LLM tốt nhất vì tập hợp nhiều mô hình AI, prompt, plugin, tác nhân AI, khóa API và công cụ MCP vào một không gian làm việc. Khi kết nối Bagel, bạn có thể dùng các công cụ MCP của dịch vụ này với những mô hình ưa thích, đồng thời giữ quy trình trò chuyện gọn gàng trong TypingMind.

Làm cách nào để kết nối MCP Bagel với TypingMind?

Bagel hoạt động thông qua trình kết nối MCP cục bộ của TypingMind. Đây là lựa chọn phù hợp nhất khi máy chủ MCP cần truy cập tệp cục bộ, ứng dụng máy tính, công cụ dòng lệnh hoặc tài nguyên riêng trên máy tính của bạn.

MCP Bagel cung cấp những công cụ nào trong TypingMind?

Bagel cung cấp các chức năng MCP mà bạn có thể bật từ trang Plugin của TypingMind để dùng trong trò chuyện hoặc gán cho tác nhân AI.

Bạn có cần chia sẻ khóa API với TypingMind để dùng MCP Bagel không?

Không. TypingMind ưu tiên xử lý cục bộ và cho phép bạn kiểm soát nhà cung cấp mô hình, khóa API, prompt và cấu hình MCP. Nếu Bagel yêu cầu xác thực, hãy thêm các header, cài đặt OAuth hoặc cấu hình cục bộ cần thiết cho máy chủ MCP đó khi tạo kết nối.

Máy chủ MCP liên quan

Xem tất cả

Tạo ngay không gian làm việc AI riêng

Đăng ký bản tin của chúng tôi để nhận thông báo về tính năng mới và các đợt tặng quà sắp tới 👇