SwitchBot MCP Server

by genm

remote-capable server

The server can be hosted and run remotely because it primarily relies on remote services or has no dependency on the local environment.

Integrations

  • Provides connectivity for SwitchBot devices which operate over Bluetooth, allowing device control for devices within Bluetooth range.

@genm/スイッチボット-mcp

AI アシスタントに SwitchBot デバイス制御機能を提供するモデル コンテキスト プロトコル サーバー。

日本語

特徴

  • デバイスの一覧
  • デバイスのステータスを取得する
  • 制御デバイス(オン/オフ)
  • デバイス設定を変更する
  • シーンコントロール
  • デバイスステータス監視

インストール

Smithery経由でインストール

Smithery経由で Claude Desktop 用の SwitchBot MCP Server を自動的にインストールするには:

npx -y @smithery/cli install @genm/switchbot-mcp --client claude

手動インストール

npm install @genm/switchbot-mcp

設定

1. SwitchBot API設定

  1. SwitchBotアプリをインストールする
  2. アカウントを作成してサインインする
  3. プロフィール > 設定 > 開発者向けオプションに移動します
  4. トークンと秘密鍵の両方を取得する

2. MCPサーバーの構成

claude_desktop_config.jsonに以下を追加します。

{ "mcpServers": { "switchbot": { "command": "node", "args": ["path/to/switchbot-mcp/build/index.js"], "env": { "SWITCHBOT_TOKEN": "your_token", "SWITCHBOT_SECRET": "your_secret" } } } }

3. 環境変数

SWITCHBOT_TOKEN=your_token SWITCHBOT_SECRET=your_secret

対応デバイス

  • プラグ
    • リビングルームのフロアランプ
    • オフィスPC電源
  • ボット
    • キッチンコーヒーメーカー
    • リビングルーム用空気清浄機
  • カーテン
    • 寝室の窓のカーテン
    • 勉強部屋用遮光カーテン
  • エアコン
    • リビングルームのエアコン
    • 寝室のエアコン
  • 加湿器
    • 寝室用加湿器
    • 勉強部屋用加湿器
  • ライト
    • キッチンの天井照明
    • 寝室のナイトライト
  • リモコン
    • リビングルームのテレビ
    • 勉強部屋用扇風機

デバイス名の例

AIアシスタントによる制御を容易にするために、デバイスにわかりやすい名前を付けることをお勧めします。例:

  • 「カーテン」ではなく「寝室のカーテン」
  • 「エアコン」ではなく「リビングルームAC」
  • 「ボット」ではなく「キッチンコーヒーメーカー」

この命名規則は、AI アシスタントが各デバイスのコンテキストと場所を理解するのに役立ちます。

サポートされている操作

デバイス管理

  • デバイスの一覧
  • デバイスのステータスを取得する
  • デバイスのオン/オフ
  • デバイス設定を変更する

シーン管理

  • シーン一覧
  • シーンを実行する

センサー情報

  • 温度
  • 湿度
  • 輝度
  • モーション

発達

# Build npm run build # Development mode (TypeScript) npm run dev # Start npm start

トラブルシューティング

デバイスが応答しません

  1. デバイスがBluetoothの範囲内にあることを確認してください
  2. デバイスのバッテリー状態を確認する
  3. SwitchBotハブの接続ステータスを確認する

認証エラー

  1. トークンと秘密鍵の有効期限を確認する
  2. トークンと秘密鍵を再生成する
  3. 環境変数を更新する

ライセンス

ISC

You must be authenticated.

A
security – no known vulnerabilities
A
license - permissive license
A
quality - confirmed to work

AI アシスタントが SwitchBot デバイスを制御できるようにし、SwitchBot API を通じてデバイス管理、シーン実行、センサー情報の監視などの機能を提供します。

  1. Features
    1. Installation
      1. Installing via Smithery
      2. Manual Installation
    2. Setup
      1. 1. SwitchBot API Configuration
      2. 2. MCP Server Configuration
      3. 3. Environment Variables
    3. Supported Devices
      1. Device Name Examples
        1. Supported Operations
          1. Device Management
          2. Scene Management
          3. Sensor Information
        2. Development
          1. Troubleshooting
            1. Device Not Responding
            2. Authentication Errors
          2. License
            ID: k8m7mttrur