CO2 Sensor MCP Server
传感器设备的 MCP 服务器
该项目是一个 Node.js 应用程序,专为 Claude Desktop 设计。它模拟了一个二氧化碳传感器设备,并提供一个 JSON-RPC 服务器与该设备交互。该应用程序可以在模拟模式和真实模式下运行,在真实模式下,它通过 USB 连接到 Raspberry Pi Pico 来读取二氧化碳浓度。
特征
在模拟模式下模拟具有随机二氧化碳水平的二氧化碳传感器设备。
通过 USB 连接到 Raspberry Pi Pico 以读取真实的二氧化碳水平。
通过 JSON-RPC 提供设备信息、传感器数据和网络状态。
支持发布数据到MQTT、重新连接WiFi、重新连接MQTT的命令(部分功能模拟)。
Related MCP server: CoinGecko
安装
您需要在计算机上安装 Node.js 才能运行此应用程序。如果您尚未安装 Node.js,可以从官方网站下载。
克隆存储库。
使用 npm 安装依赖项:
npm install
配置
确保正确配置claude_desktop_config.json文件以运行服务器。示例配置:
{
"mcpServers": {
"CO2 sensor": {
"command": "node",
"args": [
"...mcp-server-for-sensor-device/index.js"
],
"env": {}
}
}
}用法
要启动服务器,请运行以下命令:
node index.jsJSON-RPC 方法
initialize
初始化服务器并返回服务器功能。
shutdown
关闭服务器。
resources/list
列出可用资源。
resources/read
读取指定的资源。
tools/list
列出可用的工具。
tools/call
调用指定的工具。
DeviceState 类
DeviceState类模拟设备状态,并提供获取设备信息、传感器数据和网络状态的方法。它还负责处理与 Raspberry Pi Pico 的连接并读取二氧化碳浓度。
方法
getDeviceInfo():返回设备信息。getSensorData():返回传感器数据。getNetworkStatus():返回网络状态(模拟功能)。publishToMQTT():模拟将数据发布到 MQTT(模拟功能)。reconnectWiFi():模拟重新连接到 WiFi(模拟功能)。reconnectMQTT():模拟重新连接到 MQTT(模拟功能)。
日志记录
该应用程序将二氧化碳水平和其他信息记录到位于用户主目录 ( co2_level.log ) 中的日志文件中。
执照
该项目已获得 MIT 许可。
This server cannot be installed
Maintenance
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
Related MCP Servers
- AlicenseNot gradedqualityDmaintenanceA beginner-friendly MCP-inspired JSON-RPC server built with Node.js, offering basic client-server interaction through an 'initialize' capabilities handshake and an 'echo' function.3MIT
- AlicenseNot gradedqualityDmaintenanceA powerful and flexible Node.js Express server that provides a comprehensive interface to the CoinGecko cryptocurrency data API. This server supports both the free public API and the Pro API with automatic fallback.6MIT
- AlicenseNot gradedqualityDmaintenanceA Node.js Express server that provides access to CoinGecko's cryptocurrency data through a comprehensive API interface, supporting both free and Pro APIs with automatic fallback functionality.1MIT
- FlicenseNot gradedqualityDmaintenanceA FastAPI-based JSON-RPC 2.0 server implementation that enables users to work with HDF5 files, submit Slurm jobs, retrieve CPU information, and visualize CSV data through standardized API endpoints.
Related MCP Connectors
Hive MCP server implementing the EIP-712 over USB/DMK ledger-bridge integration spec…
MCP server for understanding Javascript internals from ECMAScript specification.
A TypeScript MCP server for Home Assistant, enabling programmatic management of entities, automati…
Latest Blog Posts
- Who's Calling? MCP Hosts Are an Identity Blind Spot (And the Spec Knows It)By Om-Shree-0709 on .mcpAgent IdentityOAuth 2.1
- Your AI Chatbot Just Exposed Your CEO's Salary to an InternBy Om-Shree-0709 on .Agent IdentityMCP SecurityOAuth Delegation
- Why MCP Servers Need Execution Sandboxing (And Why Your Current Stack Isn't Enough)By Om-Shree-0709 on .Agentic AiPrompt InjectionWebAssembly
MCP directory API
We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/cyberomusubi/MCP-Server-for-sensor-device'
If you have feedback or need assistance with the MCP directory API, please join our Discord server