NodeMCU MCP Service
NodeMCU MCP(モデルコンテキストプロトコル)サービス
NodeMCUデバイスを管理するためのモデルコンテキストプロトコル(MCP)サービス。このサービスは、標準のRESTful API/WebSocketインターフェースを提供し、Claude DesktopなどのAIツールとの統合のためのモデルコンテキストプロトコルを実装しています。
概要
NodeMCU MCP は、次の主要機能を備えた ESP8266/NodeMCU IoT デバイス向けの管理ソリューションを提供します。
デバイスの状態とテレメトリを監視する
デバイスにリモートでコマンドを送信する
デバイス構成を更新する
MCPプロトコルによるAIアシスタントとの統合
Related MCP server: MCP Personal Assistant Agent
視覚化
特徴
🔌デバイス管理:NodeMCUデバイスの登録、監視、制御
📊リアルタイム通信:リアルタイム更新のためのWebSocketインターフェース
⚙️構成管理: デバイス設定をリモートで更新
🔄コマンド実行: 再起動、更新、ステータスコマンドをリモートで送信
📡テレメトリ収集:センサーデータとデバイスメトリクスを収集する
🔐認証: JWT認証による安全なAPIアクセス
🧠 AI統合:Claude Desktopやその他のMCP互換AIツールと連携
クイックスタート
前提条件
Node.js 16.x 以上
npmまたはyarn
NodeMCUクライアントの場合: ESP8266をサポートするArduino IDE
インストール
Smithery経由でインストール
Smithery経由で Claude Desktop 用の NodeMCU Manager を自動的にインストールするには:
npx -y @smithery/cli install @amanasmuei/nodemcu-mcp --client claudenpmから(公開後)
# Global installation (recommended for MCP integration)
npm install -g nodemcu-mcp
# Local installation
npm install nodemcu-mcp出典
# 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 .構成
例に基づいて
.envファイルを作成します。cp .env.example .env設定に合わせて
.envファイルを更新します。# Server Configuration PORT=3000 HOST=localhost # Security JWT_SECRET=your_strong_random_secret_key # Log Level (error, warn, info, debug) LOG_LEVEL=info
使用法
APIサーバーとして実行
自動再起動付き開発モード:
npm run dev生産モード:
npm startMCPサーバーとして実行中
Claude Desktop またはその他の MCP クライアントとの統合の場合:
npm run mcpグローバルにインストールされている場合:
nodemcu-mcp --mode=mcpコマンドラインオプション
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統合
このプロジェクトでは、公式の Model Context Protocol (MCP) TypeScript SDK を使用して、Claude for Desktop およびその他の MCP クライアントとの統合を提供します。
MCPツール
MCP インターフェイスを通じて次のツールを利用できます。
list-devices : 登録されているすべてのNodeMCUデバイスとそのステータスを一覧表示します。
get-device : 特定のNodeMCUデバイスに関する詳細情報を取得する
send-command : NodeMCUデバイスにコマンドを送信する
update-config : NodeMCUデバイスの設定を更新する
Claude for Desktop と併用
このサーバーをClaude for Desktopで使用するには:
https://claude.ai/desktopから Claude for Desktop をインストールします。
~/Library/Application Support/Claude/claude_desktop_config.jsonを編集して、Claude for Desktop を構成します。
{
"mcpServers": {
"nodemcu": {
"command": "node",
"args": [
"/ABSOLUTE/PATH/TO/YOUR/PROJECT/mcp_server_sdk.js"
]
}
}
}デスクトップ版のClaudeを再起動
Claude for DesktopインターフェースにNodeMCUツールが表示されるはずです。
MCP サーバーをスタンドアロンで実行する
MCP サーバーを直接実行するには:
npm run mcpまたは CLI を使用します:
./bin/cli.js --mode=mcpAPIドキュメント
認証
POST /api/auth/login - ログインしてJWTトークンを取得する
{ "username": "admin", "password": "admin123" }応答:
{ "message": "Login successful", "token": "your.jwt.token", "user": { "id": 1, "username": "admin", "role": "admin" } }POST /api/auth/validate - JWTトークンを検証する
{ "token": "your.jwt.token" }
デバイスAPI
すべてのデバイス エンドポイントには JWT トークンによる認証が必要です。
Authorization: Bearer your.jwt.tokenデバイスの一覧
GET /api/devices応答:
{
"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 /api/devices/:id応答:
{
"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
}
}デバイスにコマンドを送信する
POST /api/devices/:id/commandリクエスト:
{
"command": "restart",
"params": {}
}応答:
{
"message": "Command sent to device",
"command": "restart",
"params": {},
"response": {
"success": true,
"message": "Device restarting"
}
}WebSocketプロトコル
WebSocket サーバーはルート パスで利用できます: ws://your-server:3000/
WebSocket プロトコル メッセージの詳細については、コードまたは例のディレクトリを参照してください。
NodeMCUクライアントのセットアップ
完全なクライアント実装については、 examplesディレクトリの Arduino スケッチを参照してください。
重要なステップ
Arduino IDE に必要なライブラリをインストールします。
ESP8266WiFi
WebSocketクライアント
ArduinoJson
WiFi とサーバーの設定でスケッチを構成します。
// 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;スケッチをNodeMCUデバイスにアップロードします
発達
プロジェクト構造
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 configuration貢献
貢献を歓迎します!お気軽にプルリクエストを送信してください。
リポジトリをフォークする
機能ブランチを作成します(
git checkout -b feature/amazing-feature)変更をコミットします (
git commit -m 'Add some amazing feature')ブランチにプッシュする (
git push origin feature/amazing-feature)プルリクエストを開く
ライセンス
このプロジェクトは MIT ライセンスに基づいてライセンスされています - 詳細についてはLICENSEファイルを参照してください。
MIT ライセンスは、次のことを許可する許容ライセンスです。
ソフトウェアを商用利用する
ソフトウェアを変更する
ソフトウェアを配布する
ソフトウェアを個人的に使用および変更する
唯一の要件は、ライセンスと著作権表示がソフトウェアに含まれている必要があることです。
謝辞
統合仕様のためのモデルコンテキストプロトコル
驚異的なIoTプラットフォームのためのNodeMCU
クロード・デスクトップのAnthropic
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
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
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.
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