A Model Context Protocol server that provides SwitchBot device control capabilities to AI assistants.
- List devices
- Get device status
- Control devices (on/off)
- Change device settings
- Scene control
- Device status monitoring
To install SwitchBot MCP Server for Claude Desktop automatically via Smithery:
npx -y @smithery/cli install @genm/switchbot-mcp --client claude
npm install @genm/switchbot-mcp
- Install the SwitchBot app
- Create an account and sign in
- Go to Profile > Settings > Developer Options
- Get both the token and secret key
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"
}
}
}
}
SWITCHBOT_TOKEN=your_token
SWITCHBOT_SECRET=your_secret
- 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
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.
- List devices
- Get device status
- Turn devices on/off
- Change device settings
- List scenes
- Execute scenes
- Temperature
- Humidity
- Brightness
- Motion
# Build
npm run build
# Development mode (TypeScript)
npm run dev
# Start
npm start
- Verify the device is within Bluetooth range
- Check device battery status
- Verify SwitchBot hub connection status
- Check token and secret key expiration
- Regenerate token and secret key
- Update environment variables
ISC