What is ESP32 MCP Server?
ESP32 MCP Server is a Model Context Protocol (MCP) server that runs on ESP32 microcontrollers (and Nordic nRF52840 in sensor-only mode). It exposes real-world sensor data and bus protocols to AI assistants and automation tools over WebSocket / JSON‑RPC 2.0, enabling direct hardware interaction from MCP clients.
How to use ESP32 MCP Server?
Clone the repository, install library dependencies with PlatformIO, build and flash the firmware, then upload web assets to LittleFS (optional). On first run, connect to the board’s WiFi AP (ESP32_XXXXXX), open http://192.168.4.1, enter your WiFi credentials, and the board will join your network. Connect any MCP client to ws://<IP>:9000 to start querying sensors, bus data, and bus history.
Key features of ESP32 MCP Server
- MCP protocol (JSON‑RPC 2.0 over WebSocket) with resource discovery and subscriptions
- I2C sensor auto‑scan and drivers for BME280, MPU6050, ADS1115, SHT31, BH1750, INA219
- NMEA 0183 parser (GGA, RMC, VTG, GSV, MWV, DBT, DPT, HDG, HDT) with XOR checksum validation
- NMEA 2000 / CAN decoding (position, heading, speed, depth, wind, attitude, water temperature)
- OBD‑II / CAN decoding (60+ PIDs, service 01/09)
- Persistent ring buffers for bus history (CAN, NMEA, NMEA 2000, OBD‑II) queryable via MCP
- WiFi setup UI + STA mode; mDNS and UDP discovery; web dashboard and HTTP endpoints
Use cases of ESP32 MCP Server
- Query live I2C sensor readings (temperature, humidity, pressure, IMU) from an AI assistant
- Parse NMEA 0183 GPS/marine data from a chart plotter or GPS module and expose it via MCP
- Decode NMEA 2000 or OBD‑II CAN frames for vessel telemetry or vehicle diagnostics
- Replay recorded bus history (CAN, serial) for offline analysis or simulation
- Integrate hardware sensors and serial/CAN buses into an MCP‑based automation pipeline
コメント