Sponsored by Deepsite.site

Esp Mcp

Created By
horw9 months ago
Centralize ESP32 related commands and simplify getting started with seamless, LLM-driven interaction and help.
Content

Goal

The goal of this MCP is to:

  • Consolidate ESP-IDF and related project commands in one place.
  • Simplify getting started using only LLM communication.

How to contribute to the project

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.

Notice

This project is currently a Proof of Concept (PoC) for an MCP server tailored for ESP-IDF workflows.

Current Capabilities:

  • Supports basic ESP-IDF project build commands.
  • Flash built firmware to connected ESP devices with optional port specification.
  • Includes experimental support for automatic issue fixing based on build logs.

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:

  • Broader ESP-IDF command support (e.g., monitor, menuconfig interaction if feasible).
  • Device management and information retrieval.
  • Integration with other embedded development tools and platforms.

Your ideas and contributions are welcome! Please feel free to discuss them by opening an issue.

Install

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:
    • The first argument to --directory should be the absolute path to where you cloned the esp-mcp repository.
    • If you're using 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.

Usage

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:

  • "Build the project located at /path/to/my/esp-project using the esp-mcp."
  • "Clean the build files for the ESP32 project in the examples/hello_world directory."
  • "Flash the firmware to my connected ESP32 device for the project in 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:

Result

Examples

  1. Build and Flash
Recommend Servers
TraeBuild with Free GPT-4.1 & Claude 3.7. Fully MCP-Ready.
Playwright McpPlaywright MCP server
WindsurfThe new purpose-built IDE to harness magic
BlenderBlenderMCP connects Blender to Claude AI through the Model Context Protocol (MCP), allowing Claude to directly interact with and control Blender. This integration enables prompt assisted 3D modeling, scene creation, and manipulation.
Tavily Mcp
Serper MCP ServerA Serper MCP Server
DeepChatYour AI Partner on Desktop
MCP AdvisorMCP Advisor & Installation - Use the right MCP server for your needs
MiniMax MCPOfficial MiniMax Model Context Protocol (MCP) server that enables interaction with powerful Text to Speech, image generation and video generation APIs.
Amap Maps高德地图官方 MCP Server
EdgeOne Pages MCPAn MCP service designed for deploying HTML content to EdgeOne Pages and obtaining an accessible public URL.
Jina AI MCP ToolsA Model Context Protocol (MCP) server that integrates with Jina AI Search Foundation APIs.
ChatWiseThe second fastest AI chatbot™
TimeA Model Context Protocol server that provides time and timezone conversion capabilities. This server enables LLMs to get current time information and perform timezone conversions using IANA timezone names, with automatic system timezone detection.
Zhipu Web SearchZhipu Web Search MCP Server is a search engine specifically designed for large models. It integrates four search engines, allowing users to flexibly compare and switch between them. Building upon the web crawling and ranking capabilities of traditional search engines, it enhances intent recognition capabilities, returning results more suitable for large model processing (such as webpage titles, URLs, summaries, site names, site icons, etc.). This helps AI applications achieve "dynamic knowledge acquisition" and "precise scenario adaptation" capabilities.
Howtocook Mcp基于Anduin2017 / HowToCook (程序员在家做饭指南)的mcp server,帮你推荐菜谱、规划膳食,解决“今天吃什么“的世纪难题; Based on Anduin2017/HowToCook (Programmer's Guide to Cooking at Home), MCP Server helps you recommend recipes, plan meals, and solve the century old problem of "what to eat today"
Visual Studio Code - Open Source ("Code - OSS")Visual Studio Code
AiimagemultistyleA Model Context Protocol (MCP) server for image generation and manipulation using fal.ai's Stable Diffusion model.
Baidu Map百度地图核心API现已全面兼容MCP协议,是国内首家兼容MCP协议的地图服务商。
Context7Context7 MCP Server -- Up-to-date code documentation for LLMs and AI code editors
CursorThe AI Code Editor