Give your AI coding agent hands on real hardware.
An MCP server for PlatformIO: build, flash (serial or OTA), watch serial, run tests, decode crashes and core dumps, check partition tables, watch heap and power, debug over GDB, shrink firmware.
Python native ยท no Node ยท one line to install ยท works with Claude Code, Claude Desktop, Cursor, Codex, Windsurf, Cline
--- ## โก 60-second install You need [uv](https://docs.astral.sh/uv/) (`curl -LsSf https://astral.sh/uv/install.sh | sh`). Then: ```bash uvx platformio.mcp install --claude-code # or --cursor --claude-desktop --codex --windsurf ``` No PlatformIO on this machine? Add `--with-platformio` and the server brings PlatformIO Core along. Optional extras: `platformio.mcp[coredump]` adds the ESP32 core-dump analyzer, `platformio.mcp[power]` adds the Nordic PPK2 driver.| Group | Tools | What the agent gets back |
|---|---|---|
| ๐ Discover | pio_system_info ยท pio_list_boards ยท pio_board_info ยท pio_list_devices |
PlatformIO version and policy; ~1,700 boards with MCU, clock, RAM and flash sizes; serial ports with the likely dev boards flagged |
| ๐ Project | pio_project_init ยท pio_project_envs ยท pio_project_metadata |
A real pio project init (never a hand-written ini); every env with board, framework, monitor and upload settings; defines and include paths |
| ๐จ Build & flash | pio_build ยท pio_upload ยท pio_upload_ota ยท pio_clean ยท pio_list_targets ยท pio_run_target |
Status, parsed errors and warnings (file, line, column), RAM/Flash %, last 40 lines, full log path. Extra targets like buildfs, erase. OTA over Wi-Fi to ArduinoOTA boards. Port failures come back classified (busy, permission, missing, no response) with the fix |
| ๐ Serial | pio_monitor_start / read / write / stop / list ยท pio_monitor_capture ยท pio_port_diagnose |
Background sessions with a ring buffer, cursor reads, and wait_for regex; or a one-shot capture with nothing to manage. Port diagnosis: who holds it (our session, another process), permissions, the fix |
| โ Verify | pio_test ยท pio_check |
Unity tests with per-case pass/fail and messages; cppcheck / clang-tidy defects by severity with CWE ids |
| ๐ฆ Packages | pio_pkg_search / install / uninstall / list / outdated / update ยท pio_deps_check |
Registry search and dependency changes that keep platformio.ini in sync; an audit for name collisions, unpinned specs, leftovers, and circular dependencies |
| ๐ง Analyse | pio_flash_and_verify ยท pio_decode_backtrace ยท pio_size_report |
Hardware-in-the-loop pass/fail; crash dumps resolved to file:line; where every byte of flash and RAM goes |
| ๐พ Flash layout | pio_partition_table ยท pio_coredump |
ESP32 partition CSV checks (alignment, overlap, fit, OTA slots) and a diff against the table actually on the chip; core dump pulled from flash and decoded |
| ๐ Runtime | pio_memory_watch ยท pio_power_profile |
Heap and stack telemetry parsed from serial with a leak verdict and per-task headroom; current draw from a serial meter or a Nordic PPK2 with sleep/active split and battery estimate |
| ๐ Debug | pio_debug_start / cmd / stop / list |
A live GDB session over pio debug: breakpoints, step, backtrace, variables, with MI records parsed into structured results |