Self-Describing Firmware
Devices auto-declare their tools via JSON Schema. The client registers tools dynamically — zero hardcoded names.
Self-Describing Firmware
Devices auto-declare their tools via JSON Schema. The client registers tools dynamically — zero hardcoded names.
Universal Transport
Serial and WiFi (TCP) — one library, one API, any Arduino Stream.
Minimalist Integration
Just add_pin(), add_tool(), begin(). No protocol complexity in your sketch.
Multi-Device Ready
Connect any number of MCUs to a single MCP client. Tools auto-namespaced per device.
graph LR A["Claude / LLM"] B["mcpu-client (npm)<br/>Dynamic tool regist."] C["MCU Firmware<br/>MCP-U lib"]
A <-->|"MCP (stdio)"| B B <-->|"Serial / TCP"| Clist_tools — MCU responds with full tool + pin registry (JSON Schema)#include <MCP-U.h>
McpDevice mcp("my-device", "1.0.0");
void setup() { mcp.add_pin(2, "led", MCP_DIGITAL_OUTPUT, "Onboard LED"); mcp.add_pin(34, "sensor", MCP_ADC_INPUT, "Analog Sensor"); mcp.begin(Serial, 115200);}
void loop() { mcp.loop(); }claude mcp add mcpu -e SERIAL_PORT=/dev/ttyACM0 -- npx mcpu-client{ "mcpServers": { "mcpu": { "command": "npx", "args": ["mcpu-client"], "env": { "SERIAL_PORT": "/dev/ttyACM0" } } }}Every device running MCP/U exposes these tools automatically:
| Tool | Description |
|---|---|
list_tools | Discovery: tools + pin registry |
get_info | Device name, version, platform |
gpio_write | Set digital output HIGH / LOW |
gpio_read | Read digital level |
pwm_write | PWM output (duty 0–255) |
adc_read | Read ADC value (volts on ESP32, mv on AVR) |
Firmware API →
The complete McpDevice API: pins, tools, transport, and error handling.
Read reference
Client Setup →
Configure the TypeScript MCP client for any AI agent. Read guide