ruru-swbot-mcp
Click on "Install Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@ruru-swbot-mcpturn off the kitchen light"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
ruru-swbot-mcp
SwitchBot API の MCP サーバー。デバイスを名前で操作できる設計なので、AIがIDを間違えて操作を失敗するリスクがあんまりなかったりします。
インストール
npm install -g ruru-swbot-mcpRelated MCP server: HarmonyOS MCP Server
環境変数
SwitchBot アプリの設定からトークンとシークレットを取得し、設定してください。
変数名 | 説明 |
| SwitchBot API トークン |
| SwitchBot API シークレット |
MCP 設定
Claude Code
claude mcp add switchbot -- npx ruru-swbot-mcpClaude Desktop
{
"mcpServers": {
"switchbot": {
"command": "npx",
"args": ["ruru-swbot-mcp"],
"env": {
"SWITCHBOT_TOKEN": "<your-token>",
"SWITCHBOT_SECRET": "<your-secret>"
}
}
}
}リソース
リソース名 | URI | 説明 |
|
| 全物理デバイスの現在の状態(温度・湿度・電源など) |
ツール
ツール名 | 説明 |
| デバイス一覧を取得(名前・タイプ・利用可能コマンド) |
| デバイスの現在の状態を取得 |
| デバイスにコマンドを送信 |
| シーン一覧を取得 |
| シーンを実行 |
使い方の例
1. list_devices でデバイス一覧を確認
2. get_device_status({ deviceName: "リビング照明" }) で状態を取得
3. control_device({ deviceName: "リビング照明", command: "turnOn" }) で操作Available Tools
5 toolscontrol_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" })
| Name | Required | Description | Default |
|---|---|---|---|
| command | Yes | 実行するコマンド(list_devices で確認したコマンド名を使用) | |
| parameter | No | コマンドのパラメータ(必要な場合のみ) | |
| deviceName | Yes | デバイス名(list_devices で確認した名前を使用) |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
With no annotations, the description must carry the full behavioral burden. It only says 'Send a command' without disclosing side effects, success/failure responses, or prerequisites such as device availability. The examples show parameter usage but not what happens on execution, leaving significant gaps.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The main action is stated upfront in a single sentence, followed by illustrative examples. It is appropriately sized and front-loaded, though the examples take some space; they are justified by their instructional value.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
The description covers the tool's purpose, prerequisite, and invocation patterns, which is solid for a simple control tool. However, with no output schema and no annotations, it fails to mention what the tool returns or how errors are surfaced, which is a notable omission for an agent deciding whether and how to invoke it.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Although the schema already provides descriptions for all three parameters (100% coverage), the description enriches understanding with concrete examples: 'turnOn' without parameter, 'setBrightness' with '50', and 'setColor' with '255:0:0'. This adds practical meaning beyond the schema's generic Japanese text.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description clearly states 'Send a command to a SwitchBot device by name,' with a specific verb and resource. The examples differentiate it from sibling tools like list_devices and execute_scene, making the tool's purpose unmistakable.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
It explicitly instructs to 'Use list_devices first to see available commands for each device,' providing a clear prerequisite and contextualizing when to use this tool. It does not explicitly contrast with alternatives like execute_scene, but the command-sending scope is clear.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
execute_sceneA
Execute a SwitchBot scene by name. Use list_scenes first to see available scenes. Example: execute_scene({ sceneName: "おやすみ" })
| Name | Required | Description | Default |
|---|---|---|---|
| sceneName | Yes | シーン名(list_scenes で確認した名前を使用) |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
No annotations are provided, so the description must disclose behavioral traits. It only says 'execute' which implies a mutation, but it does not mention side effects, error behavior, authentication needs, or whether the operation is reversible. The example with a Japanese scene name adds little behavioral context.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is two sentences plus an inline example, which is concise and front-loaded. Every word adds value, and the example is practical without adding clutter.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
For a simple tool with one parameter and no output schema, the description gives required usage context (check list_scenes first). However, it doesn't mention what happens after execution (e.g., success/failure output) or any side effects, which is a gap given no annotations.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
The schema already provides 100% coverage for sceneName with a description in Japanese. The tool description adds the phrase 'by name' and an example, but these do not significantly enhance understanding beyond the schema. Baseline of 3 applies due to high schema coverage.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description clearly states 'Execute a SwitchBot scene by name,' using a specific verb (execute) and resource (scene). It is distinct from siblings like list_scenes (which lists scenes) and control_device (which controls devices).
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The description explicitly instructs to use list_scenes first, which provides clear usage context and a sibling alternative. It doesn't specify when not to use it, but the guidance is sufficient for the tool's simple purpose.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
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: "リビング照明" })
| Name | Required | Description | Default |
|---|---|---|---|
| deviceName | Yes | デバイス名(list_devices で確認した名前を使用) |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
No annotations are provided, so the description carries the full behavioral disclosure burden. It discloses that the output varies by device type, which is useful context. However, it does not state side effects, error behavior, or permission requirements. The verb 'get' implies a safe read, but deeper behavioral traits are not addressed.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is a single concise sentence plus an illustrative example. Every word adds value, and the structure front-loads the core purpose before showing usage.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
For a simple read tool with one parameter and no output schema, the description adequately covers the main functionality and variable output. It lacks details on failure modes or prerequisites, but these are not critical for a straightforward get operation.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema coverage is 100% because the deviceName parameter has a description. The tool description adds a concrete example and restates that the device is identified by name, providing slight value over the schema. This aligns with the baseline for high schema coverage.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description clearly states the tool retrieves the current status of a SwitchBot device by name, listing possible return values (power state, temperature, humidity). This distinguishes it from sibling tools list_devices (which lists devices) and control_device (which changes device state). The example further reinforces the targeted operation.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The description implies this tool is for reading status rather than controlling, and clarifies usage by name with an example. It does not explicitly mention when not to use it or name alternatives, but the context makes the read-vs-write distinction clear.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
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", ...}]}]
| Name | Required | Description | Default |
|---|---|---|---|
No parameters | |||
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
No annotations are provided, so the description bears the full burden. It discloses the output scope (names, types, available commands) and includes an example response. Since 'list' implies a read-only operation, no side effects are expected, though explicit safety language is absent.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is two sentences plus an example, with no filler. It leads with the purpose, then gives usage guidance, and shows a sample response, making it highly efficient.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
With no output schema, the example response compensates by illustrating the structure. The description covers purpose, usage, and output, making it fully adequate for a simple list operation.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
The tool has zero parameters, so the baseline is 4. The description adds no parameter details, but none are needed.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description clearly states 'List all SwitchBot devices with their names, types, and available commands,' specifying the verb, resource, and returned data. It distinguishes itself from siblings like get_device_status and control_device by focusing on discovery.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
It explicitly advises 'Use this first to see what devices you can control,' giving a clear when-to-use context. It does not directly mention alternatives or when not to use it, but the guidance is sufficient for initial discovery.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
list_scenesA
List all SwitchBot scenes. Scenes are pre-configured automations that can control multiple devices at once. Example response: [{"name": "おやすみ"}, {"name": "おはよう"}]
| Name | Required | Description | Default |
|---|---|---|---|
No parameters | |||
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
Without annotations, the description discloses the return format via an example response and clarifies the semantics of scenes. It implies a read-only operation through 'List all', though it does not explicitly state side effects or authentication needs. The example response provides useful behavioral context.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
Two tightly-written sentences and an example lead with the primary action. Every element adds value; no filler or repetition.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
For a parameterless listing tool with no output schema, the description covers the purpose, the domain concept, and an example response. It is sufficient for an agent to invoke correctly, though it omits potential details like ordering or filtering.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
The tool has no parameters, so the baseline is 4. The description does not need to explain parameters; it adds context about the scene concept instead.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description uses a specific verb ('List') and resource ('all SwitchBot scenes'), clarifying it returns a list of automations. The added explanation that scenes are pre-configured automations distinguishes it from listing devices or device status.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
No explicit when-to-use or alternative guidance is given. The resource name and sibling tools imply it is for retrieving available scenes, but it does not state to use execute_scene to run a scene or contrast with list_devices.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
5 tool updates
v2.0.0- First observed
control_device - First observed
execute_scene - First observed
get_device_status - First observed
list_devices - First observed
list_scenes
TDQS
Scored across 5 tools
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.
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.
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.
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
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
Related MCP Connectors
Connect AI assistants to Subotiz - Using Subotiz's external capabilities through natural language
Connect AI assistants to Subotiz - Using Subotiz's external capabilities through natural language
Deploy, monitor, and manage your OpenClaw AI assistants via natural language.
Control your Tesla from your AI assistant - climate, charging, access, and security.
Related MCP Servers
- AlicenseCqualityBmaintenanceEnables AI assistants to control SwitchBot devices, providing functionalities like device management, scene execution, and sensor information monitoring through the SwitchBot API.37ISC
- AlicenseBqualityCmaintenanceEnables AI assistants to control HarmonyOS devices, such as launching apps, through natural language.1634MIT
- AlicenseNot gradedqualityDmaintenanceEnables AI assistants to directly interact with Matter devices and protocol operations, including device commissioning, attribute read/write, commands, and event monitoring, through natural language.7MIT
- AlicenseNot gradedqualityBmaintenanceEnables natural language control of Xiaomi smart home devices through MCP, focusing on homes, rooms, device names, and scenes without requiring protocol details.66MIT