Skip to main content
Glama
ruru-swbot-mcp

ruru-swbot-mcp

by arrow2nd

ruru-swbot-mcp

SwitchBot API の MCP サーバー。デバイスを名前で操作できる設計なので、AIがIDを間違えて操作を失敗するリスクがあんまりなかったりします。

インストール

npm install -g ruru-swbot-mcp

Related MCP server: HarmonyOS MCP Server

環境変数

SwitchBot アプリの設定からトークンとシークレットを取得し、設定してください。

変数名

説明

SWITCHBOT_TOKEN

SwitchBot API トークン

SWITCHBOT_SECRET

SwitchBot API シークレット

MCP 設定

Claude Code

claude mcp add switchbot -- npx ruru-swbot-mcp

Claude Desktop

{
  "mcpServers": {
    "switchbot": {
      "command": "npx",
      "args": ["ruru-swbot-mcp"],
      "env": {
        "SWITCHBOT_TOKEN": "<your-token>",
        "SWITCHBOT_SECRET": "<your-secret>"
      }
    }
  }
}

リソース

リソース名

URI

説明

device_statuses

switchbot://devices/status

全物理デバイスの現在の状態(温度・湿度・電源など)

ツール

ツール名

説明

list_devices

デバイス一覧を取得(名前・タイプ・利用可能コマンド)

get_device_status

デバイスの現在の状態を取得

control_device

デバイスにコマンドを送信

list_scenes

シーン一覧を取得

execute_scene

シーンを実行

使い方の例

1. list_devices でデバイス一覧を確認
2. get_device_status({ deviceName: "リビング照明" }) で状態を取得
3. control_device({ deviceName: "リビング照明", command: "turnOn" }) で操作

Available Tools

5 tools
control_deviceA

Send a command to a SwitchBot device by name. Use list_devices first to see available commands for each device. Examples: control_device({ deviceName: "リビング照明", command: "turnOn" }), control_device({ deviceName: "リビング照明", command: "setBrightness", parameter: "50" }), control_device({ deviceName: "リビング照明", command: "setColor", parameter: "255:0:0" })

Inputs: command (required), deviceName (required), parameter.

execute_sceneA

Execute a SwitchBot scene by name. Use list_scenes first to see available scenes. Example: execute_scene({ sceneName: "おやすみ" })

Inputs: sceneName (required).

get_device_statusA

Get the current status of a SwitchBot device by name. Returns power state, temperature, humidity, etc. depending on device type. Example: get_device_status({ deviceName: "リビング照明" })

Inputs: deviceName (required).

list_devicesA

List all SwitchBot devices with their names, types, and available commands. Use this first to see what devices you can control. Example response: [{"name": "リビング照明", "type": "Color Bulb", "commands": [{"command": "turnOn", ...}]}]

Inputs: no named parameters.

list_scenesA

List all SwitchBot scenes. Scenes are pre-configured automations that can control multiple devices at once. Example response: [{"name": "おやすみ"}, {"name": "おはよう"}]

Inputs: no named parameters.

Tool Schema Changelog

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

Loading tool schema changelog…

    TDQS

    A4.2/5.0

    Scored across 5 tools

    Disambiguation5/5

    Each tool targets a distinct action: listing devices, fetching device status, controlling a device, listing scenes, and executing a scene. There is no overlap or ambiguity between them, as the purpose of each is clearly separated.

    Naming Consistency5/5

    All tool names follow a consistent verb_noun pattern: list_devices, get_device_status, control_device, list_scenes, execute_scene. The verbs are predictable and the nouns accurately represent the resource, making the naming convention uniform and intuitive.

    Tool Count5/5

    With only 5 tools, the server is well-scoped for SwitchBot device and scene management. Each tool is necessary and covers a core operation, and the count is neither too sparse nor bloated for the intended functionality.

    Completeness5/5

    The tool surface covers the full lifecycle for both devices (list, get status, control) and scenes (list, execute). Since scenes are pre-configured automations, there is no need for create/update/delete of scenes, so the provided operations are complete for the domain.

    Maintenance

    ActivityInactive
    ResponsivenessOutdated data

    Related MCP Connectors

    Related MCP Servers

    • A
      license
      Not graded
      quality
      D
      maintenance
      Enables AI assistants to directly interact with Matter devices and protocol operations, including device commissioning, attribute read/write, commands, and event monitoring, through natural language.
      7
      MIT
    • A
      license
      Not graded
      quality
      B
      maintenance
      Enables natural language control of Xiaomi smart home devices through MCP, focusing on homes, rooms, device names, and scenes without requiring protocol details.
      78
      MIT