SwitchBot MCP Server
@genm/switchbot-mcp
为 AI 助手提供 SwitchBot 设备控制功能的模型上下文协议服务器。
特征
列出设备
获取设备状态
控制装置(开/关)
更改设备设置
场景控制
设备状态监控
Related MCP server: MCP Govee
安装
通过 Smithery 安装
要通过Smithery自动为 Claude Desktop 安装 SwitchBot MCP 服务器:
npx -y @smithery/cli install @genm/switchbot-mcp --client claude手动安装
npm install @genm/switchbot-mcp设置
1. SwitchBot API 配置
安装 SwitchBot 应用程序
创建帐户并登录
前往“个人资料”>“设置”>“开发者选项”
获取令牌和密钥
2. MCP 服务器配置
将以下内容添加到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.环境变量
SWITCHBOT_TOKEN=your_token
SWITCHBOT_SECRET=your_secret支持的设备
插头
客厅落地灯
办公室电脑电源
机器人
厨房咖啡机
客厅空气净化器
窗帘
卧室窗帘
书房遮光窗帘
空调
客厅空调
卧室空调
加湿器
卧室加湿器
书房加湿器
光
厨房天花板灯
卧室夜灯
遥控
客厅电视
书房风扇
设备名称示例
建议为设备指定描述性名称,以便 AI 助手更轻松地控制。示例:
“卧室窗帘”而不仅仅是“窗帘”
“客厅空调”而非“空调”
“厨房咖啡机”而不仅仅是“机器人”
这种命名约定有助于人工智能助手了解每个设备的上下文和位置。
支持的操作
设备管理
列出设备
获取设备状态
打开/关闭设备
更改设备设置
场景管理
列出场景
执行场景
传感器信息
温度
湿度
亮度
运动
发展
# Build
npm run build
# Development mode (TypeScript)
npm run dev
# Start
npm start故障排除
设备无响应
验证设备是否在蓝牙范围内
检查设备电池状态
验证 SwitchBot 集线器连接状态
身份验证错误
检查令牌和密钥过期
重新生成令牌和密钥
更新环境变量
执照
国际学习中心
Available Tools
3 toolscontrol_deviceD
デバイスを制御します
Inputs: deviceId (required), command (required).
get_device_statusC
デバイスのステータスを取得します
Inputs: deviceId (required).
list_devicesB
デバイス一覧を取得します
Inputs: no named parameters.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 3 tools
Each tool has a clearly distinct purpose with no overlap: control_device performs actions on devices, get_device_status retrieves status information, and list_devices enumerates available devices. The descriptions clearly differentiate between controlling, checking status, and listing devices.
All three tools follow a consistent verb_noun pattern with snake_case naming: control_device, get_device_status, and list_devices. The naming is perfectly uniform and predictable across the entire tool set.
With only 3 tools, the count feels somewhat thin for a device control server that might benefit from more granular operations like specific device types or advanced controls. However, it covers the absolute basics adequately.
The tools provide basic CRUD-like coverage for device management (list, get status, control), but there are notable gaps such as no ability to create/configure new devices, delete devices, or handle device groups/scenes. The surface is functional but minimal.
Maintenance
Related MCP Connectors
Control your Tesla from your AI assistant - climate, charging, access, and security.
- DNS-DATA RemoteDeprecatedcom.dns-data
Connect AI assistants to authorized Windows and macOS devices for files, commands, and management.
Connect AI assistants to GitHub - manage repos, issues, PRs, and workflows through natural language.
Connect assistants to your workspace knowledge, skills, and work tools.
Related MCP Servers
- AlicenseNot gradedqualityDmaintenanceEnables AI assistants to interact with Home Assistant smart home devices through natural language. Control devices, manage automations, query entity states, and retrieve historical data across your home automation system.1MIT
- AlicenseAqualityDmaintenanceEnables AI assistants to control Govee smart devices, including lights, via natural language. Supports turning on/off, changing colors, adjusting brightness, and activating scenes through the Govee API or local network.91MIT
- AlicenseNot gradedqualityDmaintenanceEnables AI assistants to control Xiaomi Mi Home smart devices through natural language, supporting device listing, property control, actions, and scenes.8MIT
- AlicenseAqualityDmaintenanceEnables monitoring and control of SwitchBot devices (temperature sensors, plugs, bots) via Claude Desktop or Home Assistant.10MIT