by horw
Centralizes ESP‑IDF commands and enables LLM‑driven interaction to streamline ESP32 project setup, building, flashing and issue fixing.
Esp Mcp consolidates common ESP‑IDF workflow commands (build, clean, flash, etc.) into a single Model Context Protocol (MCP) server, allowing a language model or chatbot to control ESP32 development tasks through natural language.
git clone git@github.com:horw/esp-mcp.git
/path/to/my/esp-project
."examples/hello_world
."my_app
."
The server translates these requests into the appropriate idf.py
commands and returns the output.idf.py build
, idf.py fullclean
, idf.py flash
.Q: Do I need ESP‑IDF installed?
A: Yes. Set the IDF_PATH
environment variable to point to your ESP‑IDF root directory.
Q: Can I use this on Windows?
A: Absolutely. Provide a Windows‑style path for IDF_PATH
and use a compatible Python or UV executable.
Q: How do I add missing commands?
A: Fork the repo, implement the new tool in main.py
, and open a pull request.
Q: Is there a GUI? A: No, interaction is performed through an LLM or chatbot that invokes the MCP server.
Q: What if I want to run the server with Node.js? A: The current implementation is Python‑based; using Node.js would require a custom wrapper.
The goal of this MCP is to:
Simply find a command that is missing from this MCP and create a PR for it!
If you want someone to help you with this implementation, just open an issue.
This project is currently a Proof of Concept (PoC) for an MCP server tailored for ESP-IDF workflows.
Current Capabilities:
Vision & Future Work: The long-term vision is to expand this MCP into a comprehensive toolkit for interacting with embedded devices, potentially integrating with home assistant platforms, and streamlining documentation access for ESP-IDF and related technologies.
We envision features such as:
monitor
, menuconfig
interaction if feasible).Your ideas and contributions are welcome! Please feel free to discuss them by opening an issue.
First, clone this MCP repository:
git clone git@github.com:horw/esp-mcp.git
Then, configure it in your chatbot.
The JSON snippet below is an example of how you might configure this esp-mcp
server within a chatbot or an agent system that supports the Model Context Protocol (MCP). The exact configuration steps and format may vary depending on the specific chatbot system you are using. Refer to your chatbot's documentation for details on how to integrate MCP servers.
{
"mcpServers": {
"esp-run": { // "esp-run" is an arbitrary name you can assign to this server configuration.
"command": "<path_to_uv_or_python_executable>",
"args": [
"--directory",
"<path_to_cloned_esp-mcp_repository>", // e.g., /path/to/your/cloned/esp-mcp
"run",
"main.py" // If using python directly, this might be just "main.py" and `command` would be your python interpreter
],
"env": {
"IDF_PATH": "<path_to_your_esp-idf_directory>" // e.g., ~/esp/esp-idf or C:\\Espressif\\frameworks\\esp-idf
}
}
}
}
A few notes on the configuration:
command
: This should be the full path to your uv
executable if you are using it, or your Python interpreter (e.g., /usr/bin/python3
or C:\\Python39\\python.exe
) if you plan to run main.py
directly.args
:
--directory
should be the absolute path to where you cloned the esp-mcp
repository.uv
, the arguments run main.py
are appropriate. If you're using Python directly, you might only need main.py
in the args
list, and ensure your command
points to the Python executable.IDF_PATH
: This environment variable must point to the root directory of your ESP-IDF installation. ESP-IDF is Espressif's official IoT Development Framework. If you haven't installed it, please refer to the official ESP-IDF documentation for installation instructions.Once the esp-mcp
server is configured and running, your LLM or chatbot can interact with it using the tools defined in this MCP. For example, you could ask your chatbot to:
/path/to/my/esp-project
using the esp-mcp
."examples/hello_world
directory."my_app
."The MCP server will then execute the corresponding ESP-IDF commands (like idf.py build
, idf.py fullclean
, idf.py flash
) based on the tools implemented in main.py
.
The result.gif
below shows an example interaction:
Please log in to share your review and rating for this MCP.
{ "mcpServers": { "esp-run": { "command": "python3", "args": [ "-m", "uv", "--directory", "<path_to_cloned_esp-mcp_repository>", "run", "main.py" ], "env": { "IDF_PATH": "<path_to_your_esp-idf_directory>" } } } }
Explore related MCPs that share similar capabilities and solve comparable challenges
by zed-industries
A high‑performance, multiplayer code editor designed for speed and collaboration.
by modelcontextprotocol
Model Context Protocol Servers
by modelcontextprotocol
A Model Context Protocol server for Git repository interaction and automation.
by modelcontextprotocol
A Model Context Protocol server that provides time and timezone conversion capabilities.
by cline
An autonomous coding assistant that can create and edit files, execute terminal commands, and interact with a browser directly from your IDE, operating step‑by‑step with explicit user permission.
by continuedev
Enables faster shipping of code by integrating continuous AI agents across IDEs, terminals, and CI pipelines, offering chat, edit, autocomplete, and customizable agent workflows.
by upstash
Provides up-to-date, version‑specific library documentation and code examples directly inside LLM prompts, eliminating outdated information and hallucinated APIs.
by github
Connects AI tools directly to GitHub, enabling natural‑language interactions for repository browsing, issue and pull‑request management, CI/CD monitoring, code‑security analysis, and team collaboration.
by daytonaio
Provides a secure, elastic infrastructure that creates isolated sandboxes for running AI‑generated code with sub‑90 ms startup, unlimited persistence, and OCI/Docker compatibility.