NodeMCU MCP Service
The NodeMCU MCP Service is a management solution for ESP8266/NodeMCU IoT devices that integrates with AI tools like Claude Desktop via the Model Context Protocol (MCP).
With this server, you can:
Monitor Devices: List registered devices and track their status
Get Device Details: Retrieve detailed device information
Collect Telemetry: Receive real-time telemetry data from devices
Send Commands: Remotely control devices (restart, update, status)
Update Configurations: Modify device settings remotely
Access Multiple Interfaces: Use RESTful API or WebSocket for real-time updates
Secure Access: Authenticate using JWT tokens
AI Integration: Seamlessly work with AI assistants like Claude Desktop
Click on "Install Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@NodeMCU MCP Servicelist all my NodeMCU devices and their current status"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
NodeMCU MCP (Model Context Protocol) Service
A Model Context Protocol (MCP) service for managing NodeMCU devices. This service provides both a standard RESTful API/WebSocket interface and implements the Model Context Protocol for integration with AI tools like Claude Desktop.
Overview
NodeMCU MCP provides a management solution for ESP8266/NodeMCU IoT devices with these key capabilities:
Monitor device status and telemetry
Send commands to devices remotely
Update device configurations
Integration with AI assistants through MCP protocol
Related MCP server: MCP Personal Assistant Agent
Visualizations
Features
🔌 Device Management: Register, monitor, and control NodeMCU devices
📊 Real-time Communication: WebSocket interface for real-time updates
⚙️ Configuration Management: Update device settings remotely
🔄 Command Execution: Send restart, update, status commands remotely
📡 Telemetry Collection: Gather sensor data and device metrics
🔐 Authentication: Secure API access with JWT authentication
🧠 AI Integration: Work with Claude Desktop and other MCP-compatible AI tools
Quick Start
Prerequisites
Node.js 16.x or higher
npm or yarn
For the NodeMCU client: Arduino IDE with ESP8266 support
Installation
Installing via Smithery
To install NodeMCU Manager for Claude Desktop automatically via Smithery:
npx -y @smithery/cli install @amanasmuei/nodemcu-mcp --client claudeFrom npm (once published)
# Global installation (recommended for MCP integration)
npm install -g nodemcu-mcp
# Local installation
npm install nodemcu-mcpFrom source
# Clone the repository
git clone https://github.com/amanasmuei/nodemcu-mcp.git
cd nodemcu-mcp
# Install dependencies
npm install
# Optional: Install globally for MCP integration
npm install -g .Configuration
Create a
.envfile based on the example:cp .env.example .envUpdate the
.envfile with your settings:# Server Configuration PORT=3000 HOST=localhost # Security JWT_SECRET=your_strong_random_secret_key # Log Level (error, warn, info, debug) LOG_LEVEL=info
Usage
Running as API Server
Development mode with auto-restart:
npm run devProduction mode:
npm startRunning as MCP Server
For integration with Claude Desktop or other MCP clients:
npm run mcpIf installed globally:
nodemcu-mcp --mode=mcpCommand Line Options
Usage: nodemcu-mcp [options]
Options:
-m, --mode Run mode (mcp, api, both) [string] [default: "both"]
-p, --port Port for API server [number] [default: 3000]
-h, --help Show help [boolean]
--version Show version number [boolean]MCP Integration
This project now uses the official Model Context Protocol (MCP) TypeScript SDK to provide integration with Claude for Desktop and other MCP clients.
MCP Tools
The following tools are available through the MCP interface:
list-devices: List all registered NodeMCU devices and their status
get-device: Get detailed information about a specific NodeMCU device
send-command: Send a command to a NodeMCU device
update-config: Update the configuration of a NodeMCU device
Using with Claude for Desktop
To use this server with Claude for Desktop:
Install Claude for Desktop from https://claude.ai/desktop
Configure Claude for Desktop by editing
~/Library/Application Support/Claude/claude_desktop_config.json:
{
"mcpServers": {
"nodemcu": {
"command": "node",
"args": [
"/ABSOLUTE/PATH/TO/YOUR/PROJECT/mcp_server_sdk.js"
]
}
}
}Restart Claude for Desktop
You should now see the NodeMCU tools in the Claude for Desktop interface
Running the MCP Server Standalone
To run the MCP server directly:
npm run mcpOr using the CLI:
./bin/cli.js --mode=mcpAPI Documentation
Authentication
POST /api/auth/login - Login and get JWT token
{ "username": "admin", "password": "admin123" }Response:
{ "message": "Login successful", "token": "your.jwt.token", "user": { "id": 1, "username": "admin", "role": "admin" } }POST /api/auth/validate - Validate JWT token
{ "token": "your.jwt.token" }
Devices API
All device endpoints require authentication with a JWT token:
Authorization: Bearer your.jwt.tokenList Devices
GET /api/devicesResponse:
{
"count": 1,
"devices": [
{
"id": "nodemcu-001",
"name": "Living Room Sensor",
"type": "ESP8266",
"status": "online",
"ip": "192.168.1.100",
"firmware": "1.0.0",
"lastSeen": "2023-05-15T14:30:45.123Z"
}
]
}Get Device Details
GET /api/devices/:idResponse:
{
"id": "nodemcu-001",
"name": "Living Room Sensor",
"type": "ESP8266",
"status": "online",
"ip": "192.168.1.100",
"firmware": "1.0.0",
"lastSeen": "2023-05-15T14:30:45.123Z",
"config": {
"reportInterval": 30,
"debugMode": false,
"ledEnabled": true
},
"lastTelemetry": {
"temperature": 23.5,
"humidity": 48.2,
"uptime": 3600,
"heap": 35280,
"rssi": -68
}
}Send Command to Device
POST /api/devices/:id/commandRequest:
{
"command": "restart",
"params": {}
}Response:
{
"message": "Command sent to device",
"command": "restart",
"params": {},
"response": {
"success": true,
"message": "Device restarting"
}
}WebSocket Protocol
The WebSocket server is available at the root path: ws://your-server:3000/
For details on the WebSocket protocol messages, refer to the code or the examples directory.
NodeMCU Client Setup
Refer to the Arduino sketch in the examples directory for a complete client implementation.
Key Steps
Install required libraries in Arduino IDE:
ESP8266WiFi
WebSocketsClient
ArduinoJson
Configure the sketch with your WiFi and server settings:
// WiFi credentials const char* ssid = "YOUR_WIFI_SSID"; const char* password = "YOUR_WIFI_PASSWORD"; // MCP Server settings const char* mcpHost = "your-server-ip"; const int mcpPort = 3000;Upload the sketch to your NodeMCU device
Development
Project Structure
nodemcu-mcp/
├── assets/ # Logo and other static assets
├── bin/ # CLI scripts
├── examples/ # Example client code
├── middleware/ # Express middleware
├── routes/ # API routes
├── services/ # Business logic
├── .env.example # Environment variables example
├── index.js # API server entry point
├── mcp_server.js # MCP protocol implementation
├── mcp-manifest.json # MCP manifest
└── package.json # Project configurationContributing
Contributions are welcome! Please feel free to submit a Pull Request.
Fork the repository
Create your feature branch (
git checkout -b feature/amazing-feature)Commit your changes (
git commit -m 'Add some amazing feature')Push to the branch (
git push origin feature/amazing-feature)Open a Pull Request
License
This project is licensed under the MIT License - see the LICENSE file for details.
MIT License is a permissive license that allows you to:
Use the software commercially
Modify the software
Distribute the software
Use and modify the software privately
The only requirement is that the license and copyright notice must be included with the software.
Acknowledgments
Model Context Protocol for the integration specification
NodeMCU for the amazing IoT platform
Anthropic for Claude Desktop
Available Tools
4 toolsget-deviceD
| Name | Required | Description | Default |
|---|---|---|---|
| deviceId | Yes | The ID of the device to get information about |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
Tool has no description.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
Tool has no description.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
Tool has no description.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Tool has no description.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
Tool has no description.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
Tool has no description.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
list-devicesD
| Name | Required | Description | Default |
|---|---|---|---|
No parameters | |||
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
Tool has no description.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
Tool has no description.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
Tool has no description.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Tool has no description.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
Tool has no description.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
Tool has no description.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
send-commandD
| Name | Required | Description | Default |
|---|---|---|---|
| command | Yes | The command to send (restart, update, status, etc.) | |
| deviceId | Yes | The ID of the device to send the command to | |
| params | No | Optional parameters for the command |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
Tool has no description.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
Tool has no description.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
Tool has no description.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Tool has no description.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
Tool has no description.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
Tool has no description.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
update-configD
| Name | Required | Description | Default |
|---|---|---|---|
| config | Yes | Configuration parameters to update | |
| deviceId | Yes | The ID of the device to update configuration for |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
Tool has no description.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
Tool has no description.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
Tool has no description.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Tool has no description.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
Tool has no description.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
Tool has no description.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
TDQS
Each tool has a clearly distinct purpose: get-device retrieves a single device, list-devices lists multiple devices, send-command sends commands to devices, and update-config updates device configurations. There is no overlap or ambiguity between these functions.
All tool names follow a consistent verb-noun pattern with hyphen separation (e.g., get-device, list-devices, send-command, update-config). The naming is uniform and predictable across all tools.
With 4 tools, this server is well-scoped for managing NodeMCU devices. Each tool serves a distinct and essential function, and the count is appropriate for the apparent scope of device management.
The tools cover core CRUD-like operations for device management: listing, retrieving, commanding, and configuring. A minor gap might be the absence of a delete-device or create-device tool, but the existing set supports most common workflows.
Maintenance
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
Related MCP Connectors
A comprehensive Model Context Protocol (MCP) server that enables AI assistants to interact with yo…
A Model Context Protocol server for Wix AI tools
Self-hosted MCP gateway: turn any API, database or MCP server into AI connectors — no code.
Model Context Protocol server for Studex tools, notifications, and profile integrations
Related MCP Servers
- AlicenseBqualityFmaintenanceA server that enables interaction with Home Assistant devices and automations through the Model Context Protocol, allowing users to monitor device states, control devices, trigger automations, and list entities.448MIT
- FlicenseNot gradedqualityDmaintenanceA versatile Model Context Protocol server that enables AI assistants to manage calendars, track tasks, handle emails, search the web, and control smart home devices.23
- FlicenseNot gradedqualityDmaintenanceProvides two Model Context Protocol servers that enable controlling IoT devices and managing persistent memory storage with semantic search capabilities.2
- FlicenseBqualityDmaintenanceA Model Context Protocol server that bridges Google Sheets, Azure AI, and MQTT APIs to facilitate spreadsheet code generation, AI chat integration, and comprehensive IoT device management. It allows users to perform CRUD operations on spreadsheets, integrate Azure AI models, and handle real-time MQTT messaging for IoT applications.11
Latest Blog Posts
- Who's Calling? MCP Hosts Are an Identity Blind Spot (And the Spec Knows It)By Om-Shree-0709 on .mcpAgent IdentityOAuth 2.1
- Your AI Chatbot Just Exposed Your CEO's Salary to an InternBy Om-Shree-0709 on .Agent IdentityMCP SecurityOAuth Delegation
- Why MCP Servers Need Execution Sandboxing (And Why Your Current Stack Isn't Enough)By Om-Shree-0709 on .Agentic AiPrompt InjectionWebAssembly
MCP directory API
We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/amanasmuei/mcp-server-nodemcu'
If you have feedback or need assistance with the MCP directory API, please join our Discord server