家庭助理 MCP
这是一个MCP(模型上下文协议)服务器,提供与Home Assistant集成的工具,让AI助手可以与智能家居设备进行交互。
设置
通过 Smithery 安装
要通过Smithery自动为 Claude Desktop 安装 Home Assistant Integration:
手动安装
安装依赖项:
配置环境变量:
从你的 Home Assistant 获取长期访问令牌
在项目根目录下的
.env
文件中配置环境变量:
启动服务器
对于开发:
可用工具
家庭助理 API 验证
homeassistant_api :验证 Home Assistant API 是否在线
参数:无
示例:
homeassistant_api()
获取实体状态
homeassistant_get_state :获取 Home Assistant 实体的当前状态
参数:
entity_id
(实体ID)例如:
homeassistant_get_state("light.living_room")
呼叫服务
homeassistant_call_service :调用 Home Assistant 实体的服务
参数:
entity_id
(实体ID)domain
(服务域)service
(要调用的服务)
例如:
homeassistant_call_service("light.living_room", "light", "turn_on")
发展
该项目使用 TypeScript 和 MCP SDK 库来创建可被 Claude、GPT 等语言模型访问的工具。
要添加新工具:
在
src/tools/[category]
中创建一个模块按照现有模式实施你的工具
在
src/index.ts
中注册模块
贡献
欢迎贡献代码!欢迎随时提交 issue 或 PR。
执照
该项目根据 MIT 许可证获得许可 - 有关详细信息,请参阅 LICENSE 文件。
hybrid server
The server is able to function both locally and remotely, depending on the configuration or use case.
为AI助手提供通过Home Assistant与智能家居设备交互的工具,允许检查实体状态、调用服务等操作。
Related MCP Servers
- -securityAlicense-qualityAccess Home Assistant data and control devices (lights, switches, thermostats, etc).Last updated -6418Apache 2.0
- AsecurityAlicenseAqualityEnables AI assistants to control SwitchBot devices, providing functionalities like device management, scene execution, and sensor information monitoring through the SwitchBot API.Last updated -3ISC License
- AsecurityAlicenseAqualityA server that enables interaction with Home Assistant devices and automations through the Model Context Protocol, allowing users to monitor device states, control devices, trigger automations, and list entities.Last updated -44MIT License
- AsecurityAlicenseAqualityProvides AI assistants with enhanced reasoning capabilities through structured thinking, persistent knowledge graph memory, and intelligent tool orchestration for complex problem-solving.Last updated -205150MIT License