ESP32 MCP Server

ESP32 MCP Server

Bridges the Model Context Protocol (MCP) with ESP32 devices running Tasmota firmware, enabling LLMs to send structured commands like toggling relays or reading sensors via HTTP.

Category
Visit Server

README

ESP32 MCP Server — Connect LLMs with IoT Devices

A lightweight Model Context Protocol (MCP) bridge that lets large language models (LLMs) directly communicate with an ESP32 running Tasmota or similar firmware.

This project demonstrates how an AI assistant (like ChatGPT or Copilot) can reason about user intent and execute physical actions — such as toggling relays or reading sensors — in real time, using standard HTTP commands.


📖 Overview

Traditional IoT automation relies on fixed rules, MQTT topics, or REST endpoints.
This project replaces all that with a simple concept:

The LLM talks to your ESP32 through a universal protocol — MCP.

No firmware rebuilds, no MQTT brokers, no cloud dependencies.
Just plain human language turned into structured, executable commands.

You can read the full article here:
👉 Connecting LLMs and IoT: How an ESP32 Can Speak MCP and Follow AI Commands

And watch the walkthrough video:
🎥 ESP32 + MCP + LLM Integration Demo


🧠 What It Does

  • Bridges MCP (Model Context Protocol) and your ESP32 firmware (e.g., Tasmota)
  • Exposes a single tool: tasmota-cmd, letting LLMs send commands like:
    /tasmota-cmd {"command": "Power1 1"}
    
  • Works locally — no API keys or external services required
  • Compatible with Visual Studio Code Copilot Chat or any LLM supporting MCP

⚙️ How It Works

LLM (Copilot/ChatGPT)
        ↓
     MCP Protocol
        ↓
 Node.js MCP Server
        ↓
  ESP32 (Tasmota)

The MCP server receives structured requests, converts them into Tasmota commands (e.g. Power1 ON, Backlog PulseTime1 400; Power1 1), and sends them via HTTP to your ESP32 device.
The responses are returned to the model as plain text for reasoning and follow-up actions.


🚀 Quick Start

1. Clone this repo

git clone https://github.com/<your-username>/esp32-mcp-server.git
cd esp32-mcp-server

2. Install dependencies

npm install

3. Configure your device IP

Edit the constant inside index.js:

const DEVICE_IP = "192.168.1.xxx";

4. Run the server

node index.js

You’ll see output similar to:

MCP HTTP server:  http://localhost:3000/mcp
Health:           http://localhost:3000/health
Debug:            http://localhost:3000/debug?command=Power1%201

💬 MCP Server in VS Code

To connect with GitHub Copilot Chat or compatible tools, add this configuration in your .config/github-copilot/ file:

{
  "servers": {
    "esp32-mcp": {
      "url": "http://localhost:3000/mcp",
      "type": "http"
    }
  }
}

Reload Copilot, and you’ll see your new MCP tool:

/tasmota-cmd {"command": "Power1 1"}

🧩 Dependencies

  • Node.js 18+
  • @modelcontextprotocol/sdk
  • express
  • zod

🧰 Compatible Firmwares

Firmware Compatibility Notes
Tasmota Full command support (HTTP, MQTT, Serial)
ESP-AT ⚙️ Limited GPIO access (requires Driver AT build)
ESPHome ⚠️ Static configuration — not ideal for real-time control

📺 Reference & Resources


🧠 Concept Summary

This project proves that intelligence in IoT doesn’t need more APIs — it needs context.

By combining:

  • Tasmota’s readable command interface,
  • MCP’s standardized AI communication layer, and
  • ESP32’s hardware flexibility,

you get a device that can understand and act on intent, not just follow hardcoded rules.


📜 License

MIT License © 2025 [Your Name or tinkeriot.com]

Recommended Servers

playwright-mcp

playwright-mcp

A Model Context Protocol server that enables LLMs to interact with web pages through structured accessibility snapshots without requiring vision models or screenshots.

Official
Featured
TypeScript
Magic Component Platform (MCP)

Magic Component Platform (MCP)

An AI-powered tool that generates modern UI components from natural language descriptions, integrating with popular IDEs to streamline UI development workflow.

Official
Featured
Local
TypeScript
Audiense Insights MCP Server

Audiense Insights MCP Server

Enables interaction with Audiense Insights accounts via the Model Context Protocol, facilitating the extraction and analysis of marketing insights and audience data including demographics, behavior, and influencer engagement.

Official
Featured
Local
TypeScript
VeyraX MCP

VeyraX MCP

Single MCP tool to connect all your favorite tools: Gmail, Calendar and 40 more.

Official
Featured
Local
graphlit-mcp-server

graphlit-mcp-server

The Model Context Protocol (MCP) Server enables integration between MCP clients and the Graphlit service. Ingest anything from Slack to Gmail to podcast feeds, in addition to web crawling, into a Graphlit project - and then retrieve relevant contents from the MCP client.

Official
Featured
TypeScript
Kagi MCP Server

Kagi MCP Server

An MCP server that integrates Kagi search capabilities with Claude AI, enabling Claude to perform real-time web searches when answering questions that require up-to-date information.

Official
Featured
Python
E2B

E2B

Using MCP to run code via e2b.

Official
Featured
Neon Database

Neon Database

MCP server for interacting with Neon Management API and databases

Official
Featured
Exa Search

Exa Search

A Model Context Protocol (MCP) server lets AI assistants like Claude use the Exa AI Search API for web searches. This setup allows AI models to get real-time web information in a safe and controlled way.

Official
Featured
Qdrant Server

Qdrant Server

This repository is an example of how to create a MCP server for Qdrant, a vector search engine.

Official
Featured