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
02 / Tools

11 Standard MCP Tools Live

Every tool uses the same call pattern across all boards. Import the repo once — your AI tool works with any Pclika-compatible hardware.

device_info
Board identity, firmware version, capability flags, heap statistics
No parameters required
sensor_read
Read any registered sensor — temperature, humidity, light, CO2, distance, IMU
sensor_id: string · channel?: int
display_text
Write text to any registered display — OLED, TFT, or future display types
text: string · line?: int · clear?: bool
servo_move
Move a servo to an angle. Supports sweep speed for smooth motion
angle: 0-180 · channel?: int · speed?: int(ms)
led_control
Control onboard LED or addressable LED strip. RGB color + blink rate
state: on|off|blink · r/g/b?: int · blink_hz?: float
gpio_read
Read digital level of any GPIO pin
pin: int
gpio_write
Write digital level to any output-capable GPIO pin
pin: int · level: 0|1
button_read
Read onboard button state and press counter. Optionally reset count
button_id?: string · reset_count?: bool
wifi_scan
Scan and list nearby Wi-Fi access points with RSSI and channel
max_results?: int
serial_log_read
Read recent device log lines directly into your AI tool's context
lines?: int · filter?: string
firmware_version
Firmware version, build date, IDF version, platform seal
No parameters required
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"] } } }
04 / Hardware

Supported Platforms

Platform Status Notes
ESP32-S3 Live Primary platform. USB-CDC native, 8MB flash, 2MB PSRAM, dual-core 240MHz
ESP32-S3 DevKitC-1 Live Confirmed working with hello-mcp and env-monitor examples
STM32G4 / STM32H7 Phase 3 Control-focused platform — industrial IO, CAN, precise timing
iCE40UP5K (pclika-hdl) Phase 4 FPGA AI development via separate pclika-hdl repo and pclikaHDL MCP server

Confirmed Module Compatibility

Module Type MCP Tool
DHT22 / AM2302 Temperature + Humidity sensor_read(sensor_id="temp_humidity")
SSD1306 OLED 128×64 Display (I2C) display_text(text="…", line=0)
SG90 Servo Servo (PWM) servo_move(angle=90, channel=0)
Generic GPIO Digital IO gpio_read(pin=4) / gpio_write(pin=4, level=1)
05 / Get Started

Start in 3 commands

# 1. Install the bridge pip install ./bridge/mcp-server # 2. Flash the firmware (from examples/hello-mcp) idf.py set-target esp32s3 && idf.py flash # 3. Connect Claude or Codex pclika-bridge --port /dev/ttyUSB0

Then add the MCP config to your AI tool and call device_info. Full documentation in the GitHub repository.

GitHub Repository View Kits FPGA Platform (pclika-hdl)
PCK-MMXXVI-C4A32096 · Pclika is not a board. It is the layer between hardware and intelligence.