SwitchBot MCP Server

SwitchBot MCP Server

Enables AI assistants to control SwitchBot devices, providing functionalities like device management, scene execution, and sensor information monitoring through the SwitchBot API.

genm

Home Automation & IoT
Visit Server

Tools

list_devices

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

get_device_status

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

control_device

デバイスを制御します

README

@genm/switchbot-mcp

A Model Context Protocol server that provides SwitchBot device control capabilities to AI assistants. smithery badge

日本語

<a href="https://glama.ai/mcp/servers/k8m7mttrur"><img width="380" height="200" src="https://glama.ai/mcp/servers/k8m7mttrur/badge" alt="SwitchBot Server MCP server" /></a>

Features

  • List devices
  • Get device status
  • Control devices (on/off)
  • Change device settings
  • Scene control
  • Device status monitoring

Installation

Installing via Smithery

To install SwitchBot MCP Server for Claude Desktop automatically via Smithery:

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

Manual Installation

npm install @genm/switchbot-mcp

Setup

1. SwitchBot API Configuration

  1. Install the SwitchBot app
  2. Create an account and sign in
  3. Go to Profile > Settings > Developer Options
  4. Get both the token and secret key

2. MCP Server Configuration

Add the following to 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. Environment Variables

SWITCHBOT_TOKEN=your_token
SWITCHBOT_SECRET=your_secret

Supported Devices

  • Plug
    • Living Room Floor Lamp
    • Office PC Power Supply
  • Bot
    • Kitchen Coffee Maker
    • Living Room Air Purifier
  • Curtain
    • Bedroom Window Curtain
    • Study Room Blackout Curtain
  • Air Conditioner
    • Living Room AC
    • Bedroom AC
  • Humidifier
    • Bedroom Humidifier
    • Study Room Humidifier
  • Light
    • Kitchen Ceiling Light
    • Bedroom Night Light
  • Remote Control
    • Living Room TV
    • Study Room Fan

Device Name Examples

It's recommended to give descriptive names to your devices for easier control by AI assistants. Examples:

  • "Bedroom Curtain" instead of just "Curtain"
  • "Living Room AC" instead of just "Air Conditioner"
  • "Kitchen Coffee Maker" instead of just "Bot"

This naming convention helps AI assistants understand the context and location of each device.

Supported Operations

Device Management

  • List devices
  • Get device status
  • Turn devices on/off
  • Change device settings

Scene Management

  • List scenes
  • Execute scenes

Sensor Information

  • Temperature
  • Humidity
  • Brightness
  • Motion

Development

# Build
npm run build

# Development mode (TypeScript)
npm run dev

# Start
npm start

Troubleshooting

Device Not Responding

  1. Verify the device is within Bluetooth range
  2. Check device battery status
  3. Verify SwitchBot hub connection status

Authentication Errors

  1. Check token and secret key expiration
  2. Regenerate token and secret key
  3. Update environment variables

License

ISC

Recommended Servers

ThingsPanel MCP

ThingsPanel MCP

An integration server that connects AI models with ThingsPanel IoT platform, allowing AI assistants to interact with IoT devices through natural language for device control, data retrieval, and management operations.

Official
Python
MCP Personal Assistant Agent

MCP Personal Assistant Agent

A versatile Model Context Protocol server that enables AI assistants to manage calendars, track tasks, handle emails, search the web, and control smart home devices.

Local
Python
Tesla MCP Server

Tesla MCP Server

A Model Context Protocol server that connects to the Tesla Fleet API, allowing AI assistants like Claude to control Tesla vehicles and access vehicle information through natural language commands.

Local
TypeScript
MCP2Serial

MCP2Serial

A bridge that connects physical hardware devices with AI large language models via serial communication, allowing users to control hardware using natural language commands.

Local
Python
OpenHue MCP Server

OpenHue MCP Server

Enables control of Philips Hue lights through Claude and other LLM interfaces using the OpenHue CLI.

Local
TypeScript
Home Assistant MCP

Home Assistant MCP

Expose all Home Assistant voice intents through a Model Context Protocol Server allowing home control.

Local
Python
Tuya MCP Server

Tuya MCP Server

A cli tool to control Tuya devices based on tinytuya - cabra-lat/tuyactl

Local
Python
Govee MCP Server

Govee MCP Server

Enables users to control Govee LED devices using the Govee API, with features for turning devices on/off, setting colors, and adjusting brightness through a CLI or MCP clients.

Python
mcp2mqtt

mcp2mqtt

Links IoT devices to AI large models using the MCP and MQTT protocols, enabling natural language control, real-time AI responses, and complex instruction execution for interconnected IoT devices.

Python
Home Assistant MCP Server

Home Assistant MCP Server

A Model Context Protocol server that integrates with Home Assistant to provide smart home control capabilities through natural language, supporting devices like lights, climate systems, locks, alarms, and humidifiers.

Python