
ESP32 Control
com.pixharvestv0.1.0更新於 Oct 8, 2026
Control ESP32 IoT devices from AI agents: status, GPIO, ADC, reboot.
概覽
讓助理透過 REST API 檢視與控制 ESP32 物聯網裝置:狀態、GPIO 讀寫、ADC 取樣、原始指令與重新開機。
- 功能
- 為執行輕量 MicroPython REST 韌體的 ESP32 提供六個工具:esp32.status 回報上線狀態、晶片、可用堆積記憶體與運作時間;esp32.gpio_set 將某個 GPIO 設為高或低;esp32.gpio_read 讀取數位腳位;esp32.adc_read 回傳類比電壓(毫伏);esp32.send_command 送出原始 AT 或應用指令;esp32.reboot 重新啟動裝置。此伺服器在本機執行,透過 HTTP 與裝置通訊,區網與遠端皆可使用。
- 適用情境
- 當你希望 Claude Desktop、Cursor 等 AI 用戶端直接檢視或操作實體 ESP32 開發板時使用,例如切換腳位電位、取樣類比輸入、檢查裝置健康狀態或重新開機,而不必開啟序列埠終端機或自行撰寫指令碼。
- 執行需求
- 本機 Python 執行環境並安裝 esp32-mcp 套件,以及一台已刷入本專案 MicroPython 韌體、提供 REST API 的 ESP32。裝置位址以環境變數 ESP32_HOST 設定(預設 ESP32_TIMEOUT 設定。裝置本身的 WiFi 熱點使用預設密碼,應予變更。
安裝
在 SourceWeft 中
- 開啟 儀表板中的 ESP32 Control,將其新增到工作區。
- 為需要使用其工具的對話啟用該服務。
Desktop only,透過 STDIO。 STDIO 服務會啟動本機處理程序,因此需要 SourceWeft 桌面主機。
其他 MCP 客戶端
參照 儲存庫 中的啟動說明。
README
ESP32 MCP Server
Control and read ESP32 IoT devices directly from AI agents (Claude, Cursor, any MCP client).
esp32.status— online / chip / free heap / uptimeesp32.gpio_set— set a GPIO high/lowesp32.gpio_read— read a digital pinesp32.adc_read— read analog voltage (mV)esp32.send_command— raw AT/application commandesp32.reboot— reboot the device
Architecture
The ESP32 runs a tiny MicroPython firmware (esp32_firmware/main.py) exposing a
lightweight REST API on port 80. The MCP server talks to it over HTTP — works
locally and remotely.
Quick start
1. Flash the ESP32 firmware
- Install MicroPython on your ESP32.
- Upload
esp32_firmware/main.pyasmain.py(Thonny ormpremote). - Power on — the device opens a WiFi AP named
ESP32-MCP(password12345678) or you can set STA mode inside the firmware to join your network.
2. Run the MCP server
For remote agents, run with HTTP transport:
3. Add to your AI client
Claude Desktop (claude_desktop_config.json):
Cursor: Settings → MCP → Add server → esp32-mcp with env ESP32_HOST.
Then just ask: "turn GPIO 2 on", "what's the ADC reading on pin 34?", "reboot the device".
Configuration
Safety
- GPIO outputs are limited to pins
2, 4, 5, 18, 19by default (editGPIO_OUTin the firmware to change). - The firmware only listens on its own network; change the AP password before exposing to the internet.
Pricing
Free is not a trial — core tools work forever. Upgrade when you need scale.
License
MIT
來源:README.md,提交 2e603b9
工具
0版本歷史
1- v0.1.0最新Oct 8, 2026


