devusb-mcp

devusb-mcp

Enables AI agents to control USB power for embedded development boards via Yepkit YKUSH hubs, allowing power switching, monitoring, and power-cycling through MCP tools.

Category
Visit Server

README

devusb

CI

Agent-friendly USB power control for the embedded bench, built for the Agentic Firmware Workbench. Switch, monitor, and power-cycle devices attached to Yepkit YKUSH-family switchable USB hubs — from the command line or from an AI agent via MCP.

Typical use: an agent flashing and testing firmware hits a hung debug probe or wedged dev board. Instead of asking a human to unplug it, the agent runs power_cycle and carries on.

Supported hardware

Hub Switched ports Status
YKUSH3 3 verified on hardware
YKUSH 3 same protocol, untested
YKUSH XS 1 same protocol, untested

The hub is driven directly over USB HID (hidapi) — no vendor utility needed. Multiple hubs can be attached at once; target one with --serial <SN> (CLI) or the serial argument (MCP).

Install

pip install .

Requires Python 3.10+.

Linux: udev rules

On Linux, non-root access to the hub's HID interface needs a udev rule:

sudo cp udev/99-devusb.rules /etc/udev/rules.d/
sudo udevadm control --reload-rules && sudo udevadm trigger

Then unplug and replug the hub. macOS and Windows need no extra setup.

CLI

devusb list                 # attached hubs: model, serial, port count
devusb status               # power state of each port
devusb off 1                # cut power to port 1
devusb on 1                 # restore power
devusb cycle 1 --hold 10    # power-cycle: off 10 s, back on
devusb on all               # every port
devusb --json status        # machine-readable output
devusb --serial Y3N14127 off 2   # pick a hub when several are attached

MCP server

devusb-mcp runs an MCP server over stdio exposing list_hubs, port_status, port_on, port_off, and power_cycle — with agent-facing safety guidance (don't cut power mid-flash, wait for re-enumeration) baked into the tool descriptions.

Register with Claude Code:

claude mcp add --scope user devusb devusb-mcp

Any MCP-capable agent host works the same way — point it at the devusb-mcp executable.

Safety notes

  • Never cut power to a device mid-flash.
  • After power returns, give the device a few seconds to re-enumerate before talking to it.

Interoperability with uhubctl

The YKUSH3 is built on Microchip hub silicon (USB5744/USB2744) that also supports generic per-port power switching, so tools like uhubctl can see and switch its ports directly. Don't drive the same hub through both devusb and uhubctl at once: the YKUSH firmware doesn't track changes made behind its back, and the port numbering differs between the two paths (e.g. YKUSH port 1 is internal hub port 3). Pick one controller per hub.

Roadmap

devusb is YKUSH-only today, but the CLI verbs and MCP tools are vendor-neutral by design; new hub backends slot in without changing the agent-facing contract. Planned:

  • Generic USB hubs (uhubctl-style) — many ordinary hubs and docks support per-port power switching through standard USB hub commands. Approach validated on real hardware: Realtek RTS5411-based hubs switch port power reliably (tested cycling a YKUSH3 — including its downstream devices — from an upstream RTS5411 port), and the YKUSH3's own internal Microchip hub silicon accepts the same commands (see interoperability note below). A backend needs to pair each physical port's USB 2.0 and USB 3.x hub instances, as uhubctl does.
  • Acroname programmable hubs — the premium lab option.

Development

pip install -e ".[dev]"
pytest

The test suite runs against a fake HID layer — no hub required.

License

MIT

Recommended Servers

playwright-mcp

playwright-mcp

A Model Context Protocol server that enables LLMs to interact with web pages through structured accessibility snapshots without requiring vision models or screenshots.

Official
Featured
TypeScript
Magic Component Platform (MCP)

Magic Component Platform (MCP)

An AI-powered tool that generates modern UI components from natural language descriptions, integrating with popular IDEs to streamline UI development workflow.

Official
Featured
Local
TypeScript
Audiense Insights MCP Server

Audiense Insights MCP Server

Enables interaction with Audiense Insights accounts via the Model Context Protocol, facilitating the extraction and analysis of marketing insights and audience data including demographics, behavior, and influencer engagement.

Official
Featured
Local
TypeScript
VeyraX MCP

VeyraX MCP

Single MCP tool to connect all your favorite tools: Gmail, Calendar and 40 more.

Official
Featured
Local
graphlit-mcp-server

graphlit-mcp-server

The Model Context Protocol (MCP) Server enables integration between MCP clients and the Graphlit service. Ingest anything from Slack to Gmail to podcast feeds, in addition to web crawling, into a Graphlit project - and then retrieve relevant contents from the MCP client.

Official
Featured
TypeScript
Kagi MCP Server

Kagi MCP Server

An MCP server that integrates Kagi search capabilities with Claude AI, enabling Claude to perform real-time web searches when answering questions that require up-to-date information.

Official
Featured
Python
E2B

E2B

Using MCP to run code via e2b.

Official
Featured
Neon Database

Neon Database

MCP server for interacting with Neon Management API and databases

Official
Featured
Exa Search

Exa Search

A Model Context Protocol (MCP) server lets AI assistants like Claude use the Exa AI Search API for web searches. This setup allows AI models to get real-time web information in a safe and controlled way.

Official
Featured
Qdrant Server

Qdrant Server

This repository is an example of how to create a MCP server for Qdrant, a vector search engine.

Official
Featured