Platform Architecture
The MCP
Bridge Layer
Pclika puts a standard Model Context Protocol interface between your AI coding tool and physical hardware. Import the repo. Connect the board. Your AI tool gets sensor data, controls actuators, and reads logs — no custom protocol knowledge required.
01 / Architecture
How it works
┌────────────────────────────────────────────────────────────┐
│ AI Coding Tool │
│ Claude · Codex · Cursor · OpenCode │
└───────────────────────┬────────────────────────────────────┘
│ MCP (JSON-RPC 2.0 / STDIO)
▼
┌────────────────────────────────────────────────────────────┐
│ pclika-bridge │
│ Python STDIO server — translates MCP ↔ NDJSON/UART │
│ Auto port discovery · UUID request tracking │
└───────────────────────┬────────────────────────────────────┘
│ NDJSON over USB-Serial (115200 baud)
│ {"id":"…","cmd":"sensor_read","params":{…}}
▼
┌────────────────────────────────────────────────────────────┐
│ Pclika Firmware (ESP32-S3) │
│ FreeRTOS bridge task · cJSON parser · cmd dispatch │
│ pclika_runtime: sensor · display · servo · gpio · wifi │
└───────────┬────────────────────┬───────────────────────────┘
▼ ▼
Sensors Actuators
DHT22 / BME280 SSD1306 OLED
BH1750 / SCD40 ST7789 TFT
MPU6050 / VL53L0X SG90 Servo / PCA9685
GPIO / Relay
L4
Experience Layer
AI tools, prompt context, MCP client config templates (Cursor / VS Code / Claude Code)
L3
MCP Bridge Layer
pclika-bridge Python package — STDIO MCP server, NDJSON transport, auto port discovery
L2
Runtime Layer
pclika_runtime ESP-IDF component — sensor registry, display registry, servo, GPIO, Wi-Fi, logging
L1
Hardware Layer
ESP32-S3 baseboard — USB-C native CDC, OTA partition, module headers, sensor breakouts
03 / Protocol
NDJSON over USB-Serial
The device protocol is intentionally simple: newline-delimited JSON frames over USB-Serial at 115200 baud. Debuggable with any serial monitor. AI tools generate it naturally.
Host → Device (command)
// pclika-bridge sends one JSON line per tool call
{"id":"a4f2c1","cmd":"sensor_read","params":{"sensor_id":"temp_humidity"}}
{"id":"b7e3d2","cmd":"display_text","params":{"text":"Claude was here","line":0,"clear":true}}
{"id":"c9f4a1","cmd":"servo_move","params":{"angle":45,"channel":0,"speed":800}}
Device → Host (response)
// Device echoes the same id with result or error
{"id":"a4f2c1","ok":true,"data":{"value":24.5,"value2":58.3,"unit":"celsius","unit2":"%RH","valid":true}}
{"id":"b7e3d2","ok":true,"data":{"displayed":true}}
{"id":"c9f4a1","ok":true,"data":{"angle":45,"channel":0}}
MCP client config (Cursor)
// ~/.cursor/mcp.json
{
"mcpServers": {
"pclikaPlatform": {
"command": "pclika-bridge",
"args": ["--port", "/dev/ttyUSB0"]
}
}
}
PCK-MMXXVI-C4A32096 · Pclika is not a board. It is the layer between hardware and intelligence.