SwitchBot MCP Server

by genm

Integrations

  • Provides connectivity for SwitchBot devices which operate over Bluetooth, allowing device control for devices within Bluetooth range.

@genm/switchbot-mcp

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

日本語

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

You must be authenticated.

A
security – no known vulnerabilities
A
license - permissive license
A
quality - confirmed to work

remote-capable server

The server can be hosted and run remotely because it primarily relies on remote services or has no dependency on the local environment.

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

  1. Features
    1. Installation
      1. Installing via Smithery
      2. Manual Installation
    2. Setup
      1. 1. SwitchBot API Configuration
      2. 2. MCP Server Configuration
      3. 3. Environment Variables
    3. Supported Devices
      1. Device Name Examples
        1. Supported Operations
          1. Device Management
          2. Scene Management
          3. Sensor Information
        2. Development
          1. Troubleshooting
            1. Device Not Responding
            2. Authentication Errors
          2. License

            Related MCP Servers

            • -
              security
              A
              license
              -
              quality
              Provides code manipulation, execution, and version control capabilities. It allows AI assistants to read, write, and execute code while maintaining a history of changes.
              Last updated -
              8
              Python
              MIT License
            • -
              security
              F
              license
              -
              quality
              Enables AI agents to control web browsers via a standardized interface for operations like launching, interacting with, and closing browsers.
              Last updated -
              0
              JavaScript
            • A
              security
              A
              license
              A
              quality
              Enables AI integrations with ClickUp tasks, supporting resource management, task operations, workspace organization, and AI-powered task recommendations through a standardized protocol.
              Last updated -
              18
              203
              89
              TypeScript
              MIT License
            • -
              security
              A
              license
              -
              quality
              Provides tools for AI assistants to interact with smart home devices through Home Assistant, allowing operations like checking entity states and calling services.
              Last updated -
              TypeScript
              MIT License

            View all related MCP servers

            ID: k8m7mttrur