Master Control Program (MCP) Backend

by sayonsom

Integrations

  • Serves as the backend framework providing API endpoints for the hotel management system

  • Handles data processing and analysis for the hotel statistics dashboard

  • Provides data validation and settings management for the API

Samsung SmartThings ホテル統合デモ

これは、Samsung SmartThings とホテル予約システムの統合のデモンストレーションであり、ユーザーの好みに基づいてパーソナライズされた温度設定を可能にします。

概要

デモは次の内容で構成されています:

  1. ホテルのスタッフと経営陣が次のことを行えるStreamlit フロントエンド:
    • ユーザーとその温度設定を管理する
    • ホテルの客室を管理する
    • 予約の作成と管理
    • 部屋を割り当ててゲストをチェックアウトする
    • ホテルの統計情報とSmartThingsの統合ステータスのダッシュボードを表示する
    • AIチャットボットインターフェースを使用してシステムと対話する
  2. MCP (マスター コントロール プログラム) バックエンド:
    • フロントエンド用のAPIエンドポイントを提供する
    • デバイス制御用のSmartThings APIと統合
    • ユーザーの設定、部屋の割り当て、予約を管理します

プロジェクト構造

├── app.py # Main Streamlit application ├── mcp/ # MCP backend │ ├── server.py # FastAPI server │ ├── smartthings.py # SmartThings API integration ├── utils/ # Utility modules │ ├── database.py # Local database operations ├── data/ # Data storage (created at runtime) │ ├── users.json │ ├── rooms.json │ ├── bookings.json ├── README.md # This file

セットアップとインストール

前提条件

  • Python 3.8以上
  • pip パッケージマネージャー

インストール手順

  1. このリポジトリをクローンします:
    git clone <repository-url> cd mcpSmartThings
  2. 必要な依存関係をインストールします。
    pip install streamlit fastapi uvicorn pydantic pandas torch transformers

デモの実行

MCPバックエンドサーバーを起動する

  1. MCP バックエンド サーバーを起動します。
    cd mcpSmartThings python -m mcp.server
    MCPサーバーはhttp://localhost:8000で起動します。
  2. 新しいターミナルで、Streamlit フロントエンドを起動します。
    cd mcpSmartThings streamlit run app.py
    Streamlitアプリはブラウザでhttp://localhost:8501で開きます。

デモの使用

  1. サンプルデータを読み込む:
    • サイドバーに移動して「サンプル データを読み込む」をクリックし、サンプル ユーザー、部屋、予約をシステムに入力します。
  2. ユーザータブ:
    • 温度設定で新しいユーザーを作成する
    • 既存のユーザーの温度設定を更新する
  3. 部屋タブ:
    • 新しいホテルの部屋を追加する
    • 室温を手動で設定する
  4. 予約タブ:
    • ユーザーの新しい予約を作成する
    • 予約に部屋を割り当てる(チェックイン)
    • チェックアウトの処理
  5. ダッシュボードタブ:
    • ホテルの統計情報を見る
    • 室温を監視する
    • SmartThingsの統合ステータスを確認する
  6. クロードインターフェースタブ:
    • AI応答にTinyLlamaを使用するには、ローカルLLMオプションを有効にします。
    • アシスタントとチャットして部屋を予約したり、温度の好みを設定したりできます
    • ホテルシステムへの会話型インターフェースを体験してください

SmartThings統合

このデモでは、SmartThingsとの統合をシミュレートしています。実際の実装では、実際のSmartThings APIに接続して以下の機能を制御します。

  • 室温(エアコン/暖房)
  • 部屋の照明
  • ドアロック
  • その他のスマートデバイス

ゲストがチェックインすると、プロフィールに保存されている好みの温度が SmartThings を通じて割り当てられた部屋に自動的に適用されます。

APIドキュメント

MCP サーバーが起動したら、次の URL で API ドキュメントにアクセスできます: http://localhost:8000/docs

これにより、利用可能なすべての API エンドポイントを探索およびテストするためのインタラクティブなインターフェースが提供されます。

トラブルシューティング

  • TinyLlama モデルの読み込みで問題が発生した場合は、Claude インターフェース タブの「ローカル LLM を使用する」トグルを無効にして、代わりに基本的なパターン マッチング実装を使用することができます。
  • MCP サーバーに接続できない場合は、Streamlit アプリのサイドバーの URL を確認してください (デフォルトはhttp://localhost:8000 )。
  • データはdataディレクトリ内のJSONファイルに保存されます。サイドバーの「デモデータをリセット」をクリックすると、データをリセットできます。

クレジット

このデモンストレーションは、SmartThings とホテル管理システムの統合の可能性を示すために Samsung によって作成されました。

-
security - not tested
F
license - not found
-
quality - not tested

ホテル管理フロントエンド用の API エンドポイントを提供し、SmartThings API と統合して、ユーザーの好みや部屋の割り当てに基づいてデバイスを制御します。

  1. 概要
    1. プロジェクト構造
      1. セットアップとインストール
        1. 前提条件
        2. インストール手順
      2. デモの実行
        1. MCPバックエンドサーバーを起動する
      3. デモの使用
        1. SmartThings統合
          1. APIドキュメント
            1. トラブルシューティング
              1. クレジット

                Related MCP Servers

                • -
                  security
                  F
                  license
                  -
                  quality
                  Enables users to control Google Home smart plugs using the Smart Home API with OAuth2 authentication, offering real-time device state management and control operations.
                  Last updated -
                  1
                  TypeScript
                • A
                  security
                  F
                  license
                  A
                  quality
                  Facilitates access to LumbreTravel API for managing travel programs, activities, and related entities through MCP clients.
                  Last updated -
                  68
                  9
                  1
                  TypeScript
                • -
                  security
                  F
                  license
                  -
                  quality
                  A versatile Model Context Protocol server that enables AI assistants to manage calendars, track tasks, handle emails, search the web, and control smart home devices.
                  Last updated -
                  2
                  Python
                  • Apple
                  • Linux
                • -
                  security
                  A
                  license
                  -
                  quality
                  A Model Context Protocol server that integrates with Home Assistant to provide smart home control capabilities through natural language, supporting devices like lights, climate systems, locks, alarms, and humidifiers.
                  Last updated -
                  Python
                  MIT License
                  • Apple

                View all related MCP servers

                ID: ad45podvpm