-
securityA
license-
qualityExpose all Home Assistant voice intents through a Model Context Protocol Server allowing home control.
Last updated -
30
Python
Apache 2.0
用于与Home Assistant集成的模型上下文协议 (MCP)服务器,允许 LLM 控制和查询您的智能家居。
在当前目录中创建一个.env
文件,其中包含以下变量:
多变的 | 必需的 | 默认 | 描述 |
---|---|---|---|
HASS_URL | 是的 | - | 您的 Home Assistant 实例的 URL(例如, http://homeassistant.local:8123 ) |
HASS_TOKEN | 是的 | - | 用于通过 Home Assistant 进行身份验证的长期访问令牌 |
PORT | 不 | 3000 | 使用 HTTP/SSE 传输时 HTTP 服务器的端口号 |
HASS_MOCK | 不 | 错误的 | 设置为“true”时,启用模拟数据模式,以便在没有 Home Assistant 连接的情况下进行测试 |
要获取长期访问令牌:
与 Claude Desktop 一起使用:
~/Library/Application Support/Claude/claude_desktop_config.json
%APPDATA%\Claude\claude_desktop_config.json
如果您正在运行 Home Assistant,只需删除--mock
标志并将HASS_MOCK
设置为false
。
该服务器公开了几个与 Home Assistant 交互的工具:
states
- 查询实体状态lights
- 列出灯光light
- 控制灯光service
- 呼叫家庭助理服务history
- 检索历史实体数据services
- 列出可用的服务config
- 获取 Home Assistant 配置domains
- 列出可用的域error_log
- 获取 Home Assistant 错误日志devices
- 获取 Home Assistant 中的所有设备有关详细使用示例,请参阅docs/hass-mcp.md 。
此服务器需要具有完全访问权限的 Home Assistant 访问令牌。请考虑以下安全建议:
.env
文件的安全,不要将其提交到源代码管理中该项目根据 MIT 许可证获得许可 - 有关详细信息,请参阅LICENSE文件。
This server cannot be installed
hybrid server
The server is able to function both locally and remotely, depending on the configuration or use case.
模型上下文协议服务器允许大型语言模型通过自然语言交互来控制和查询 Home Assistant 智能家居系统。
We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/oleander/home-assistant-mcp-server'
If you have feedback or need assistance with the MCP directory API, please join our Discord server