SE

stramanu/esp32sim-mcp

开发工具

本页由 AI 翻译,技术细节请以原文为准。 查看原文

7 stars 5 forks 质量 82 趋势 29MIT

Let your coding agent boot and test ESP32 firmware in a local emulator: MCP server, CLI and agent skill around esp32sim. No board, no account.

概览

A real Claude Code session, recorded live (only the idle tail is trimmed): it edits ESP-IDF's hello_world , builds it in Docker because ESP-IDF isn't installed, and checks the console in the emulator. Coding agents are good at writing embedded C. They are blind when it comes to running it: without a board on the desk, "it compiles" is where the feedback loop ends. closes that loop. It gives Claude Code, Codex, Cursor or any MCP client a set of tools that boot the firmware the agent just built inside esp32sim, a local instruction-level ESP32 emulator, and hand back what the chip printed, whether it crashed, and what was on the display. The agent reads the result, fixes the code and tries again, the way you would with a board on the bench. - 🔌 Everything runs on your machine. No account, no token, no board. - 🧬 Espressif's mask ROM, the ESP-IDF bootloader and your unmodified app, on ESP32-S3, C3, C6 and the classic ESP32.

README

以下为原文 README 节选,完整内容请查看原文。


Coding agents are good at writing embedded C. They are blind when it comes to running it: without a board on the desk, “it compiles” is where the feedback loop ends.

esp32sim-mcp closes that loop. It gives Claude Code, Codex, Cursor or any MCP client a set of tools that boot the firmware the agent just built inside esp32sim, a local instruction-level ESP32 emulator, and hand back what the chip printed, whether it crashed, and what was on the display. The agent reads the result, fixes the code and tries again, the way you would with a board on the bench.

  • 🔌 No hardware, no cloud. Everything runs on your machine. No account, no token, no board.
  • 🧬 Real boot chain. Espressif’s mask ROM, the ESP-IDF bootloader and your unmodified app, on ESP32-S3, C3, C6 and the classic ESP32.
  • 📡 More than a console. Virtual WiFi access point with DHCP, DNS and NAT, buttons, rotary encoder, GPIO, UART input, touch, and display screenshots.
  • 🧪 Assertions, not vibes. sim_expect returns pass/fail and the exact line that is missing, so the agent knows what to fix.
  • ⚡ Fast. Emulation usually runs ahead of real time: on Apple silicon, 8 emulated seconds of a WiFi station joining a network take about 0.6 s.
  • 🤖 Comes with a skill. init installs an agent skill that teaches the write → build → simulate → fix loop, including building in Docker when ESP-IDF is not installed.

Quickstart

npx -y esp32sim-mcp setup                      # emulator + mask ROMs, pinned and SHA-256 verified
cd your-esp-idf-project
npx -y esp32sim-mcp init                       # registers the MCP server and the skill for your agents

Then ask your agent for something you can see on the serial console:

Add a counter that prints once a second, build it, and check in the simulator that it reaches 5.

在 GitHub 查看完整 README

安装

npx -y esp32sim-mcp serve
新手?先看 mcpskill.org 教程 →

配置

{ "mcpServers": { "esp32sim": { "command": "npx", "args": ["-y", "esp32sim-mcp", "serve"] } } }