Skip to main content

mcusb

USB device bridge for Model Context Protocol (MCP). Enumerate, inspect, and transfer data with USB devices through structured tools.

Built with FastMCP and PyUSB.

Install

pip install mcusb

# With hot-plug detection (Linux, requires libudev):
pip install mcusb[hotplug]

Or run directly:

uvx mcusb

Register with Claude Code

claude mcp add mcusb -- uvx mcusb

What it does

23 tools for working with USB devices:

  • Enumerate — list devices, view topology
  • Inspect — descriptors, endpoints, device identification
  • Transfer — control, bulk, interrupt, and isochronous read/write
  • Manage — kernel drivers, interface claiming, configuration switching
  • Monitor — hot-plug event detection via pyudev

4 resources for live device data:

  • usb://devices — connected device list
  • usb://classes — USB class code reference
  • usb://{device_id}/info — full descriptor tree
  • usb://events — hot-plug event buffer

All binary data uses hex string encoding. Device IDs use bus:addr format (e.g. 1:2). Write operations require user confirmation via MCP elicitation.

Permissions

USB access typically requires either root privileges or a udev rule. The generate_udev_rule tool creates persistent rules for specific devices:

generate_udev_rule(device_id="1:2")

Environment variables

Variable Default Purpose
MCUSB_DEFAULT_TIMEOUT 1000 Transfer timeout (ms)
MCUSB_MAX_TRANSFER_SIZE 1048576 Max bytes per transfer
MCUSB_ALLOW_UNGATED_WRITES (unset) Allow writes without elicitation
MCUSB_HOTPLUG_BUFFER_SIZE 50 Hot-plug event ring buffer size
MCUSB_WATCH_TIMEOUT 30 Default watch_hotplug timeout (s)

Requirements

  • Python 3.10+
  • libusb (system library)
  • Linux recommended (udev integration, hot-plug detection)

License

MIT

Links

Metadata

Release files for mcusb 2026.3.6.2

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for mcusb 2026.3.6.2
File Size Uploaded Provenance
mcusb-2026.3.6.2.tar.gz 107.9 kB Without provenance Details

Built distribution (wheel)

Table of built distributions (wheels) for mcusb 2026.3.6.2
File Interpreter ABI Platform
mcusb-2026.3.6.2-py3-none-any.whl Python 3 none any Details

Total release size: 128.6 kB

Release files / mcusb-2026.3.6.2.tar.gz

Download URL mcusb-2026.3.6.2.tar.gz
Size 107.9 kB
Tags Source
SHA-256 checksum
How to use checksums
95efd0e2bbdf2d7e38c94a080dbf94389292bb51a6474944ad603704f61e0a5d
BLAKE2b-256 checksum
How to use checksums
ab878230ba3d6551672f7627b569cbaf1edbc66890d0e35739ccabd498dbf03c
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via uv/0.9.26 {"installer":{"name":"uv","version":"0.9.26","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"EndeavourOS","version":null,"id":null,"libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

Release files / mcusb-2026.3.6.2-py3-none-any.whl

Download URL mcusb-2026.3.6.2-py3-none-any.whl
Size 20.7 kB
Tags Python 3
SHA-256 checksum
How to use checksums
116d6aaa6ff66fc003a16eec343abd17e1c9c23527a43a109a574ecdba8701e9
BLAKE2b-256 checksum
How to use checksums
1a47abb8d1a72b80441821df4d2d44d426da1f8b2e0b33f7cda9d1ea5a592d97
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via uv/0.9.26 {"installer":{"name":"uv","version":"0.9.26","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"EndeavourOS","version":null,"id":null,"libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

Security for mcusb 2026.3.6.2

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page