Integration
usb-rea
Python CLI and stdio MCP server for inferring the USB protocol of a device whose only control software is a vendor app. While the user clicks through the app, it captures traffic with usbmon or USBPcap, takes a label for each action, diffs the packets per action and infers message layouts: constant bytes, rolling counters, scaled 8- to 32-bit values, lookup tables, packed bit fields and sum, XOR or CRC checksums. It also decodes device replies, handshakes with session tokens and image streams sent to device screens, links each inferred field to Wireshark frame numbers in a report, and generates a pyusb driver and a Wireshark Lua dissector.
- Targets
- Protocol
- Category
- Independent MCP integrations
- Relationship
- Independent agent integration
- Sources reviewed
Requirements & limits
- Prerequisites: Python 3.10+, with pyusb and the MCP SDK as dependencies; version 0.7.7 (released 2026-11-01) is on PyPI. Live capture needs Linux usbmon with dumpcap or tshark, or USBPcap on Windows; offline analysis reads pcap or pcapng files whose actions are marked with timestamps or listed in order with a pause between clicks. The user supplies the device and its vendor app, and the README says the tool only analyzes traffic of devices the user owns.
- Limits: The README marks the project alpha and lists limits per feature, among them one-byte modes, unsigned 32-bit readings, handshake tokens that must be copied verbatim and image streams of at least three frames. Sending packets to hardware through the replay command or MCP tool requires explicit confirmation.
- Testing evidence: CI runs pytest on Python 3.10, 3.12 and 3.13, including tshark checks of the generated dissectors. docs/VALIDATION.md uses synthetic devices, captures synthesized from liquidctl's Kraken X and Hydro H100i Platinum drivers and rivalcfg's Rival 100 driver as ground truth, and two Wireshark sample captures downloaded on demand; one user-shared ASUS TUF Gaming LC III LCD capture is stored trimmed, with its image data zeroed. Emulated-gadget tests and real-hardware case studies remain open roadmap items.
- License: MIT per LICENSE and pyproject.toml.
- Attribution: The README expands the name as “Reverse Engineer any USB gadget” and does not mention the REA project.
About this entry
The description was reviewed against primary sources. This does not establish runtime testing, security auditing or verified compatibility.
Primary sources
- README.md GitHub · emirmrkaljevic/usb-rea · Revision 3b77ccb
- docs/VALIDATION.md GitHub · emirmrkaljevic/usb-rea · Revision 3b77ccb
- docs/case-study-hydro-platinum.md GitHub · emirmrkaljevic/usb-rea · Revision 3b77ccb
- tests/data/SOURCES.md GitHub · emirmrkaljevic/usb-rea · Revision 3b77ccb
- .github/workflows/ci.yml GitHub · emirmrkaljevic/usb-rea · Revision 3b77ccb
- src/usb_rea/capture.py GitHub · emirmrkaljevic/usb-rea · Revision 3b77ccb
- src/usb_rea/replay.py GitHub · emirmrkaljevic/usb-rea · Revision 3b77ccb
- pyproject.toml GitHub · emirmrkaljevic/usb-rea · Revision 3b77ccb
- LICENSE GitHub · emirmrkaljevic/usb-rea · Revision 3b77ccb
- https://github.com/emirmrkaljevic/usb-rea/releases/tag/v0.7.7
- https://pypi.org/project/usb-rea/0.7.7/
More in Agents and MCP
- REA — Reverse Engineer Anything · Project
- Official reverse-engineer-anything skill · Integration
- dsh-mcp-rea · Integration
- rea-jev · Integration
- rea-casebook · Integration
- Eleven · Integration