Skip to main content
Glama

NodeMCU MCP(모델 컨텍스트 프로토콜) 서비스

GitHub 라이센스 npm 버전 대장간 배지

NodeMCU 장치를 관리하기 위한 모델 컨텍스트 프로토콜(MCP) 서비스입니다. 이 서비스는 표준 RESTful API/WebSocket 인터페이스를 제공하고 Claude Desktop과 같은 AI 도구와의 통합을 위해 모델 컨텍스트 프로토콜을 구현합니다.

개요

NodeMCU MCP는 다음과 같은 주요 기능을 갖춘 ESP8266/NodeMCU IoT 장치를 위한 관리 솔루션을 제공합니다.

  • 장치 상태 및 원격 측정 모니터링

  • 원격으로 장치에 명령 보내기

  • 장치 구성 업데이트

  • MCP 프로토콜을 통한 AI 어시스턴트와의 통합

시각화

특징

  • 🔌 장치 관리 : 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를 자동으로 설치하려면:

지엑스피1

npm에서 (게시 후)

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

구성

  1. 다음 예를 기반으로 .env 파일을 만듭니다.

    cp .env.example .env
  2. .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 start

MCP 서버로 실행

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 통합

이 프로젝트는 이제 Claude for Desktop 및 기타 MCP 클라이언트와의 통합을 제공하기 위해 공식 Model Context Protocol(MCP) TypeScript SDK를 사용합니다.

MCP 도구

다음 도구는 MCP 인터페이스를 통해 사용할 수 있습니다.

  • list-devices : 등록된 모든 NodeMCU 장치와 해당 상태를 나열합니다.

  • get-device : 특정 NodeMCU 장치에 대한 자세한 정보를 가져옵니다.

  • send-command : NodeMCU 장치에 명령을 보냅니다.

  • update-config : NodeMCU 장치의 구성을 업데이트합니다.

Claude와 함께 데스크톱 사용

Claude for Desktop과 함께 이 서버를 사용하려면:

  1. https://claude.ai/desktop 에서 Claude for Desktop을 설치하세요.

  2. ~/Library/Application Support/Claude/claude_desktop_config.json 편집하여 데스크톱용 Claude를 구성합니다.

{ "mcpServers": { "nodemcu": { "command": "node", "args": [ "/ABSOLUTE/PATH/TO/YOUR/PROJECT/mcp_server_sdk.js" ] } } }
  1. 데스크톱용 Claude를 다시 시작하세요

  2. 이제 Claude for Desktop 인터페이스에서 NodeMCU 도구를 볼 수 있습니다.

MCP 서버 독립 실행형 실행

MCP 서버를 직접 실행하려면:

npm run mcp

또는 CLI를 사용합니다.

./bin/cli.js --mode=mcp

API 문서

입증

  • 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 서버는 루트 경로 ws://your-server:3000/ 에서 사용할 수 있습니다.

WebSocket 프로토콜 메시지에 대한 자세한 내용은 코드나 예제 디렉토리를 참조하세요.

NodeMCU 클라이언트 설정

완전한 클라이언트 구현을 보려면 examples 디렉토리의 Arduino 스케치를 참조하세요.

주요 단계

  1. Arduino IDE에 필요한 라이브러리를 설치하세요:

    • ESP8266WiFi

    • 웹소켓클라이언트

    • 아두이노Json

  2. 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;
  3. 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

기여하다

기여를 환영합니다! 풀 리퀘스트를 제출해 주세요.

  1. 저장소를 포크하세요

  2. 기능 브랜치를 생성합니다( git checkout -b feature/amazing-feature )

  3. 변경 사항을 커밋하세요( git commit -m 'Add some amazing feature' )

  4. 브랜치에 푸시( git push origin feature/amazing-feature )

  5. 풀 리퀘스트 열기

특허

이 프로젝트는 MIT 라이선스에 따라 라이선스가 부여되었습니다. 자세한 내용은 라이선스 파일을 참조하세요.

MIT 라이선스는 다음 작업을 허용하는 허용적 라이선스입니다.

  • 소프트웨어를 상업적으로 사용하세요

  • 소프트웨어 수정

  • 소프트웨어 배포

  • 소프트웨어를 개인적으로 사용하고 수정합니다.

유일한 요구 사항은 소프트웨어에 라이센스와 저작권 고지가 포함되어야 한다는 것입니다.

감사의 말

Deploy Server
A
security – no known vulnerabilities
-
license - not tested
A
quality - confirmed to work

Related MCP Servers

  • A
    security
    A
    license
    A
    quality
    A 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.
    Last updated -
    45
    MIT License
    • Apple
  • -
    security
    F
    license
    -
    quality
    A versatile Model Context Protocol server that enables AI assistants to manage calendars, track tasks, handle emails, search the web, and control smart home devices.
    Last updated -
    22
    • Apple
    • Linux
  • A
    security
    A
    license
    A
    quality
    A Model Context Protocol service that enables remote management and control of NodeMCU/ESP8266 IoT devices with AI assistant integration through Claude Desktop.
    Last updated -
    4
    1
    MIT License
  • -
    security
    F
    license
    -
    quality
    Provides two Model Context Protocol servers that enable controlling IoT devices and managing persistent memory storage with semantic search capabilities.
    Last updated -
    2

View all related MCP servers

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/nodemcu-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server