CO2 Sensor
Summary
This MCP Server simulates a CO2 sensor device, providing a JSON-RPC interface to interact with either a simulated sensor or a real Raspberry Pi Pico connected via USB. Built with Node.js and the SerialPort library, it offers resources for device information, sensor data, and network status, along with tools to publish data to MQTT, reconnect WiFi, and manage MQTT connections. The implementation includes both simulation mode with randomized CO2 levels and real mode that reads actual sensor data, making it ideal for testing IoT applications or integrating CO2 monitoring into AI assistant workflows.
Available Actions(12)
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.
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).
社区评论
暂无评论. 成为第一个评论的人!
登录以参与讨论