Smart Home Device Control
About
Control smart home devices and query information by connecting large models to smart home backend APIs.
Details
- Author
- sysu-aicpm
- Categories
- Other, API
Jump to
Setup
Install Smart Home Device Control in your MCP client (Claude Desktop, Cursor, Windsurf, and others).
Repository: https://github.com/sysu-aicpm/mcp-server
Follow the installation instructions in the repository README, then restart your MCP client.
Control smart home devices and query information by connecting large models to smart home backend APIs.
这个 MCP 服务器允许大模型通过 Model Context Protocol (MCP) 协议访问智能家居后端 API,实现设备控制和信息查询功能。
- 提供设备控制接口,支持各种智能家居设备的操作
- 查询设备概览和详细信息
- 内置丰富的设备文档,指导大模型正确使用各类设备
- 支持通过命令行参数配置后端 API 地址和认证令牌
- 设置温度 (set_temperature)
- 参数: temperature (范围: 16-30°C)
- 示例:control_device(device_id="5", action="set_temperature", parameters={"temperature": 24})
- 参数: state ("on"或"off")
- 示例:control_device(device_id="5", action="switch", parameters={"state": "on"})
- 设置温度 (set_temperature)
- 参数: temperature (范围: -20到10°C)
- 示例:control_device(device_id="8", action="set_temperature", parameters={"temperature": 4})
- 参数: state ("on"或"off")
- 示例:control_device(device_id="8", action="switch", parameters={"state": "on"})
- 设置亮度 (set_brightness)
- 参数: brightness (范围: 0-100)
- 示例:control_device(device_id="12", action="set_brightness", parameters={"brightness": 80})
- 参数: state ("on"或"off")
- 示例:control_device(device_id="12", action="switch", parameters={"state": "on"})
- 设置锁状态 (set_lock)
- 参数: state ("lock"或"unlock")
- 示例:control_device(device_id="15", action="set_lock", parameters={"state": "lock"})
- 控制录制 (set_recording)
- 参数: state ("start"或"stop")
- 示例:control_device(device_id="20", action="set_recording", parameters={"state": "start"})
- 参数: resolution ("720p", "1080p"或"4k")
- 示例:control_device(device_id="20", action="set_resolution", parameters={"resolution": "1080p"})
- online: 设备在线正常工作
- offline: 设备离线
- error: 设备出现错误
pip install fastmcp requests python mcp_server.py --backend http://backend-api-address:8000/api/v1 --token <your_auth_token>
mcp_server --backend http://backend-api-address:8000/api/v1 --token <your_auth_token>
your_auth_token 令牌需要在通过POST /auth/login登录到后端后获取
- --backend: 后端 API 地址,默认为http://localhost:8000
- --token: 认证令牌,用于访问后端 API 的授权
你可以使用 cursor 或者 cline(VSCode插件)与大模型对话,在其中调用MCP服务器。
{ "mcpServers": { "cpm-smarthome": { "disabled": false, "timeout": 60, "transportType": "stdio", "command": "python", "args": [ "/path/to/mcp_server.py", "--token", "your_auth_token", "--backend", "http://backend-api-address:8000/api/v1" ] } } }
get_device_detail(device_id): 获取特定设备的详细信息
control_device(device_id, action, parameters): 控制特定设备执行操作
get_device_type_docs(device_type): 获取设备类型的控制文档
- 控制设备:POST /devices/{device_id}/control/
- 查询设备概要:GET /devices/overview/
- 查询设备详情:GET /devices/{device_id}/detail/
- 在使用任何工具前,请确保服务器启动时已提供正确的认证令牌
- 不同类型的设备支持不同的操作和参数,请参考设备文档了解详情
- 所有API调用都需要提供有效的认证令牌
- 设备控制操作会返回操作结果,请检查返回的 success 字段确认操作是否成功
A comprehensive FastMCP 2.0 server and client for interacting with SmartThings devices, locations, rooms, modes, scenes, and automation rules through the SmartThings API.
Control SwitchBot smart home devices through its official API, enabling automation and integration with AI assistants.
Control SwitchBot devices interactively using the SwitchBot API.
A free, private, and secure remote MCP server for Home Assistant.
MCP server for Google Cast — discover devices, play media, control volume, launch apps, and manage queues over stdio
A safe-by-default MCP server that exposes your Control4 home automation (lights, scenes, locks, thermostats, and media) as structured tools over HTTP and Claude Desktop STDIO for reliable AI-powered control on your local network.
Control and query the status of Ecovacs cleaning robots using the MCP protocol.
A production-ready Model Context Protocol (MCP) server written in Go that wraps the Conso API, giving AI assistants like Claude direct access to your Enedis Linky smart meter data.
Control AVM FRITZ!Box routers - manage devices, WiFi, network settings, parental controls, and schedule time-delayed actions
Allows an LLM agent to control your Gaggimate espresso machine
Sign in to leave a review
Use Google, GitHub, or an email account so ratings stay tied to real people.
No reviews posted yet.




