6,449
Stars
0
Forks
0
Watchers
0
Open Issues
未知
许可证
Python
语言
创建时间
最近更新
项目能做什么
一款 Home Assistant 的 MCP 服务,支持通过 Claude、ChatGPT 等 AI 助手配置和自动化管理智能家居。
来源:AI 基于仓库事实生成
· 内容以仓库实际 README 为准
使用说明 查看原始 README 原仓库文档
项目简介
HA-MCP 是一个基于 FastMCP 构建的 Model Context Protocol(MCP)服务器,旨在让开发者和智能家居用户通过 Claude、ChatGPT 等 AI 助手直接配置和自动化管理 Home Assistant。
项目通过 Home Assistant 集成(Integration)的方式在进程内(in-process)直接运行,全面兼容各类 Home Assistant 部署架构(OS、Supervised、Container 以及 Core)。
注意: 自 v7.3.0 起发生破坏性变更,
ha_config_set_yaml工具已移至 beta 分支。
核心功能
- AI 对话管理家居:通过 Claude Desktop、ChatGPT 等 MCP 客户端控制并自动化 Home Assistant。
- 丰富的工具集:内置 87 个专用工具(Tools),覆盖配置与设备管理。
- 全架构支持:作为集成在 Home Assistant 内部运行,在 OS、Supervised、Container 和 Core 各种部署形态下功能完全对齐。
- 灵活的网络接入:支持基于 Webhook 的远程安全访问,也支持本地局域网(Local network)直连。
适合谁用
- 正在使用 Home Assistant 且希望通过自然语言、大语言模型管理家庭自动化的智能家居玩家与开发者。
- 想要将 Home Assistant 设备状态与控制能力接入 MCP 生态(如 Claude 等客户端)的开发者。
安装步骤
系统要求:需要 Home Assistant 2026.8.0 或更高版本。
- 安装 HA-MCP Integration: - Home Assistant 2026.8 – 2026.10:打开 HACS,搜索 HA-MCP,点击 Download。 - Home Assistant 2026.11 及更新版本:进入 Settings → Marketplace,同意首次运行提示后搜索 HA-MCP,点击 Install。
- 重启 Home Assistant。
- 准备管理员凭据(二选一): - 方式一:在个人主页 → Security → Long-lived access tokens → Create token 生成长期访问凭证(若泄露风险较高,建议使用方式二)。 - 方式二(更安全):进入 Settings → People → Add person 专为 HA-MCP 新建账号,勾选 Allow login、Local access only 和 Administrator。
- 添加并配置集成: - 进入 Settings → Devices & Services → Add Integration,搜索 HA-MCP 并选择 HA-MCP Server。 - 粘贴 Token,或输入刚才为 HA-MCP 创建的专用账号密码。 - 选择客户端连接方式:勾选 Remote access through Home Assistant(初次推荐选择 Secret URL)或 Network access: Local network,点击 Submit。
- 获取接入地址: - 进入 Settings → Devices & Services → “HA-MCP — Manage Home Assistant with AI” → HA-MCP Server → Configure,复制 Connect URL。
- 接入客户端: - 将复制的 Connect URL 粘贴至你的 AI 客户端(如 Claude Desktop)配置中即可完成连接。
配置说明
在集成的 Configure 界面中可以获取对应的 Connect URL:
- 远程访问 / Webhook 形式:https://<your-ha-domain>/api/webhook/<webhook-id>(可通过 Nabu Casa 或反向代理对外暴露;本地局域网为 http://<ha-host>:8123/api/webhook/<webhook-id>)。
- 认证模式:支持 Secret URL(最便捷)或 Home Assistant sign-in(增加登录验证)。
- 客户端与 Home Assistant 处于不同网络设备时,必须在配置中至少启用一种访问模式(默认初始均为禁用)。
常见问题
此部分原文未说明,请查看原仓库。
原始 README 摘录(英文原文,节选前 3000 字符)
> **Breaking change (v7.3.0):** `ha_config_set_yaml` has been moved to [beta](docs/beta.md).
<div align="center">
<img src="https://raw.githubusercontent.com/homeassistant-ai/ha-mcp/master/docs/img/ha-mcp-logo.png" alt="Home Assistant MCP Server Logo" width="300"/>
# HA-MCP — Manage Home Assistant with AI
<!-- mcp-name: io.github.homeassistant-ai/ha-mcp -->
<p align="center">
<img src="https://img.shields.io/badge/tools-87-blue" alt="87 Tools">
<a href="https://github.com/homeassistant-ai/ha-mcp/releases"><img src="https://img.shields.io/github/v/release/homeassistant-ai/ha-mcp" alt="Release"></a>
<a href="https://github.com/homeassistant-ai/ha-mcp/actions/workflows/e2e-tests.yml"><img src="https://img.shields.io/github/actions/workflow/status/homeassistant-ai/ha-mcp/e2e-tests.yml?branch=master&label=E2E%20Tests" alt="E2E Tests"></a>
<a href="LICENSE.md"><img src="https://img.shields.io/github/license/homeassistant-ai/ha-mcp.svg" alt="License"></a>
<br>
<a href="https://github.com/homeassistant-ai/ha-mcp/commits/master"><img src="https://img.shields.io/github/commit-activity/m/homeassistant-ai/ha-mcp.svg" alt="Activity"></a>
<a href="https://github.com/jlowin/fastmcp"><img src="https://img.shields.io/badge/Built%20with-FastMCP-purple" alt="Built with FastMCP"></a>
<img src="https://img.shields.io/python/required-version-toml?tomlFilePath=https%3A%2F%2Fraw.githubusercontent.com%2Fhomeassistant-ai%2Fha-mcp%2Fmaster%2Fpyproject.toml" alt="Python Version">
<a href="https://github.com/sponsors/julienld"><img src="https://img.shields.io/badge/GitHub_Sponsors-☕-blueviolet" alt="GitHub Sponsors"></a>
<a href="https://homeassistant-ai.github.io/ha-mcp/"><img src="https://img.shields.io/badge/Website-docs-teal" alt="Website"></a>
</p>
<p align="center">
<em>Configure and automate Home Assistant with Claude, ChatGPT, and other AI assistants.</em>
</p>
</div>
---

---
## 🚀 Get Started
The recommended way to run ha-mcp is the **HA-MCP integration**. It installs into Home Assistant through HACS (the built-in Marketplace on Home Assistant 2026.11+), runs the full server **in-process**, and works on **every** Home Assistant installation type — Home Assistant OS, Supervised, Container, and Core — with full feature parity. It is the easiest setup in every case: setup asks for an administrator access token and how clients may connect.
**Add it to Home Assistant via HACS or, on Home Assistant 2026.11+, the Marketplace (the preferred install):**
[](https://my.home-assistant.io/redirect/hacs_repository/?owner=homeassistant-ai&repository=ha-mcp&category=integration)
**Quick start:**
> The setup below is for version 9.0.0 (October 28, 2026) and later; earlier versions show a shorter setup form without the adminis
阅读完整原文
商业机会分析 AI 生成
HA-MCP 安全云代理与多端聚合服务
| 产品构想 | 为不愿折腾内网穿透或自建反代的用户,提供端到端加密的托管MCP安全网关,一键连接Claude Desktop/ChatGPT与本地HA实例。 |
| 核心功能 | 端到端加密中继隧道、鉴权与访问控制管理面板、审计日志(防止AI误操作设备)、支持主流AI客户端一键配置。 |
| 目标用户 | 没有公网IP或不想复杂配置反代/Nabu Casa的非硬核智能家居用户。 |
| 难度/周期 | 中等 · 3-5周 · 成本:轻量云服务器与带宽成本、域名与证书解析费用。 |
| 收费模式 | SaaS订阅(月付/年付增值服务)。 |
| 竞争风险 | Home Assistant自带Nabu Casa已具备远程能力,需突出MCP专用权限审计与开箱即用体验以形成差异化。 |
| 依据 | 已验证事实 |
商业智能家居安装商AI运维工作台
| 产品构想 | 面向全屋智能集成商/装维团队,提供跨客户HA实例的MCP运维助手,自动分析日志、一键生成复杂自动化、检测设备健康度。 |
| 核心功能 | 多实例接入与隔离、预置自动化配置模板注入、AI设备故障诊断、客户自动化YAML安全回滚机制。 |
| 目标用户 | 全屋智能工程商、高端家庭影院/智能弱电安装服务商。 |
| 难度/周期 | 高 · 2-3个月 · 成本:多租户系统架构与高可用服务器成本、LLM API调用成本。 |
| 收费模式 | B2B软件席位费或按管理的设备节点数收取年费。 |
| 竞争风险 | B端获客周期较长,企业客户对设备安全与隐私要求极高。 |
| 依据 | AI推测 |
高级智能家居AI自动化工作流市场与插件集
| 产品构想 | 构建与HA-MCP联动的预调优场景Agent与自动化规则库(如复杂节律灯光、动态节能策略、安防联防),通过付费提示词包或插件变现。 |
| 核心功能 | 一键执行的复合场景指令集、节能优化评估报告、复杂传感器融合逻辑生成器、社区模板交易市场。 |
| 目标用户 | 追求高阶生活品质但缺乏时间手写复杂自动化的家庭用户。 |
| 难度/周期 | 低 · 2-3周 · 成本:静态内容托管与简单Web展示成本,几乎零基建开销。 |
| 收费模式 | 一次性买断模板包、付费社区会员或订阅更新制。 |
| 竞争风险 | 通用Prompt容易被复制扩散,盗版防护难度大。 |
| 依据 | 尚需验证的假设 |
AI 基于仓库公开数据分析生成,含推测成分,不构成收益承诺。
报告会保存到 个人中心
竞品与相似项目 GitHub Search 真实检索
| 项目 | 中文简介 | Stars | 语言 |
|---|---|---|---|
| morluto/rea | 基于 Agent 的逆向工程工具,支持从应用行为到原生二进制分析。 | 447,655 | TypeScript |
| openclaw/openclaw | 支持任意操作系统与平台的任务执行型 AI Agent。 | 394,269 | TypeScript |
| obra/superpowers | 实用的 Agent 技能框架与配套软件开发方法论。 | 315,272 | Shell |
| NousResearch/hermes-agent | 一款能够伴随用户共同成长的 AI Agent。 | 262,149 | Python |
| n8n-io/n8n | 具备原生 AI 能力的工作流自动化平台,支持可视化搭建与丰富集成。 | 209,963 | TypeScript |
| firecrawl/firecrawl | 为 AI Agent 抓取和提供网络数据的工具与数据服务平台。 | 200,249 | TypeScript |
以上为通过 GitHub 官方 Search API 检索的相似项目,功能差异与优劣势需进一步人工确认,配置 AI 后可生成对比分析。
项目优势与风险
| 技术成熟度 | 创建于 ,最近推送 ,发布过 100 个 Release |
| 社区活跃 | Star 6,449 / Fork 0 / Issue 0(数据支持,可自行核实) |
| 许可证 | 未检测到(需人工确认) |
| 主要风险 | 上游项目方向可能变化;同赛道竞争者较多(见竞品表);热度与需求不完全等价 |
安装与使用
快速开始(以仓库 README 为准)
git clone https://github.com/homeassistant-ai/ha-mcp.git cd ha-mcp # 请阅读仓库 README 获取确切安装步骤(依赖、配置、启动命令)
术语说明:Docker=应用容器(把程序和依赖打包运行);API Key=调用外部服务的密钥;Git Clone=把仓库代码下载到本地。常见错误:API Key 未配置 / 端口占用 / 数据库连接失败,多数项目在 README 的 Troubleshooting 章节有说明。