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.
Overview
MCP Server for Sensor Device is a Node.js application that simulates a CO2 sensor device and provides a JSON-RPC server for interaction. It can operate in both simulation mode and real mode, connecting to a Raspberry Pi Pico to read actual CO2 levels.
To use the MCP Server, clone the repository, install the dependencies using npm, configure the claude_desktop_config.json file, and start the server with the command node index.js.
- 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 and manage WiFi connections.
- Monitoring indoor air quality by reading CO2 levels.
- Simulating sensor data for testing applications.
- Integrating with IoT systems for environmental monitoring.
Add to your AI client
Use these steps to connect MCP Server for sensor device in Cursor, Claude, VS Code, and other MCP-compatible apps. The same JSON appears in the Use with menu above for one-click copy.
Cursor
Add this to your .cursor/mcp.json file in your project root, then restart Cursor.
.cursor/mcp.json
{
"mcpServers": {
"mcp-server-for-sensor-device-kmwebnet": {
"command": "npx",
"args": [
"-y",
"@modelcontextprotocol/server-mcp-server-for-sensor-device-kmwebnet"
]
}
}
}Claude Desktop
Add this server entry to the mcpServers object in your Claude Desktop config, then restart the app.
~/Library/Application Support/Claude/claude_desktop_config.json (macOS) or %APPDATA%\Claude\claude_desktop_config.json (Windows)
{
"mcpServers": {
"mcp-server-for-sensor-device-kmwebnet": {
"command": "npx",
"args": [
"-y",
"@modelcontextprotocol/server-mcp-server-for-sensor-device-kmwebnet"
]
}
}
}Claude Code
Add this to your project's .mcp.json file. Claude Code will detect it automatically.
.mcp.json (project root)
{
"mcpServers": {
"mcp-server-for-sensor-device-kmwebnet": {
"command": "npx",
"args": [
"-y",
"@modelcontextprotocol/server-mcp-server-for-sensor-device-kmwebnet"
]
}
}
}VS Code (Copilot)
Add this to your .vscode/mcp.json file. Requires the GitHub Copilot extension with MCP support enabled.
.vscode/mcp.json
{
"servers": {
"mcp-server-for-sensor-device-kmwebnet": {
"type": "stdio",
"command": "npx",
"args": [
"-y",
"@modelcontextprotocol/server-mcp-server-for-sensor-device-kmwebnet"
]
}
}
}Windsurf
Add this to your Windsurf MCP config file, then restart Windsurf.
~/.codeium/windsurf/mcp_config.json
{
"mcpServers": {
"mcp-server-for-sensor-device-kmwebnet": {
"command": "npx",
"args": [
"-y",
"@modelcontextprotocol/server-mcp-server-for-sensor-device-kmwebnet"
]
}
}
}Cline
Open Cline settings, navigate to MCP Servers, and add this server configuration.
Cline MCP Settings (via UI)
{
"mcpServers": {
"mcp-server-for-sensor-device-kmwebnet": {
"command": "npx",
"args": [
"-y",
"@modelcontextprotocol/server-mcp-server-for-sensor-device-kmwebnet"
]
}
}
}FAQ
Can this server simulate multiple sensors?
Yes, it can simulate multiple CO2 sensors in simulation mode.
Is it necessary to have a Raspberry Pi Pico for real mode?
Yes, a Raspberry Pi Pico is required to read real CO2 levels in real mode.
How do I log CO2 levels?
The application logs CO2 levels to a file located in the user's home directory.