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.
README
devusb
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
推荐服务器
Baidu Map
百度地图核心API现已全面兼容MCP协议,是国内首家兼容MCP协议的地图服务商。
Playwright MCP Server
一个模型上下文协议服务器,它使大型语言模型能够通过结构化的可访问性快照与网页进行交互,而无需视觉模型或屏幕截图。
Magic Component Platform (MCP)
一个由人工智能驱动的工具,可以从自然语言描述生成现代化的用户界面组件,并与流行的集成开发环境(IDE)集成,从而简化用户界面开发流程。
Audiense Insights MCP Server
通过模型上下文协议启用与 Audiense Insights 账户的交互,从而促进营销洞察和受众数据的提取和分析,包括人口统计信息、行为和影响者互动。
VeyraX
一个单一的 MCP 工具,连接你所有喜爱的工具:Gmail、日历以及其他 40 多个工具。
graphlit-mcp-server
模型上下文协议 (MCP) 服务器实现了 MCP 客户端与 Graphlit 服务之间的集成。 除了网络爬取之外,还可以将任何内容(从 Slack 到 Gmail 再到播客订阅源)导入到 Graphlit 项目中,然后从 MCP 客户端检索相关内容。
Kagi MCP Server
一个 MCP 服务器,集成了 Kagi 搜索功能和 Claude AI,使 Claude 能够在回答需要最新信息的问题时执行实时网络搜索。
e2b-mcp-server
使用 MCP 通过 e2b 运行代码。
Neon MCP Server
用于与 Neon 管理 API 和数据库交互的 MCP 服务器
Exa MCP Server
模型上下文协议(MCP)服务器允许像 Claude 这样的 AI 助手使用 Exa AI 搜索 API 进行网络搜索。这种设置允许 AI 模型以安全和受控的方式获取实时的网络信息。