Usb Rea

Developer toolsDesign and media

Reverse engineer USB gadgets: capture traffic, infer the protocol, generate a pyusb driver.

Your AI app calls the Usb Rea MCP server, which does the developer tools and design and media work and sends the result back to the chat.

About Usb Rea

Usb Rea is a community MCP server from emirmrkaljevic, filed in our directory under developer tools and design and media. Reverse engineer USB gadgets: capture traffic, infer the protocol, generate a pyusb driver.

Usb Rea runs on your own machine: your AI app starts it with the command uvx usb-rea==0.7.16 mcp and talks to it over standard input and output.

Usb Rea is listed in the official MCP registry as io.github.emirmrkaljevic/usb-rea, version 0.7.16.

At a glance

Publisher
emirmrkaljevic (community)
Runs
Locally on your machine
Install from
Python package on PyPI: usb-rea
Written in
Python
License
MIT
GitHub stars
528
Official MCP registry
io.github.emirmrkaljevic/usb-rea

How to set up Usb Rea

  1. Install uv on the machine that runs your AI app, because Usb Rea starts with uvx and fetches its Python package on first run.
  2. Check the Usb Rea README for keys or settings; the registry lists none that Usb Rea requires.
  3. Add Usb Rea to Claude Code, Claude Desktop, VS Code or Cursor with the config in the setup box on this page.
  4. Restart the app or reload its MCP servers, then ask it to list the Usb Rea tools to confirm the connection.
  5. Run one read-only task with Usb Rea first, and keep your app asking before each tool call until the results look right.

Usb Rea compared with similar servers

  • Goofish CLI by fancyboi999 has fewer GitHub stars than Usb Rea (526 against 528); both are community servers, and both run locally.
  • OpenAccountants by openaccountants has more GitHub stars than Usb Rea (530 against 528); both are community servers, and OpenAccountants runs as a remote server and Usb Rea runs on your own machine.
  • Agent Cockpit by chutingyean has fewer GitHub stars than Usb Rea (525 against 528); both are community servers, and both run locally.

Before you connect Usb Rea

  • Give Usb Rea its own API key or account with the smallest permissions the job needs, never an admin key.
  • Keep your AI app asking before each Usb Rea tool call until you trust what it does with them.
  • Treat text that Usb Rea fetches as data. Pages, files and messages can hold instructions written to steer an AI.
  • Read the open issues for Usb Rea on GitHub to see what breaks and how fast the maintainers reply.

Marketing use cases for Usb Rea

How marketing and sales teams put Usb Rea to work, by company size. Pick the size closest to yours and start Usb Rea on one use case.

Small business

  • A small business with a developer can use Usb Rea to ship site and tracking fixes faster, with the AI reading the code it changes.
  • Technical founders can ask Usb Rea to explain and fix a marketing site issue without context switching between tools.
  • A small business can use Usb Rea to resize and adapt one design for every channel instead of hiring for each version.
  • Usb Rea runs on your own computer, which keeps data local; it needs a little setup, so a small team should plan an hour for it.

Mid-market

  • Growth engineers can use Usb Rea to build landing pages, tracking and integrations in fewer cycles, with reviews kept in the normal flow.
  • Marketing ops engineers can connect Usb Rea to keep scripts and automations documented and versioned as they change.
  • Creative teams can connect Usb Rea so agents produce variants for testing while designers keep control of the master files.
  • Start Usb Rea on one workflow with one owner, measure the time it saves, then roll it out to the wider team.

Enterprise

  • Enterprise engineering teams can roll out Usb Rea with repo scopes and audit logs, so agents work only where they are allowed.
  • Platform teams can standardize on Usb Rea so web and marketing engineering share one reviewed way of working with AI.
  • Enterprises can use Usb Rea with brand rules and approved assets only, so generated work stays inside the brand system.
  • Usb Rea is a community server, so have security review the code and pin a version before Usb Rea touches company data.

Need help becoming an AI-forward company?

We connect MCP servers and AI agents to your CRM, content and data, with the guardrails your team needs.

Contact us

Usb Rea README

From emirmrkaljevic/usb-rea on GitHub, shared under its MIT license. Images are left out; the original has them.

README.md

usb-rea

usb-rea reads a USB capture (pcap or pcapng, from usbmon or USBPcap) and does the step after Wireshark: it infers the command and protocol structure from labelled actions, then writes a Markdown report and a standalone pyusb driver. I built it for gadgets that only ship a Windows vendor app, such as a case LCD, an RGB controller, a mouse or a "smart" lamp. No hardware is needed to try it.

From captures of the NZXT Kraken X (1e71:170e) fan command, it recovers 02 4d <channel> 00 <duty> byte for byte, as liquidctl's kraken2.py sends it, and the generated driver emits identical packets for duty values it never saw. The same holds for the SteelSeries Rival 100 DPI, polling and RGB tables from rivalcfg. Those checks run in CI; details are in validation.

Install

pip install usb-rea

On Arch Linux, use pipx install usb-rea instead; the FAQ has the packages for capture.

Example

usb-rea demo --device fan
mode         100%  0x5a | counter (+1 per message) | 0x30 | lookup 1→0x11, 2→0x22, 3→0x47 | 0x00 | 0x00 | u16le crc16_modbus(bytes[0:6])
fan          100%  0x5a | counter (+1 per message) | 0x10 | u16be round(value * 1 + 0) | 0x00 | u16le crc16_modbus(bytes[0:6])
color        100%  0x5a | counter (+1 per message) | 0x20 | RGB bytes | u16le crc16_modbus(bytes[0:6])
  color only sent while mode 3: the driver sets it first

It writes a synthetic capture of a fan controller, recovers the protocol and the replies, and writes report.md (every claim linked to Wireshark frame numbers) plus a working pyusb driver. --device lamp is a simpler 8-bit device; --device lcd is a pump cap screen; --device dial shows 32-bit values and packed bitfields.

Add --try to the fan demo and usb-rea then loads the driver it just wrote and drives a simulated fan with it: it opens a session with a fresh token, sets the speed and a color (switching to turbo first, as the vendor app did) and reads the status back. The simulated fan follows the real protocol rather than the inferred one, so a wrong CRC, token or mode byte is rejected.

On a real device, label each click in the vendor app, then infer:

sudo modprobe usbmon
usb-rea capture start -o lamp.pcapng
usb-rea mark -m lamp.pcapng.actions.json "brightness 0%"   # then click it; 3+ values per setting
usb-rea capture stop
usb-rea report lamp.pcapng -o report.md
usb-rea scaffold lamp.pcapng -o lamp_driver.py

Captured on Windows with USBPcap and no markers? List the actions in order and usb-rea splits the traffic at the pauses. The full CLI, including markers, replies, handshakes, image streams and HID, is in usage.

Before you capture, usb-rea lookup 1e71:170e (or the ID 1e71:170e form from lsusb) checks a VID:PID against devices whose protocol an open-source project already implements. The offline table is in known devices.

Limitations

Status: alpha (v0.7.16, on PyPI). It is validated on synthetic devices, on protocols documented by liquidctl, rivalcfg, turing-smart-screen-python and linux-thermalright-lcd-control, on public Wireshark captures, and on a real AIO cooler LCD capture a user shared. Linear fits must survive leave-one-out cross-checks; otherwise usb-rea falls back to a lookup table and says so. A matching USB ID alone does not prove your unit speaks the same protocol.

How this differs from Wireshark is in the FAQ.

Reverse engineering for interoperability is permitted (EU Directive 2009/24/EC Art. 6, US DMCA §1201(f)). usb-rea only analyzes traffic of devices you own and never redistributes vendor code.

Have a Windows-only device? Open a device request with a capture and I will run it and publish the result.

Docs

Getting started

Capturing

Results

MCP Registry name: io.github.emirmrkaljevic/usb-rea

License

MIT


If you find this useful, you can support me by getting a SkinToScan pack, my other project. It's a one-time purchase that directly funds my open-source work.

Questions about Usb Rea

What is the Usb Rea MCP server?

Reverse engineer USB gadgets: capture traffic, infer the protocol, generate a pyusb driver. Usb Rea is maintained by emirmrkaljevic on GitHub at emirmrkaljevic/usb-rea, and works with AI apps that support the Model Context Protocol, such as Claude, Cursor and VS Code.

How do I install the Usb Rea MCP server?

Add Usb Rea to your AI app's MCP config with the command uvx usb-rea==0.7.16 mcp. In Claude Code, run claude mcp add --transport stdio usb-rea -- uvx usb-rea==0.7.16 mcp. To run Usb Rea this way you need uv installed.

Does Usb Rea need an API key?

The registry lists no required keys for Usb Rea. Check the Usb Rea README for optional settings, and expect a remote server to ask you to sign in the first time you connect.

Is Usb Rea an official MCP server?

No. Usb Rea is a community server maintained by emirmrkaljevic. Community servers can be excellent; read the code and the open issues before you give Usb Rea access to company data.

What license is Usb Rea under?

Usb Rea is released under the MIT license, according to its GitHub repository. The license covers the code of Usb Rea; the service it connects to has its own terms.