MCP-Server-for-sensor-device

MCP-Server-for-sensor-device

2

The project is a Node.js application simulating a CO2 sensor device for Claude Desktop. It provides a JSON-RPC server for interaction, supporting both simulation and real mode with the ability to read CO2 levels from a Raspberry Pi Pico.

MCP Server for sensor device

This Node.js project is designed for use with Claude Desktop to simulate a CO2 sensor device. It provides a JSON-RPC server for interaction and can run in both simulation and real modes, connecting to a Raspberry Pi Pico to read CO2 levels.

Features

  • Simulates CO2 levels in simulation mode.
  • Connects to Raspberry Pi Pico via USB for real CO2 readings.
  • Provides device info, sensor data, and network status via JSON-RPC.
  • Supports MQTT data publishing, WiFi, and MQTT reconnections.

Installation

Requires Node.js. Clone the repository and install dependencies with npm.

Usage

Start the server using a Node.js command.

JSON-RPC Methods

  • initialize: Initializes the server
  • shutdown: Shuts down the server
  • resources/list: Lists resources
  • resources/read: Reads resources
  • tools/list: Lists tools
  • tools/call: Calls tools