CO2 Sensor MCP Server
センサーデバイス用MCPサーバー
このプロジェクトは、Claude Desktop で使用するために設計された Node.js アプリケーションです。CO2 センサーデバイスをシミュレートし、デバイスとやり取りするための JSON-RPC サーバーを提供します。このアプリケーションは、シミュレーションモードとリアルモードの両方で実行でき、リアルモードでは USB 経由で Raspberry Pi Pico に接続して CO2 レベルを読み取ります。
特徴
シミュレーション モードでランダムな CO2 レベルを持つ CO2 センサー デバイスをシミュレートします。
USB 経由で Raspberry Pi Pico に接続し、実際の CO2 レベルを読み取ります。
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への接続を処理し、CO2レベルを読み取ります。
方法
getDeviceInfo(): デバイス情報を返します。getSensorData(): センサー データを返します。getNetworkStatus(): ネットワークステータスを返します (モック機能)。publishToMQTT(): MQTT へのデータの公開をシミュレートします (モック機能)。reconnectWiFi(): WiFi への再接続をシミュレートします (モック機能)。reconnectMQTT(): MQTT への再接続をシミュレートします (モック機能)。
ログ記録
アプリケーションは、CO2 レベルやその他の情報をユーザーのホーム ディレクトリにあるログ ファイル ( 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