stamplc -io
M5 StamPLC MCP Server Integration w/ n8n Agentic AI workflow
claude mcp add --transport stdio rezasaadat1-stamplc-mcp-server-io docker run -i stamplc-mcp-server-io
How to use
This MCP server implements a Model Context Protocol interface for the M5 StamPLC device. It exposes an HTTP endpoint for JSON-RPC style method calls, and an SSE endpoint for real-time updates. Core capabilities include reading digital inputs, controlling relays, logging to the device console, querying system and sensor information, managing the real-time clock, reading temperature and power metrics, and monitoring IO current. The server also reports status via an RGB LED on the device, with red indicating WiFi disconnection, green indicating successful time synchronization, white for normal operation, and blue when a command is received. To interact with the device, connect to the server’s HTTP endpoint to issue JSON-RPC requests (via /mcp) and subscribe to /events for live state changes. Use /capabilities to explore available methods. The included voice assistant and sample scripts provide additional ways to control and monitor the StamPLC through natural language and auxiliary automation tasks.
How to install
Prerequisites:
- PlatformIO installed (or Arduino IDE with ESP32 support)
- M5 StamPLC hardware
- USB or network access for the ESP32 device
Installation steps:
- Clone the repository: git clone https://github.com/rezasaadat1/stamplc-mcp-server-io.git
- Connect your StamPLC device to your development machine
- In the project, locate wifi_config.h and replace credentials as needed (rename the template wifi_config-def.h to wifi_config.h then set: const char* WIFI_SSID = "YourWiFiSSID"; const char* WIFI_PASSWORD = "YourPassword";
- Build and upload the firmware using PlatformIO: cd stamplc-mcp-server-io pio run --target upload
- After successful upload, open the serial console to find the device IP address. The device will connect to WiFi, synchronize time via NTP, and start the MCP server. You can then interact using the device IP on ports 80/443 (as configured by the firmware).
Additional notes
Tips and notes:
- The device will display status via the onboard RGB LED: red for WiFi disconnect, green for successful NTP/time sync, white for normal operation, and blue when a command is received.
- Security: The MCP server in this implementation does not include authentication or encryption by default. For production deployments, consider enabling HTTPS, API authentication, input validation, and rate limiting.
- SSE endpoint at /events provides real-time state updates; use it to keep client UIs in sync with inputs, relays, and sensor data.
- Use /capabilities to see supported methods and their parameters, and /mcp for RPC calls. Sample JSON-RPC requests are included in the README under Example API Calls.
- The Voice Assistant features rely on additional Python dependencies; ensure Python and required libraries are installed if you intend to use voice control.
- If you encounter WiFi or time-sync issues, verify credentials, router compatibility, and that NTP access is not blocked in your network.
Related MCP Servers
MaxKB
🔥 MaxKB is an open-source platform for building enterprise-grade agents. 强大易用的开源企业级智能体平台。
CoexistAI
CoexistAI is a modular, developer-friendly research assistant framework . It enables you to build, search, summarize, and automate research workflows using LLMs, web search, Reddit, YouTube, and mapping tools—all with simple MCP tool calls or API calls or Python functions.
mesh
One secure endpoint for every MCP server. Deploy anywhere.
N8N2MCP
Convert N8N agent / workflow into MCP servers, you can use it in Claude / Cursor / Super Chain
rtfmbro
rtfmbro provides always-up-to-date, version-specific package documentation as context for coding agents. An alternative to context7
mcp-playground
A Streamlit-based chat app for LLMs with plug-and-play tool support via Model Context Protocol (MCP), powered by LangChain, LangGraph, and Docker.