I craft unique cereal names, stories, and ridiculously cute Cereal Baby images.

MCP-Server-for-Sensor-Device
Este proyecto es una aplicación Node.js diseñada para usar con Claude Desktop. Simula un dispositivo de sensor CO2 y proporciona un servidor JSON-RPC para interactuar con el dispositivo. La aplicación puede ejecutarse tanto en modo de simulación como en modo real, donde se conecta a un Pico Raspberry Pi a través de USB para leer los niveles de CO2.
3 years
Works with Finder
1
Github Watches
1
Github Forks
2
Github Stars
MCP Server for sensor device
This project is a Node.js application designed for use with Claude Desktop. It simulates a CO2 sensor device and provides a JSON-RPC server to interact with the device. The application can run in both simulation mode and real mode, where it connects to a Raspberry Pi Pico via USB to read CO2 levels.
Features
- Simulates a CO2 sensor device with random CO2 levels in simulation mode.
- Connects to a Raspberry Pi Pico via USB to read real CO2 levels.
- Provides device information, sensor data, and network status via JSON-RPC.
- Supports commands to publish data to MQTT, reconnect WiFi, and reconnect MQTT (some functionalities are mocked).
Installation
You need to have Node.js installed on your machine to run this application. If you don't have Node.js installed, you can download it from the official website.
-
Clone the repository.
-
Install the dependencies using npm:
npm install
Configuration
Ensure that the claude_desktop_config.json
file is correctly configured to run the server. Example configuration:
{
"mcpServers": {
"CO2 sensor": {
"command": "node",
"args": [
"...mcp-server-for-sensor-device/index.js"
],
"env": {}
}
}
}
Usage
To start the server, run the following command:
node index.js
JSON-RPC Methods
initialize
Initializes the server and returns server capabilities.
shutdown
Shuts down the server.
resources/list
Lists available resources.
resources/read
Reads the specified resource.
tools/list
Lists available tools.
tools/call
Calls the specified tool.
DeviceState Class
The DeviceState
class simulates the device state and provides methods to get device information, sensor data, and network status. It also handles the connection to the Raspberry Pi Pico and reads CO2 levels.
Methods
-
getDeviceInfo()
: Returns device information. -
getSensorData()
: Returns sensor data. -
getNetworkStatus()
: Returns network status (mocked functionality). -
publishToMQTT()
: Simulates publishing data to MQTT (mocked functionality). -
reconnectWiFi()
: Simulates reconnecting to WiFi (mocked functionality). -
reconnectMQTT()
: Simulates reconnecting to MQTT (mocked functionality).
Logging
The application logs CO2 levels and other information to a log file located in the user's home directory (co2_level.log
).
License
This project is licensed under the MIT License.
相关推荐
Evaluator for marketplace product descriptions, checks for relevancy and keyword stuffing.
Confidential guide on numerology and astrology, based of GG33 Public information
A geek-themed horoscope generator blending Bitcoin prices, tech jargon, and astrological whimsy.
Converts Figma frames into front-end code for various mobile frameworks.
Advanced software engineer GPT that excels through nailing the basics.
Therapist adept at identifying core issues and offering practical advice with images.
Descubra la colección más completa y actualizada de servidores MCP en el mercado. Este repositorio sirve como un centro centralizado, que ofrece un extenso catálogo de servidores MCP de código abierto y propietarios, completos con características, enlaces de documentación y colaboradores.
Manipulación basada en Micrypthon I2C del expansor GPIO de la serie MCP, derivada de AdaFruit_MCP230xx
Una puerta de enlace de API unificada para integrar múltiples API de explorador de blockchain similar a Esterscan con soporte de protocolo de contexto modelo (MCP) para asistentes de IA.
Espejo dehttps: //github.com/agentience/practices_mcp_server
Espejo de https: //github.com/bitrefill/bitrefill-mcp-server
Reviews

user_b7dAcR5n
Flightradar24 MCP Server by Cyreslab-AI is an exceptional server that enhances my flight tracking experience tremendously. Its seamless performance and real-time data make it an invaluable tool for aviation enthusiasts like me. The setup was straightforward, and I appreciate the user-friendly interface. This server has become an essential part of my daily usage, and I highly recommend it to anyone interested in aviation.