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
Описание
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.
README
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.
Установка For Sensor Device
У этого сервера нет опубликованного пакета — он собирается из исходников. Открой репозиторий и следуй инструкции в README.
▸ github.com/cyberomusubi/MCP-Server-for-sensor-deviceFAQ
For Sensor Device MCP бесплатный?
Да, For Sensor Device MCP бесплатный — установка в пару кликов через Unyly без оплаты.
Нужен ли API-ключ для For Sensor Device?
Нет, For Sensor Device работает без API-ключей и переменных окружения.
For Sensor Device — hosted или self-hosted?
Self-hosted: сервер запускается локально на твоей машине командой из раздела установки.
Как установить For Sensor Device в Claude Desktop, Claude Code или Cursor?
Открой For Sensor Device на unyly.org, выбери вкладку своего клиента (Claude Desktop, Claude Code, Cursor) и нажми Install — конфиг сгенерируется автоматически, без правки JSON.
Похожие MCP
Fetch
Web content fetching and conversion for efficient LLM usage.
AWS KB Retrieval
Retrieval from AWS Knowledge Base using Bedrock Agent Runtime.
автор: modelcontextprotocolSpring AI MCP Server
Provides auto-configuration for setting up an MCP server in Spring Boot applications.
llm-analysis-assistant
A very streamlined mcp client that supports calling and monitoring stdio/sse/streamableHttp, and can also view request responses through the /logs page. It also
автор: xuzexin-hzCompare For Sensor Device with
Не уверен что выбрать?
Найди свой стек за 60 секунд
Автор?
Embed-бейдж для README
Похожее
Все в категории ai
