@genm/switchbot-mcp
为 AI 助手提供 SwitchBot 设备控制功能的模型上下文协议服务器。
特征
列出设备
获取设备状态
控制装置(开/关)
更改设备设置
场景控制
设备状态监控
安装
通过 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 集线器连接状态
身份验证错误
检查令牌和密钥过期
重新生成令牌和密钥
更新环境变量
执照
国际学习中心
Related MCP Servers
- -security-license-qualityEnables AI agents to control Minecraft bots through a standardized JSON-RPC interface.Last updated -434MIT License
- Asecurity-licenseAqualityProvides tools for AI assistants to interact with smart home devices through Home Assistant, allowing operations like checking entity states and calling services.Last updated -33MIT License
- Asecurity-licenseAqualityEnables AI assistants to interact with WordPress sites through REST APIs, allowing programmatic management of posts, users, comments, categories, and tags with secure authentication.Last updated -2946MIT License
- -security-license-qualityEnables AI assistants to control a browser through a set of tools, allowing them to perform web automation tasks like navigation, typing, clicking, and taking screenshots.Last updated -