Give AI models physical hands to measure, control, and debug real hardware.
BugBuster is an open-source hardware platform that bridges the gap between AI models and the physical world. Through a Model Context Protocol (MCP) server, AI assistants like Claude can autonomously measure voltages, drive outputs, capture waveforms, analyze digital signals, and debug embedded targets — using a single USB-C connection to a purpose-built PCB.
One board. 61 AI-callable tools. A full electronics bench in your AI's hands.
AI models are exceptionally good at reasoning about electronics — reading datasheets, interpreting schematics, diagnosing faults. What they lack is the ability to touch the real world. BugBuster closes that loop.
|
Without BugBuster |
With BugBuster |
More scenarios: Docs/Scenarios.md.
If you find BugBuster useful and would like to support its ongoing development, hardware prototyping, and maintenance, you can donate via PayPal:
|
†HAT expansion board required.
flowchart TB
HOST["Host<br/>(Claude / Desktop / Python)"]
subgraph BB["BugBuster main board"]
direction TB
ESP32["ESP32-S3<br/>(dual-core)"]
SPI["SPI bus<br/>AD74416H · 4× ADGS2414D MUX"]
I2C["I²C bus<br/>DS4424 · HUSB238 · PCA9535"]
ESP32 --- SPI
ESP32 --- I2C
end
subgraph HAT["RP2040 HAT (optional)"]
direction TB
RP["RP2040<br/>(debugprobe fork + LA)"]
PIO0["PIO 0 — SWD"]
PIO1["PIO 1 — LA capture (125 MHz)"]
RP --- PIO0
RP --- PIO1
end
HOST -->|"USB CDC #0 — BBP v8<br/>control plane (MCP / desktop)"| ESP32
HOST -->|"WiFi HTTP REST<br/>(token-paired)"| ESP32
ESP32 -->|"HAT UART 921600 8N1<br/>(HAT_Protocol.md)"| RP
HOST -->|"USB vendor bulk<br/>EP 0x06 OUT · 0x87 IN<br/>LA data plane @ ~1 MB/s"| RP
HOST -->|"USB CMSIS-DAP v2<br/>(direct — no proxy)"| RP
HOST -->|"USB CDC — target UART bridge"| RP
flowchart LR
subgraph Host["Host machine"]
Desktop["Desktop app\n(Tauri + Leptos)"]
MCP["MCP server\n(bugbuster_mcp)"]
PyLib["Python lib\n(bugbuster)"]
end
subgraph ESP["ESP32-S3"]
BBP["BBP v8\nUSB CDC #0"]
HTTP["HTTP REST\nWiFi / USB"]
end
subgraph HAT["RP2040 HAT"]
UART["HAT UART\n0xAA framing"]
end
Desktop -->|"BBP v8 / COBS+CRC-16"| BBP
MCP -->|"BBP v8 / COBS+CRC-16"| BBP
PyLib -->|"BBP v8 / COBS+CRC-16"| BBP
Desktop -->|"JSON REST"| HTTP
PyLib -->|"JSON REST"| HTTP
BBP --> UART
HTTP --> UART
Two independent USB paths when the HAT is attached:
- ESP32 USB CDC — control plane (BBP v8 binary protocol over COBS + CRC-16). MCP server, desktop app, and Python library all speak this.
- RP2040 USB vendor bulk — Logic Analyzer data plane. The ESP32 is not
in the LA data path; this decouples capture throughput from the BBP control
stream and is what makes sustained 1 MHz / 4-ch streaming possible.
Details:
Docs/LogicAnalyzer.md.
Communication transports at a glance
| Transport | Protocol | Latency | Who talks it | Best for |
|---|---|---|---|---|
| ESP32 USB CDC #0 | BBP v8 (COBS + CRC-16) | < 1 ms | MCP · desktop · Python | Full control + streaming control plane |
| ESP32 HTTP REST | JSON over WiFi | ~10 ms | desktop · Python · browser UI | Remote access, OTA |
| RP2040 USB vendor bulk | 4-byte framed packets | < 1 ms | desktop · Python (libusb) | LA streaming / readout, ~1 MB/s |
| RP2040 USB CMSIS-DAP v2 | standard DAP | < 1 ms | OpenOCD / pyOCD / probe-rs | SWD debug (zero proxy) |
| HAT UART | 0xAA + CRC-8, 921600 |
1-5 ms | ESP32 ↔ RP2040 only | HAT config / status (see Firmware/HAT_Protocol.md) |
Full wire format: Firmware/BugBusterProtocol.md.
MCP server (USB — recommended)
cd python
pip install -e ".[mcp]"
# Find your port: ls /dev/cu.usbmodem* (macOS) or ls /dev/ttyACM* (Linux)
python -m bugbuster_mcp --transport usb --port /dev/cu.usbmodemXXXXAdd to ~/.claude/settings.json:
{
"mcpServers": {
"bugbuster": {
"command": "/path/to/python",
"args": ["-m", "bugbuster_mcp", "--transport", "usb",
"--port", "/dev/cu.usbmodemXXXX"]
}
}
}/mcp in Claude Code to reload. 61 tools appear.
Desktop app (build from source)
rustup target add wasm32-unknown-unknown
cargo install trunk tauri-cli
cd DesktopApp/BugBuster
cargo tauri dev # hot-reload
cargo tauri build # release bundleFlash firmware (ESP32 + RP2040 HAT)
# ESP32-S3
cd Firmware/ESP32
pio run -e esp32s3 -t upload
pio run -e esp32s3 -t uploadfs # web UI to SPIFFS
# RP2040 HAT
cd Firmware/RP2040
git submodule update --init --recursive
mkdir build && cd build
cmake -DPICO_BOARD=bugbuster_hat .. && make -j
# hold BOOTSEL, then: cp bugbuster_hat.uf2 /Volumes/RPI-RP2Current versions: ESP 3.2.0, HAT bb-hat-3.0, Desktop 0.7.0.
Release workflow + version-sync checklist:
Docs/ReleaseChecklist.md.
Python library (no MCP)
import bugbuster as bb
from bugbuster import ChannelFunction
with bb.connect_usb("/dev/cu.usbmodemXXXX") as dev:
dev.set_channel_function(0, ChannelFunction.VOUT)
dev.set_dac_voltage(0, 5.0)
print(dev.get_adc_value(1))Full API + HAL examples: python/README.md.
Giving an AI control of real hardware demands hard boundaries. BugBuster enforces them at the tool layer — the AI cannot bypass these even if instructed:
- MUX exclusivity — each IO has exactly one active signal path.
- E-fuse auto-arm — configuring any output arms overcurrent protection.
- Current limit — 8 mA default; full 25 mA requires
allow_full_range=True. - Voltage confirmation — supplies above 12 V require
confirm=True. - Board-profile rail lock — VLOGIC / VADJ1 / VADJ2 can be locked per-board
via a JSON profile; see
Docs/board_profiles.md. - Risk gates —
mux_control,register_accessrequirei_understand_the_risk=True. - Post-action monitoring — every output operation triggers an automatic fault check; warnings propagate back to the AI.
Full rule-by-rule matrix: python/bugbuster_mcp/README.md.
Overview — live 4-ch readings, SPI health, temperature |
Logic Analyzer — 1–4 ch @ up to 125 MHz, UART/I²C/SPI decoders |
21 tabs total — full screenshot gallery and tab reference in
DesktopApp/BugBuster/README.md.
| Topic | Where to read |
|---|---|
| MCP tools & prompts (61 tools, 4 prompts, 6 resources) | python/bugbuster_mcp/README.md |
| Python library (low-level client + HAL, transports, examples) | python/README.md |
| Desktop app (21 tabs, screenshots, build & release) | DesktopApp/BugBuster/README.md |
| ESP32-S3 firmware (FreeRTOS tasks, BBP, HTTP) | Firmware/ESP32/README.md |
| RP2040 HAT firmware (debugprobe fork, LA, SWD, HVPAK) | Firmware/RP2040/README.md |
| BBP v8 wire format (handshake, frames, opcodes, events) | Firmware/BugBusterProtocol.md |
| HAT UART protocol (ESP32 ↔ RP2040, 921600 8N1) | Firmware/HAT_Protocol.md |
| HAT architecture (RP2040, debugprobe, HVPAK, connectors) | Firmware/HAT_Architecture.md |
| External I2C/SPI bus engine (routed IOs, Python/MCP usage, BBP/HTTP endpoints) | Docs/ExternalBus.md |
| Logic Analyzer & vendor-bulk streaming | Docs/LogicAnalyzer.md |
| Hardware (ICs, power topology, ESP32 pinout) | Docs/Hardware.md |
| Board profiles (schema, rail lock, MCP integration) | Docs/board_profiles.md |
| HVPAK descriptor validation | Docs/hvpak-descriptor-validation.md |
| Real-world scenarios | Docs/Scenarios.md |
| Test suite (unit, simulator, device) | tests/README.md |
BugBuster/
├── Firmware/
│ ├── ESP32/ ESP-IDF firmware (PlatformIO) — main controller
│ ├── RP2040/ HAT firmware (Pico SDK + debugprobe fork)
│ ├── BugBusterProtocol.md BBP v8 wire format (USB CDC + HTTP REST)
│ ├── HAT_Protocol.md ESP32 ↔ RP2040 UART framing
│ ├── HAT_Architecture.md HAT board architecture reference
│ └── FirmwareStructure.md Cross-firmware reference
│
├── DesktopApp/BugBuster/ Tauri v2 + Leptos 0.7 (21 tabs)
│
├── python/
│ ├── bugbuster/ Control library (USB + HTTP, 170+ methods)
│ ├── bugbuster_mcp/ MCP server (61 tools, 4 prompts, 6 resources)
│ └── examples/ Annotated example scripts
│
├── tests/ pytest — unit, simulator, hardware-in-the-loop
│
├── Docs/ Architecture, Scenarios, Hardware, LA, board profiles
├── PCB Material/ Altium schematics + layout
└── Scripts/ One-off test and automation scripts
The HAT PCBs were provided by JLCPCB for free to support the open-source community.
AGPL-3.0 — see LICENSE.
BugBuster is free to use, modify, and self-host. If you distribute a modified version, or run a modified version as a network service, you must release the corresponding source under the same license. For closed-source or commercial-OEM use, contact the maintainer for an alternative license.


