Usb Rea
Reverse engineer USB gadgets: capture traffic, infer the protocol, generate a pyusb driver.
Connector by emirmrkaljevic · GitHub account verified by the MCP Registry
Install
Works with Claude Code, Codex, VS Code, Cursor, Windsurf, Claude Desktop. Read the repository before you give any tool access to your data.
npx agentmarket install connector/emirmrkaljevic-usb-rea
Asks which of your tools to add it to (Claude Code, Codex, Cursor, VS Code, Windsurf, Gemini CLI, Claude Desktop) and shows the change first. See https://agentmart.dev/cli.
Get the weekly diff
The weekly diff: one email a week with new agent tools, notable updates and grade changes, plus security alerts for tools you follow. Double opt-in, one-click unsubscribe.
About
Reviews
Write a reviewNo reviews yet. Installed it? Reviews come from verified installers only. How reviews work
Permissions
What this server can do and what it asks for, from its tool list, install config and code. Checked Oct 25, 2026.
- Tools
- 1 read · 2 write · 0 delete · 6 not yet classified
- Secrets
- None asked for
- Install scripts
- None found
- Runs as
- Python package
Tools by what they do 9
Read from the source code; the running server may list different tools.
Read 1 · Look things up without changing anything.
diff_actions
Write 2 · Create, change, send or run things.
mark_actionreplay_packet
Not yet classified 6 · We could not tell from the name and description.
capture_startcapture_stophid_descriptorreportscaffold_driverwireshark_dissector
Network hosts it talks to 2
github.com· found in codeglama.ai· found in code
Files it touches
- Any path the agent passes to its tools
Tools (9)
Read from the source code; the running server may differ. Descriptions are the server’s own words; hidden characters are shown as [U+…].
capture_startStart a USB traffic capture into `out` (usbmon on Linux, USBPcap on Windows). Side effects: launches a background capture process that keeps writing until capture_stop. Needs elevated privileges on Linux (usbmon; typically root or a usbmon group). Does not touch the device itself. Pair every start with capture_stop; do not start a second capture while one is running. Prefer this over analysis tools when you still need live traffic.
capture_stopStop the running capture started by capture_start. Side effects: terminates the background capture process. The pcapng at the path given to capture_start is left on disk for report/diff_actions/scaffold_driver. Returns 'no capture running' if nothing was started (not an error). Call this before analysing.
diff_actionsDiff packets per labelled action and infer the protocol (JSON: byte roles + evidence frames). The JSON also has `background` (periodic polls set aside) and `responses`: device replies paired with the query they answer (command, background poll or GET_REPORT), with byte roles (const, echo of a query byte, value fitted to the labels, counter, checksum, or reading with its observed min/max) and query/reply frame numbers. A reading that 'seen' markers explain gets `name`, `scale` and `bias` (raw = value * scale + bias, `signed` for i8/i16) plus the observations in `observed`; a named mode has `ta…
hid_descriptorDecode a HID report descriptor (and optionally one report payload). Read-only. When `source` is a capture path, finds GET_DESCRIPTOR type 0x22 transfers (replug the device while capturing if none are present). When `source` is hex, parses that descriptor directly (e.g. from /sys/class/hidraw/*/device/report_descriptor). Use this to understand report IDs/sizes before or alongside report/scaffold_driver; it does not infer vendor protocol fields from labelled actions.
mark_actionRecord that the human is about to click this action in the vendor app. Side effects: appends {label, start, end} to <capture>.actions.json (creates the file). Call while capture_start is running, immediately before each click; end times are closed when the next mark arrives. Use the same label stem with different values (brightness 0%, 50%, 100%) so inference can fit scales. For an already-finished Wireshark capture without markers, skip this and pass `labels` to report/diff_actions instead. A label starting with 'seen' ('seen rpm 1180', 'seen rpm 1180 temp 34') is an observation, not an acti…
replay_packetSend one packet to real USB hardware (destructive / irreversible on the device). Side effects: opens the device via libusb/pyusb and writes the packet. Refuses unless user_confirmed=true after the human approved this exact vid/pid/endpoint/hex_data (and setup_hex if any). Needs OS permission to open the device. Prefer scaffold_driver to generate a driver first; never set user_confirmed from an agent guess.
reportGenerate a Markdown evidence report: every claim links to frame numbers in the capture. Includes a 'Device responses' section when the device answers queries (status polls, command ACKs, GET_REPORT), saying which reply bytes could not be explained, a 'Handshake' section for messages sent once before the first action (session setup, tokens), and an 'Observations' section for 'seen' markers (named readings and unmatched observations). Read-only: returns Markdown text (does not write a file). Same inputs as diff_actions. Use after capture_stop (or on an existing pcap). Choose this over diff_act…
scaffold_driverGenerate a standalone Python/pyusb driver source for the inferred protocol. One set_<command>() per command; when the device replies, also query_<name>() methods that send the command/poll (or GET_REPORT), read the reply and return it decoded as a dict (readings named by 'seen' markers come back scaled and modes as words, e.g. {'rpm': 1180, 'temp': 34, 'mode': 'turbo', 'ok': True}). When the capture has a handshake, Device() replays it in open() before any command and checks the fixed reply bytes. Read-only analysis that returns driver source as text (does not write a file or open the device…
wireshark_dissectorGenerate a Wireshark Lua dissector for the inferred protocol. Read-only: returns Lua source as text. Labels commands, decodes values/counters/lookups, and verifies checksums (usbrea.checksum_ok + expert warning). Load with `wireshark -X lua_script:<file>.lua capture.pcapng` or the same flag on tshark. Prefer scaffold_driver for a pyusb driver; prefer hid_descriptor to inspect HID report layouts.
Compare and alternatives
Featured in
Signals
- Stars
- 1
- Forks
- 0
- Open issues
- 0
- Weekly downloads
- 595
- Last commit
- Oct 23, 2026 (5 days ago)
- Last release
- Oct 24, 2026 (4 days ago)
- Last package publish
- Oct 23, 2026 (5 days ago)
From GitHub (fetched Oct 24, 2026) and the package registry.
Details
- Registry name
io.github.emirmrkaljevic/usb-rea- Version
- 0.7.0
- Auth
- No auth
- Packages
- pypi usb-rea
- License
- MIT
- Repository
- github.com/emirmrkaljevic/usb-rea
- First seen
- Oct 24, 2026
- Last checked
- Oct 25, 2026
More from emirmrkaljevic
- 0.639score
Mesh2cad
emirmrkaljevic
Mesh (STL/OBJ/PLY) to editable STEP, CadQuery or OpenSCAD: primitive fitting, fidelity report
ConnectorAFreshness: ALocal↓ 1K/wkClaude Code +5 - 0.564score
Iotaudit
emirmrkaljevic
Audit your own smart-home devices: destinations, encryption, open ports, A-F grade.
ConnectorAFreshness: ALocalRead-only★ 1↓ 926/wkClaude Code +5 - 0.545score
behave
emirmrkaljevic
Record how any CLI behaves and check that a rewrite behaves the same (golden tests).
ConnectorAFreshness: ALocal★ 4Claude Desktop
Cite this page
Usb Rea MCP server. Agent Mart. https://agentmart.dev/connectors/emirmrkaljevic-usb-rea (last updated 2026-10-25)