Other MCP Server · MODEL CONTEXT PROTOCOL
kmwebnet 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.
WHAT IT CONNECTS
What kmwebnet MCP Server for sensor device gives an AI Agent
- 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).
- Clone the repository.
- Install the dependencies using npm:
- `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).
SECURITY
An MCP listing is not a security review
An MCP server may receive model context, credentials, local files, or permission to call external systems. Review its code, requested environment variables, network behavior, package provenance, and maintenance status before connecting it to an agent.
README
Repository documentation
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.
- 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).
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
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": {}
}
}
}To start the server, run the following command:
node index.jsInitializes the server and returns server capabilities.
Shuts down the server.
Lists available resources.
Reads the specified resource.
Lists available tools.
Calls the specified tool.
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.
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).
The application logs CO2 levels and other information to a log file located in the user's home directory (co2_level.log).
This project is licensed under the MIT License.
COMMUNITY