esp-mcp

esp-mcp

Unified ESP-IDF command interface for LLMs and chatbots

114
Stars
11
Forks
114
Watchers
32
Issues
esp-mcp provides a Model Context Protocol (MCP) compliant server to consolidate and simplify ESP-IDF and related project command execution. It enables large language models and chatbots to perform ESP-IDF project builds, flash firmware, and manage ESP devices through standardized protocol interactions. The project is proof-of-concept with support for basic build and flash commands and aims to expand towards comprehensive embedded device management via LLM interfaces.

Key Features

Consolidated ESP-IDF command interface
MCP server for LLM and chatbot integration
Automated project build and cleaning commands
Firmware flashing with port specification
Experimental automatic issue fixing from build logs
Extensible for additional ESP-IDF commands
Device management and information retrieval (planned)
Integration with home assistant platforms (vision)
Documentation access streamlining (vision)
Flexible configuration for various development environments

Use Cases

Automating ESP-IDF project builds via chatbot or LLM interfaces
Flashing embedded firmware to ESP devices using conversational commands
Assisting developers with automatic build issue diagnosis and fixes
Managing and retrieving information from multiple ESP devices remotely
Integrating embedded development pipelines with conversational AI agents
Streamlining onboarding for new developers using ESP-IDF
Centralizing and simplifying repetitive build/flash tasks for teams
Creating custom agents to monitor and maintain IoT device fleets
Prototype development for home automation using ESP devices
Generating and accessing documentation contextually for ESP workflows

README

MseeP.ai Security Assessment Badge

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:

bash
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.

json
{
    "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

Star History

Star History Chart

Star History

Star History Chart

Repository Owner

horw
horw

User

Repository Details

Language Python
Default Branch main
Size 11,052 KB
Contributors 4
MCP Verified Nov 12, 2025

Programming Languages

Python
100%

Tags

Topics

esp-idf esp32 mcp mcp-server

Join Our Newsletter

Stay updated with the latest AI tools, news, and offers by subscribing to our weekly newsletter.

We respect your privacy. Unsubscribe at any time.

Related MCPs

Discover similar Model Context Protocol servers

  • Codex MCP Server

    Codex MCP Server

    An MCP-compatible server delivering enriched blockchain data for AI models.

    Codex MCP Server implements the Model Context Protocol to provide enriched blockchain data from Codex. It is compatible with MCP clients such as Claude Desktop and Claude CLI, allowing seamless integration in AI workflows that require blockchain context. Users can run the server locally or via npx, and configure it for various MCP-compatible tools using their Codex API key.

    • 20
    • MCP
    • Codex-Data/codex-mcp
  • Homebrew MCP Python Server

    Homebrew MCP Python Server

    Expose Homebrew management as MCP tools for integration with AI clients.

    Homebrew MCP Python Server provides an MCP-compliant interface to manage Homebrew packages on macOS via a Python-based server. It enables standardized control of Homebrew commands through the Model Context Protocol, supporting integration with Claude Desktop, Cursor, and other MCP-compatible clients. The server operates via stdio using JSON-RPC 2.0, logs all interactions, and offers a declarative Python implementation. It is designed for seamless tool-chaining, advanced context management, and easy integration into LLM-driven environments.

    • 18
    • MCP
    • jeannier/homebrew-mcp
  • MetaTrader MCP Server

    MetaTrader MCP Server

    Let AI assistants trade for you using natural language.

    MetaTrader MCP Server is a bridge that connects AI assistants such as Claude and ChatGPT to the MetaTrader 5 trading platform via the Model Context Protocol (MCP). It enables users to perform trading actions on MetaTrader 5 through natural language instructions. The system supports real-time data access, full account management, and secure local credential handling, offering both MCP and REST API interfaces.

    • 120
    • MCP
    • ariadng/metatrader-mcp-server
  • Modbus MCP Server

    Modbus MCP Server

    Standardizes Modbus data for seamless AI integration via the Model Context Protocol.

    Modbus MCP Server provides an MCP-compliant interface that standardizes and contextualizes Modbus device data for use with AI agents and industrial IoT systems. It supports flexible Modbus connections over TCP, UDP, or serial interfaces and offers a range of Modbus tools for reading and writing registers and coils. With customizable prompts and structured tool definitions, it enables natural language-driven interactions and analysis of Modbus data within AI workflows. The solution is designed to ensure interoperability and easy configuration within MCP-compatible environments.

    • 18
    • MCP
    • kukapay/modbus-mcp
  • LLM Context

    LLM Context

    Reduce friction when providing context to LLMs with smart file selection and rule-based filtering.

    LLM Context streamlines the process of sharing relevant project files and context with large language models. It employs smart file selection and customizable rule-based filtering to ensure only the most pertinent information is provided. The tool supports Model Context Protocol (MCP), allowing AI models to access additional files seamlessly through standardized commands. Integration with MCP enables instant project context sharing during AI conversations, enhancing productivity and collaboration.

    • 283
    • MCP
    • cyberchitta/llm-context.py
  • CCXT MCP Server

    CCXT MCP Server

    Unified Model Context Protocol gateway for cryptocurrency exchange integration

    CCXT MCP Server provides a high-performance gateway integrating multiple cryptocurrency exchanges with language models via the Model Context Protocol (MCP). It connects LLMs, such as Claude and GPT, to real-time market data and trading operations through a standardized interface. Leveraging the CCXT library, it supports various exchanges, different market types, advanced caching, and proxy configuration options. The server is optimized for maintainability with modular architecture, enabling seamless interaction and extensibility.

    • 117
    • MCP
    • doggybee/mcp-server-ccxt
  • Didn't find tool you were looking for?

    Be as detailed as possible for better results