Skip to content

Connect AI Agents

MCP/U works with any MCP-compatible AI agent. This guide covers configuration for all supported agents.


AgentConfig FileAdd CommandEnv Field
Claude Desktopclaude_desktop_config.jsonN/A (manual)"env"
Claude Code.mcp.jsonclaude mcp add"env"
Gemini CLI~/.gemini/settings.jsongemini mcp add"env"
OpenCodeopencode.jsonN/A (manual)"environment"

Config file locations:

OSPath
Linux~/.config/claude/claude_desktop_config.json
macOS~/Library/Application Support/Claude/claude_desktop_config.json
Windows%APPDATA%\Claude\claude_desktop_config.json
{
"mcpServers": {
"mcpu": {
"command": "npx",
"args": ["mcpu-client"],
"env": {
"SERIAL_PORT": "/dev/ttyACM0"
}
}
}
}
{
"mcpServers": {
"mcpu": {
"command": "npx",
"args": ["mcpu-client"],
"env": {
"DEVICES": "mydevice:192.168.1.42:3000:tcp"
}
}
}
}
{
"mcpServers": {
"mcpu": {
"command": "npx",
"args": ["mcpu-client"],
"env": {
"DEVICES": "robot:/dev/ttyUSB0:115200,sensor:192.168.1.42:3000:tcp"
}
}
}
}

Serial:

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

WiFi TCP:

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

Multiple devices:

Terminal window
claude mcp add mcpu -e DEVICES=robot:/dev/ttyUSB0:115200,sensor:192.168.1.42:3000:tcp -- npx mcpu-client

Or edit .mcp.json (project-level, shareable with team)

Section titled “Or edit .mcp.json (project-level, shareable with team)”
{
"mcpServers": {
"mcpu": {
"command": "npx",
"args": ["mcpu-client"],
"env": {
"SERIAL_PORT": "/dev/ttyACM0"
}
}
}
}
Terminal window
claude mcp list

Or inside a 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
{
"mcpServers": {
"mcpu": {
"command": "npx",
"args": ["mcpu-client"],
"env": {
"SERIAL_PORT": "/dev/ttyACM0"
}
}
}
}
Terminal window
gemini mcp list

Or inside a session: /mcp


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

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

VariableDescriptionExample
SERIAL_PORTSerial port (single device)/dev/ttyACM0, COM3
SERIAL_BAUDBaud rate (default: 115200)9600
DEVICESMulti-device configid:port:baud, id:host:port:tcp
Serial: id:port:baud
TCP: id:host:port:tcp

Examples:

  • robot:/dev/ttyUSB0:115200
  • sensor:192.168.1.42:3000:tcp
  • robot:/dev/ttyUSB0:115200,sensor:192.168.1.42:3000:tcp

SerialWiFi TCPMulti-Device
Env varSERIAL_PORT=/dev/ttyACM0DEVICES=id:IP:port:tcpDEVICES=a:/dev/ttyUSB0:115200,b:IP:port:tcp
WindowsSERIAL_PORT=COM3same formatsame format
Claude DesktopClaude CodeGemini CLIOpenCode
Add commandN/Aclaude mcp addgemini mcp addManual only
Config fileclaude_desktop_config.json.mcp.json~/.gemini/settings.jsonopencode.json
Env field"env""env""env""environment"
Command formatstringstringstringarray
VerifyRestart appclaude mcp listgemini mcp listopencode mcp list