Skip to main content
Glama
SwitchBot MCP Server
by genm

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

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

日本語

特徴

  • デバイスの一覧

  • デバイスのステータスを取得する

  • 制御デバイス(オン/オフ)

  • デバイス設定を変更する

  • シーンコントロール

  • デバイスステータス監視

Related MCP server: MCP Govee

インストール

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

Available Tools

3 tools
control_deviceD

デバイスを制御します

Inputs: deviceId (required), command (required).

get_device_statusC

デバイスのステータスを取得します

Inputs: deviceId (required).

list_devicesB

デバイス一覧を取得します

Inputs: no named parameters.

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections.

Loading tool schema changelog…

    TDQS

    C2.7/5.0

    Scored across 3 tools

    Disambiguation5/5

    Each tool has a clearly distinct purpose with no overlap: control_device performs actions on devices, get_device_status retrieves status information, and list_devices enumerates available devices. The descriptions clearly differentiate between controlling, checking status, and listing devices.

    Naming Consistency5/5

    All three tools follow a consistent verb_noun pattern with snake_case naming: control_device, get_device_status, and list_devices. The naming is perfectly uniform and predictable across the entire tool set.

    Tool Count3/5

    With only 3 tools, the count feels somewhat thin for a device control server that might benefit from more granular operations like specific device types or advanced controls. However, it covers the absolute basics adequately.

    Completeness3/5

    The tools provide basic CRUD-like coverage for device management (list, get status, control), but there are notable gaps such as no ability to create/configure new devices, delete devices, or handle device groups/scenes. The surface is functional but minimal.

    Maintenance

    ActivitySlowing
    ResponsivenessNo recent community issues

    Related MCP Connectors

    Related MCP Servers

    • A
      license
      Not graded
      quality
      D
      maintenance
      Enables AI assistants to interact with Home Assistant smart home devices through natural language. Control devices, manage automations, query entity states, and retrieve historical data across your home automation system.
      1
      MIT
    • A
      license
      A
      quality
      D
      maintenance
      Enables AI assistants to control Govee smart devices, including lights, via natural language. Supports turning on/off, changing colors, adjusting brightness, and activating scenes through the Govee API or local network.
      9
      1
      MIT
    • A
      license
      Not graded
      quality
      D
      maintenance
      Enables AI assistants to control Xiaomi Mi Home smart devices through natural language, supporting device listing, property control, actions, and scenes.
      8
      MIT