Skip to content

CLI Commands Reference

Serial:

Terminal window
claude mcp add --env SERIAL_PORT=/dev/ttyACM0 mcpu -- npx mcpu-client

WiFi TCP:

Terminal window
claude mcp add --env DEVICES=mydevice:192.168.1.42:3000:tcp mcpu -- npx mcpu-client

All options (--env, --scope, --transport) must come before the server name. The -- separator isolates the command passed to the MCP server.

Serial:

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

WiFi TCP:

{
"mcpServers": {
"mcpu": {
"command": "npx",
"args": ["mcpu-client"],
"env": {
"DEVICES": "mydevice:192.168.1.42:3000:tcp"
}
}
}
}
Terminal window
claude mcp list

Or inside a Claude Code session: /mcp


Serial:

Terminal window
gemini mcp add -e SERIAL_PORT=/dev/ttyACM0 mcpu npx mcpu-client

WiFi TCP:

Terminal window
gemini mcp add -e DEVICES=mydevice:192.168.1.42:3000:tcp mcpu npx mcpu-client

Serial:

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

WiFi TCP:

{
"mcpServers": {
"mcpu": {
"command": "npx",
"args": ["mcpu-client"],
"env": {
"DEVICES": "mydevice:192.168.1.42:3000:tcp"
}
}
}
}
Terminal window
gemini mcp list

Or inside a session: /mcp


OpenCode has no CLI add command — edit opencode.json directly.

Serial:

{
"$schema": "https://opencode.ai/config.json",
"mcp": {
"mcpu": {
"type": "local",
"command": ["npx", "mcpu-client"],
"enabled": true,
"environment": {
"SERIAL_PORT": "/dev/ttyACM0"
}
}
}
}

WiFi TCP:

{
"$schema": "https://opencode.ai/config.json",
"mcp": {
"mcpu": {
"type": "local",
"command": ["npx", "mcpu-client"],
"enabled": true,
"environment": {
"DEVICES": "mydevice:192.168.1.42:3000:tcp"
}
}
}
}
Terminal window
opencode mcp list

Claude CodeGemini CLIOpenCode
Add commandclaude mcp add --env KEY=VAL mcpu -- npx mcpu-clientgemini mcp add -e KEY=VAL mcpu npx mcpu-clientmanual config only
Config file.mcp.json (project)~/.gemini/settings.jsonopencode.json
Env field"env""env""environment"
Command formatstringstringarray
Verifyclaude mcp list / /mcpgemini mcp list / /mcpopencode mcp list

OSTypical port
Linux/dev/ttyUSB0 or /dev/ttyACM0
macOS/dev/cu.usbserial-*
WindowsCOM3, COM4, …
Terminal window
# Linux / macOS
ls /dev/tty*

Windows: Device Manager → Ports (COM & LPT)