mcp210x-uart/README.md
Ryan Malloy fc12d6a2d7 Add cp210x-mcp FastMCP server for device customization
MCP Tools:
- list_devices: List connected CP210x devices
- get_device_info: Full device details (part number, VID/PID, strings)
- set_product_string: Change USB device name (max 126 chars)
- set_manufacturer_string: Change manufacturer (max 45 chars)
- set_serial_number: Change serial number (max 63 chars)
- set_max_power: Set USB power draw (0-500mA)
- set_self_powered: Toggle self/bus powered
- reset_device: USB re-enumeration
- lock_device: PERMANENTLY lock configuration

Requires libcp210xmanufacturing.so (see aur/cp210xmanufacturing)

Usage:
  claude mcp add cp210x -- uvx cp210x-mcp
2026-01-30 10:37:08 -07:00

86 lines
2.0 KiB
Markdown

# CP210x MCP Server
MCP server for customizing Silicon Labs CP210x USB-UART bridge devices. Allows reading and writing USB descriptor strings, power configuration, and more.
## Features
- List connected CP210x devices
- Read/write USB product string (device name)
- Read/write manufacturer string
- Read/write serial number
- Configure max power draw
- Set self-powered/bus-powered mode
- Reset device (USB re-enumeration)
- Lock device (permanent - prevents further changes)
## Requirements
- Linux x86_64
- `libcp210xmanufacturing.so` - Install via AUR package or build from source
## Installation
### Install the library (Arch Linux)
```bash
cd aur/cp210xmanufacturing
makepkg -si
```
Or build from source:
```bash
cd AN721SW/Linux/LibrarySourcePackages/cp210xmanufacturing
make LIB_ARCH=64
sudo make install
sudo ldconfig
```
### Install the MCP server
```bash
# With uv (recommended)
uv tool install .
# Or with pip
pip install .
```
## Usage
### Add to Claude Code
```bash
claude mcp add cp210x -- uvx cp210x-mcp
```
### Available Tools
| Tool | Description |
|------|-------------|
| `list_devices` | List connected CP210x devices |
| `get_device_info` | Get detailed device information |
| `set_product_string` | Set USB product string (device name) |
| `set_manufacturer_string` | Set USB manufacturer string |
| `set_serial_number` | Set USB serial number |
| `set_max_power` | Set max USB power draw (mA) |
| `set_self_powered` | Set self-powered vs bus-powered |
| `reset_device` | Reset device (USB re-enumeration) |
| `lock_device` | PERMANENTLY lock device config |
### Example
```bash
# In Claude Code conversation:
> What CP210x devices are connected?
> Change the product name of device 0 to "My Custom Device"
```
## Relationship to mcserial
This MCP server complements [mcserial](https://github.com/ryanmalloy/mcserial) which handles serial port communication. Use this server for **device customization** (changing USB descriptors) and mcserial for **serial communication** (sending/receiving data over UART).
## License
MIT