Skip to content

Connect via Serial (USB)

USB Serial is the simplest way to connect your MCU to MCP/U. It works with any Arduino-compatible board and requires no network configuration.


  1. Connect your board via USB

  2. Find the port using the commands below for your operating system:

Terminal window
ls /dev/ttyUSB* /dev/ttyACM*

Typical output: /dev/ttyUSB0 or /dev/ttyACM0


On Linux, you may get a “Permission denied” error when accessing the serial port. This is because only members of the dialout group can access serial devices.

  1. Add your user to the dialout group

    Terminal window
    sudo usermod -aG dialout $USER
  2. Log out and log back in (or reboot)

  3. Verify membership

    Terminal window
    groups | grep dialout

Once you know your serial port, configure your AI agent:

{
"mcpServers": {
"mcpu": {
"command": "npx",
"args": ["mcpu-client"],
"env": {
"SERIAL_PORT": "/dev/ttyACM0"
}
}
}
}

Config file location:

  • Linux: ~/.config/claude/claude_desktop_config.json
  • macOS: ~/Library/Application Support/Claude/claude_desktop_config.json
  • Windows: %APPDATA%\Claude\claude_desktop_config.json

The default baud rate is 115200. If your project uses a different rate:

Terminal window
SERIAL_PORT=/dev/ttyACM0 SERIAL_BAUD=9600 npx mcpu-client

In agent config:

"env": {
"SERIAL_PORT": "/dev/ttyACM0",
"SERIAL_BAUD": "9600"
}

For more than one serial device, use the DEVICES format:

Terminal window
DEVICES=robot:/dev/ttyUSB0:115200,display:/dev/ttyACM0:115200 npx mcpu-client

Format: id:port:baud

See Multi-Device Setup for full details.


  • Check the USB cable — some charge-only cables don’t carry data
  • Try a different USB port — some ports may not provide enough power
  • Check if it’s detected: ls /dev/tty* before and after plugging in

If you see garbled output in Serial Monitor, verify the baud rate matches what your firmware uses (default 115200).

Another application may be holding the port:

Terminal window
# Linux
lsof /dev/ttyACM0

Close any other Serial Monitor instances or Arduino IDE upload windows.