Spec Driven Development
MCP Server that facilitates spec-driven development workflows, not just Vibe Coding.
คำอธิบายจากผู้ทำ (ภาษาอังกฤษตามต้นฉบับ)
PlatformIO for AI agents: build, flash, serial monitor, tests, crash decoding, size reports.
สามเรื่องนี้ไม่รวมเป็นคะแนนเดียว เพราะความเห็น การวัด และความนิยม เป็นคนละเรื่องกัน
ตัวนี้ยังไม่ได้เรียบเรียงเป็นภาษาไทย ด้านล่างคือข้อเท็จจริงที่เราอ่านจาก registry
เลือกโปรแกรม AI ที่คุณใช้ แล้วคัดลอกค่าตั้งไปวาง
PLATFORMIO_MCP_POLICY, PLATFORMIO_MCP_PROJECT_DIR, PLATFORMIO_MCP_PIOต้องเตรียมก่อน
คุณใช้แอปไหน
เลือกแอปด้านบน เราจำไว้ให้ ครั้งหน้าปุ่มจะขึ้นว่า “ติดตั้งลง …”
เปิด Claude Desktop → Settings → Developer → Edit Config แล้ววางค่านี้ในไฟล์ claude_desktop_config.json
{
"mcpServers": {
"platformio": {
"command": "uvx",
"args": [
"platformio.mcp"
],
"env": {
"PLATFORMIO_MCP_POLICY": "ใส่ค่าของคุณ",
"PLATFORMIO_MCP_PROJECT_DIR": "ใส่ค่าของคุณ",
"PLATFORMIO_MCP_PIO": "ใส่ค่าของคุณ"
}
}
}
}พิมพ์คำสั่งนี้ใน Terminal
claude mcp add platformio --env PLATFORMIO_MCP_POLICY='ใส่ค่าของคุณ' --env PLATFORMIO_MCP_PROJECT_DIR='ใส่ค่าของคุณ' --env PLATFORMIO_MCP_PIO='ใส่ค่าของคุณ' -- uvx platformio.mcpเติมค่าที่เว้นว่างไว้ก่อนรัน
วางในไฟล์ .cursor/mcp.json ของโปรเจกต์ หรือ ~/.cursor/mcp.json
{
"mcpServers": {
"platformio": {
"command": "uvx",
"args": [
"platformio.mcp"
],
"env": {
"PLATFORMIO_MCP_POLICY": "ใส่ค่าของคุณ",
"PLATFORMIO_MCP_PROJECT_DIR": "ใส่ค่าของคุณ",
"PLATFORMIO_MCP_PIO": "ใส่ค่าของคุณ"
}
}
}
}เบราว์เซอร์จะถามก่อนเปิดแอป จากนั้นแอปแสดงค่าตั้งให้ตรวจแล้วกดยืนยัน ช่อง key เว้นว่างไว้ให้คุณใส่เอง
วางในไฟล์ .vscode/mcp.json ของโปรเจกต์
{
"servers": {
"platformio": {
"type": "stdio",
"command": "uvx",
"args": [
"platformio.mcp"
],
"env": {
"PLATFORMIO_MCP_POLICY": "ใส่ค่าของคุณ",
"PLATFORMIO_MCP_PROJECT_DIR": "ใส่ค่าของคุณ",
"PLATFORMIO_MCP_PIO": "ใส่ค่าของคุณ"
}
}
}
}เบราว์เซอร์จะถามก่อนเปิดแอป จากนั้นแอปแสดงค่าตั้งให้ตรวจแล้วกดยืนยัน ช่อง key เว้นว่างไว้ให้คุณใส่เอง
ตัวนี้รันในเครื่องคุณ แต่ ChatGPT ต่อได้เฉพาะ server บนอินเทอร์เน็ต ลองเลือกแอปอื่น
ตัวเลือกเก็บในคุกกี้บนเครื่องนี้ ไม่ต้องมีบัญชี
PLATFORMIO_MCP_POLICY envPLATFORMIO_MCP_PROJECT_DIR envPLATFORMIO_MCP_PIO envค่าตั้งนี้สร้างจากข้อมูลใน registry ของผู้ทำ ถ้าไม่ตรงกับ README ให้เชื่อ README
รันในเครื่องคุณ รายการเครื่องมือจะขึ้นในแอป AI หลังติดตั้ง
เราตรวจจากข้อมูลที่ใครก็เปิดดูได้ ยังไม่ได้อ่านโค้ด ข้อที่ไม่เกี่ยวกับตัวนี้ไม่นับในตัวหาร · ตรวจเมื่อ 6 พ.ย. 2569
ชื่อใน registry ยืนยันด้วยบัญชี GitHub powerdragonfire ซึ่งเป็นเจ้าของ repo
ยังไม่ได้อ่านข้อมูล repo จาก GitHub
ยังไม่ได้อ่านข้อมูล repo จาก GitHub
ตัวนี้รันบนเครื่องคุณ ไม่มี endpoint บนอินเทอร์เน็ต
ตัวนี้รันบนเครื่อง ใช้ค่าที่ตั้งในเครื่องแทน
รันในเครื่องคุณ เราอ่านรายการเครื่องมือได้เฉพาะตัวที่มี endpoint บนอินเทอร์เน็ต
เทียบกับทุก server ที่ยังใช้งานในหมวดนี้ทั้งทะเบียน ดาวนับเฉพาะเมื่อผู้ลงทะเบียนเป็นเจ้าของ repo
จากการตรวจเบื้องต้นของเรา ผ่าน 1 จาก 1 ข้อที่ตรวจได้ เรายังไม่ได้อ่านโค้ด ก่อนใส่กุญแจหรือ token ให้ดูว่า server ขอสิทธิ์อะไร และเลือกกุญแจที่ทำได้เท่าที่จำเป็น
registry ไม่ได้ระบุว่าต้องใช้กุญแจ แต่บางตัวจะขอให้ล็อกอินตอนใช้ครั้งแรก
รันบนเครื่องของคุณ โปรแกรม AI จะเปิด server ขึ้นมาเองเมื่อใช้ ข้อมูลไม่ต้องผ่านเซิร์ฟเวอร์ของผู้ทำ (ยกเว้นตัวที่ไปเรียกบริการออนไลน์ต่อ)
repo บน GitHub มีการแก้โค้ดล่าสุด – และส่งรุ่นล่าสุด (0.1.0) เข้า registry 2 เดือนที่ผ่านมา
โปรแกรมที่รองรับ MCP เช่น Claude Desktop, Claude Code, Cursor และ VS Code ตัวนี้ต้องมี Python (uv) ในเครื่องด้วย
ในหมวดเดียวกันมี Spec Driven Development, Remote Desktop Commander, Fomu MCP
server หมวดเดียวกันจากผู้ทำคนอื่น เรียงตามดาว
อ่านการ์ด:★ ดาว GitHubiสามเสา: รีวิว · ผลตรวจ · การใช้งานiอัปเดต = วันที่ส่งรุ่นล่าสุดเข้า registryi
MCP Server that facilitates spec-driven development workflows, not just Vibe Coding.
Remote Desktop Commander: use files, terminal and processes on your own computers from any AI app.
Kenya government form guides: checklists, draft letters, eCitizen, Huduma, timelines. Sample data.
ส่วนนี้คัดจาก repo ของผู้ทำตามต้นฉบับ PopNx MCP ไม่ได้ตรวจหรือรับรองเนื้อหา ตัด HTML รูปภาพ และสคริปต์ออกแล้ว ลิงก์จะพาออกนอกเว็บ
platformio.mcp
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
You need uv (curl -LsSf https://astral.sh/uv/install.sh | sh). Then:
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.
Any other MCP client (Cline, Zed, Continue, ...)
uvx platformio.mcp install --print
{ "mcpServers": { "platformio": { "command": "uvx", "args": ["platformio.mcp"] } } }
Use "args": ["platformio.mcp[platformio]"] to bundle PlatformIO Core.
As a plugin (Claude Code, Cursor: server + a skill that teaches the loop)
The repo follows the Open Plugins layout: .mcp.json, skills/platformio/SKILL.md, rules/platformio.mdc, plugin.json.
claude plugin marketplace add powerdragonfire/platformio.mcp # Claude Code
claude plugin install platformio@platformio.mcp
</details>
Already have PlatformIO?
The server finds platformio / pio on your PATH or in ~/.platformio/penv. Override with PLATFORMIO_MCP_PIO=/path/to/pio. Run uvx platformio.mcp doctor to see what the agent will see.
You: flash the
viewenv and make sure it boots.
Agent →
pio_flash_and_verify(env="view", expect="setup done")
`
FAIL: firmware flashed but the boot log matched the failure pattern:
'Guru Meditation Error: Core 1 panic'ed (LoadProhibited)'.
Cause: LoadProhibited. 3/3 addresses resolved:
DisplayTask::run() (display_task.cpp:22) <- DisplayTask::run() (display_task.cpp:23) <- vPortTaskWrapper (port.c:143)
`
Agent: null pointer on line 22 of
display_task.cpp,tft_is used beforebegin(). Fixing, rebuilding, flashing again.
`
PASS: flashed env view in 14.2s and saw 'setup done' on /dev/cu.usbserial-0001 after 2.1s of boot output.
`
No 40 KB build logs in the context window. No human reading the serial monitor. The agent gets a verdict, a file and a line.
flowchart LR
A[pio_project_envs] --> B[edit code] B --> C[pio_build] C -- errors with file:line --> B C -- ok --> D[pio_flash_and_verify] D -- PASS --> E([done]) D -- FAIL: decoded backtrace --> B D -- TIMEOUT --> F[pio_monitor_capture] F --> B
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
Every tool returns ok, a one-paragraph summary written for the model, structured fields, and a log_path to the full output. Long output stays on disk under ~/.platformio-mcp/logs (newest 200 files kept).
| What it does | Under the hood | |
|---|---|---|
| 🚀 `pio_flash_and_verify` | Flash, open the port, read until expect matches (pass), a crash signature matches (fail, auto-decoded), or the timeout passes (timeout) | pio run -t upload + pyserial; fail_on defaults to Guru Meditation, HardFault, abort(), assert failed, watchdog, brownout, heap corruption |
🔁 **pio_test_plan_*** | Run a declarative hardware test plan for N iterations with cancellation, per-iteration verdicts (pass/fail/timeout/infra_error), and evidence logs | Reuses upload + serial monitor tools, continues observing for a post-success window, and writes machine-readable reports with source+firmware identity |
| 🩺 `pio_decode_backtrace` | Turn an ESP32 Backtrace: 0x400d... dump or a Cortex-M pc/lr dump into function, file, line, inlined frames, cause, reset reason | Toolchain located from pio project metadata, then -addr2line -pfiaC on firmware.elf; fixes Xtensa A0 window bits |
| 📊 `pio_size_report` | Why is the firmware this big? Flash/RAM %, loaded sections, biggest symbols with file:line, per-file totals, regex filter | pio run -t checkprogsize (partition-aware) + GNU size -A + nm -S -C -l --size-sort |
| 💾 `pio_partition_table` | Catch the silent ESP32 corruption where an app-only flash leaves an old partition table on the chip; alignment, overlap, OTA slot, and app-fit checks | Parses the env's partition CSV; read_device=true reads 0x8000 with esptool read_flash and diffs |
| 🧯 `pio_coredump` | Pull the core dump from the coredump partition after a crash and decode task, registers, and backtrace | esptool read_flash + optional esp-coredump info_corefile (platformio.mcp[coredump]) |
| 📈 `pio_memory_watch` | Leak, fragmentation, and stack-headroom verdicts from what the firmware already prints | Parses Free heap:, heap_caps_print_heap_info, vTaskList, uxTaskGetStackHighWaterMark lines; least-squares slope |
| 🔋 `pio_power_profile` | Average/min/max/p95 current, sleep vs active split, energy, battery-life estimate | A serial meter (INA219 sketch, USB meter log) or a Nordic PPK2 (platformio.mcp[power]) |
🐞 **pio_debug_*** | Breakpoints, step, backtrace, and variable inspection through the debug probe | pio debug --interface=gdb driven over GDB/MI with parsed *stopped events |
| 🌐 `pio_upload_ota` | Flash over Wi-Fi with failures mapped to the fix (wrong password, no ArduinoOTA.handle(), firewall, no OTA slot) | pio run -t upload --upload-port (espota auto-switch) or espota.py directly |
| 🔌 `pio_port_diagnose` | Why the upload cannot open the port: our session, another process, permissions, or a board not in bootloader mode | lsof/fuser + pio device list; never kills anything |
| 📚 `pio_deps_check` | Library name collisions where lib_deps order silently picks the winner, unpinned specs, leftovers, cycles | Manifests in .pio/libdeps and lib/, plus the LDF dependency graph with build=true |
Use declarative JSON plans when you need reproducible board validation over many iterations.
{
"plan_version": 1, "name": "SPI loopback", "project_dir": "/abs/project", "environment": "ch32h4_loopback", "device_identity": "bench-ch32h4-01", "board": { "platformio_env": "ch32h4_loopback", "board_id": "genericCH32H4" }, "peripherals": ["SPI loopback"], "pin_mapping": { "SPI_MOSI": "PB15", "SPI_MISO": "PB14" }, "fixture": { "required_wiring": ["PB15 to PB14"] }, "run": { "iterations": 100, "upload_each_iteration": true, "stop_open_sessions": true }, "serial_assertion": { "success_pattern": "SPI_LOOPBACK_OK", "failure_pattern": "panic|HardFault|assert failed|test-failure", "timeout_s": 20, "observation_window_s": 5, "reconnect_attempts": 1 } }
Workflow:
pio_test_plan_validate(plan_path=...)pio_test_plan_start(plan_path=...)pio_test_plan_status(run_id=...)pio_test_plan_cancel(run_id=...)Reports include source revision + dirty state, firmware hash, selected env, and detected device identity. Every non-pass iteration stores evidence logs with references in the JSON report.
An end-to-end CH32H4 fixture + firmware example is in examples/ch32h4-spi-loopback.
Set PLATFORMIO_MCP_POLICY in the server's env, or pass --policy t
ตัดมาแค่ช่วงต้น อ่านต่อใน repo