LabscoMCP early access ↗
genmMCP SERVER

SwitchBot

Control SwitchBot devices and scenes from an assistant through seven tools, over stdio or an API-key-protected HTTP endpoint.

by genm ↗IoT, Smart Home & Embedded HardwareCommunity

No longer maintained. The GitHub repository for this server is archived — no fixes or security updates are expected.

View project ↗

LABSCO SUMMARY

Unusually blunt about its own limits.

The README says v3 has not reached npm or the official MCP Registry yet, that the one-click and npx commands only start working after the first release, that Smithery is not an official channel and has not been revalidated, and that an AI client's confirmation is not an authorization boundary. Tool calls here control physical devices and run scenes — the server speaks plain HTTP, so terminate TLS at a proxy and keep the listener off the public internet.

What it is

An unofficial MCP server for the SwitchBot Open API. It lists your devices, reads their status, switches them on and off, sends device commands and runs scenes — with structured tool output and MCP risk annotations, since these calls move physical hardware.

What you get

  • Devices listed and their status read — switchbot_list_devices, switchbot_get_device_status, plus switchbot_list_devices_raw when you want the raw upstream fields
  • Power switched and arbitrary device commands sent — switchbot_set_power, switchbot_send_command
  • Scenes listed and executed — switchbot_list_scenes, switchbot_execute_scene
  • Structured structuredContent output on every tool, MCP risk annotations, and bounded retries on read-only requests
  • Two transports — stdio, and Streamable HTTP with same-host Origin and Host validation
  • Redacted JSONL operational logs

Requirements

A SwitchBot Open API token and secret, required as SWITCHBOT_TOKEN and SWITCHBOT_SECRET — the process fails closed when they are missing. Node.js 24.15+. v3 is not yet on npm or the official MCP Registry, so today you build from source: clone, npm ci --ignore-scripts, npm run build, then run node build/index.js. For HTTP, set MCP_TRANSPORT=http and MCP_SERVER_API_KEY to a high-entropy secret; the endpoint binds MCP_HTTP_HOST (default 127.0.0.1) and MCP_HTTP_PORT (default 8787) at MCP_HTTP_PATH (default /mcp). ISC licensed.

Setup effort

Build from source — git clone https://github.com/genm/switchbot-mcp.git