ha-mcp MCP工具 是 AI Skill Hub 本期精选MCP工具之一。已获得 2.9k 颗 GitHub Star,综合评分 8.2 分,整体质量较高。我们强烈推荐将其纳入你的 AI 工具库,帮助提升工作效率。
非官方开源MCP服务,为Home Assistant智能家居平台提供MCP协议支持。集成AI模型与家居控制,实现语音交互和智能自动化。适合智能家居爱好者、开发者和寻求家居智能化的用户。
ha-mcp MCP工具 是一款遵循 MCP(Model Context Protocol)标准协议的 AI 工具扩展。通过 MCP 协议,它可以让 Claude、Cursor 等主流 AI 客户端直接访问和操作外部工具、数据源和服务,实现 AI 能力的无缝扩展。无论是文件操作、数据库查询还是 API 调用,都可以通过自然语言在 AI 对话中直接触发,极大提升生产效率。
非官方开源MCP服务,为Home Assistant智能家居平台提供MCP协议支持。集成AI模型与家居控制,实现语音交互和智能自动化。适合智能家居爱好者、开发者和寻求家居智能化的用户。
ha-mcp MCP工具 是一款遵循 MCP(Model Context Protocol)标准协议的 AI 工具扩展。通过 MCP 协议,它可以让 Claude、Cursor 等主流 AI 客户端直接访问和操作外部工具、数据源和服务,实现 AI 能力的无缝扩展。无论是文件操作、数据库查询还是 API 调用,都可以通过自然语言在 AI 对话中直接触发,极大提升生产效率。
# 方式一:通过 Claude Code CLI 一键安装
claude skill install https://github.com/homeassistant-ai/ha-mcp
# 方式二:手动配置 claude_desktop_config.json
{
"mcpServers": {
"ha-mcp-mcp--": {
"command": "npx",
"args": ["-y", "ha-mcp"]
}
}
}
# 配置文件位置
# macOS: ~/Library/Application Support/Claude/claude_desktop_config.json
# Windows: %APPDATA%/Claude/claude_desktop_config.json
# 安装后在 Claude 对话中直接使用 # 示例: 用户: 请帮我用 ha-mcp MCP工具 执行以下任务... Claude: [自动调用 ha-mcp MCP工具 MCP 工具处理请求] # 查看可用工具列表 # 在 Claude 中输入:"列出所有可用的 MCP 工具"
// claude_desktop_config.json 配置示例
{
"mcpServers": {
"ha-mcp_mcp__": {
"command": "npx",
"args": ["-y", "ha-mcp"],
"env": {
// "API_KEY": "your-api-key-here"
}
}
}
}
// 保存后重启 Claude Desktop 生效
Breaking change (v7.3.0): ha_config_set_yaml has been moved to beta.
# The Unofficial and Awesome Home Assistant MCP Server
<p align="center"> <img src="https://img.shields.io/badge/tools-87-blue" alt="95+ 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>A comprehensive Model Context Protocol (MCP) server that enables AI assistants to interact with Home Assistant.<br> Using natural language, control smart home devices, query states, execute services and manage your automations.</em> </p> </div>
---

---
| Category | Capabilities |
|---|---|
| **🔍 Search** | Fuzzy entity search, deep config search, system overview |
| **🏠 Control** | Any service, bulk device control, real-time states |
| **🔧 Manage** | Automations, scripts, helpers, dashboards, areas, zones, groups, calendars, blueprints |
| **📊 Monitor** | History, statistics, camera snapshots, automation traces, ZHA devices |
| **💾 System** | Backup/restore, updates, apps, device registry |
| **🔒 Safety** | Read Only Mode toggle, per-tool enable/disable, tool security policies (user approval), automatic edit backups |
<details>
<summary><b>Complete Tool List (87 tools)</b></summary>
| Category | Tools |
|---|---|
| **Apps (add-ons)** | ha_get_app, ha_manage_app |
| **Areas & Floors** | ha_list_floors_areas, ha_remove_area_or_floor, ha_set_area_or_floor |
| **Assist** | ha_manage_pipeline |
| **Automations** | ha_config_get_automation, ha_config_remove_automation, ha_config_set_automation |
| **Blueprints** | ha_manage_blueprints |
| **Calendar** | ha_config_get_calendar_events, ha_config_remove_calendar_event, ha_config_set_calendar_event |
| **Camera** | ha_get_camera_image |
| **Dashboard** | ha_get_dashboard_screenshot *(beta)* |
| **Dashboards** | ha_config_delete_dashboard_resource, ha_config_delete_dashboard, ha_config_get_dashboard, ha_config_list_dashboard_resources, ha_config_set_dashboard_resource, ha_config_set_dashboard |
| **Developer** | ha_dev_manage_server, ha_dev_manage_settings |
| **Device Registry** | ha_get_device, ha_remove_device, ha_set_device |
| **Energy** | ha_manage_energy_prefs |
| **Entity Registry** | ha_get_entity_exposure, ha_get_entity, ha_remove_entity, ha_set_entity |
| **Files** | ha_delete_file *(beta)*, ha_list_files *(beta)*, ha_read_file *(beta)*, ha_write_file *(beta)* |
| **Groups** | ha_config_list_groups, ha_config_remove_group, ha_config_set_group |
| **HACS** | ha_get_hacs_info, ha_manage_hacs |
| **Helper Entities** | ha_config_list_helpers, ha_config_set_helper, ha_remove_helpers_integrations |
| **History & Statistics** | ha_get_automation_traces, ha_get_history, ha_get_logs |
| **Integrations** | ha_get_integration, ha_get_system_health, ha_set_integration |
| **Labels & Categories** | ha_config_get_category, ha_config_get_label, ha_config_remove_category, ha_config_remove_label, ha_config_set_category, ha_config_set_label |
| **Matter** | ha_manage_radio |
| **Scenes** | ha_config_get_scene, ha_config_remove_scene, ha_config_set_scene |
| **Scripts** | ha_config_get_script, ha_config_remove_script, ha_config_set_script |
| **Search & Discovery** | ha_get_overview, ha_get_state, ha_search |
| **Service & Device Control** | ha_bulk_control, ha_call_event, ha_call_service, ha_get_operation_status, ha_list_services |
| **System** | ha_config_get_yaml *(beta)*, ha_config_set_yaml *(beta)*, ha_manage_backup, ha_manage_custom_tool *(beta)*, ha_manage_security_policy, ha_manage_theme, ha_manage_updates, ha_reload_core, ha_restart |
| **Todo Lists** | ha_get_todo, ha_remove_todo_item, ha_set_todo_item |
| **Utilities** | ha_eval_template, ha_report_issue |
| **Zones** | ha_get_zone, ha_remove_zone, ha_set_zone |
</details>
---
These run the server outside Home Assistant — useful for Container / Core installs (which can't run apps) or a separate host. The Setup Wizard generates the exact client-specific config for each.
ghcr.io/homeassistant-ai/ha-mcp in HTTP mode, pointed at your Home Assistant URL and a long-lived token, and connect your client to its secret URL. See the Setup Wizard for the full command and per-client config.ha-mcp package with uvx ha-mcp@latest (or pip) as a streamable-HTTP server the same way. Details in the Setup Wizard.⚠️ stdio has known transport issues. The stdio transport has connection problems that streamable HTTP does not (#1713). It is recommended only for demo/testing tinkering — for a real setup, use the custom component or an HTTP method above.
<details> <summary><b>🌐 Remote access (Nabu Casa / Webhook Proxy app / OpenAI Tunnel)</b></summary>
Using the HA-MCP custom component? You do not need the Webhook Proxy — the component has its own built-in webhook for remote access (see the Get Started quick start at the top). The proxy is for the app (it can also front another external server via its mcp_server_url option). The OpenAI Tunnel below is different: it applies to any install method when Home Assistant isn't publicly reachable at all (no Nabu Casa or reverse proxy).
Already have Nabu Casa or another reverse proxy pointing at your Home Assistant? The Webhook Proxy app routes MCP traffic through your existing setup — no separate tunnel or port forwarding needed.
1. Install the MCP Server app (see above) and the Webhook Proxy app from the same store 2. Start the webhook proxy and restart Home Assistant when prompted 3. Copy the webhook URL from the app logs:
MCP Server URL (remote): https://xxxxx.ui.nabu.casa/api/webhook/mcp_xxxxxxxx
4. Configure your AI client with that URL
For other remote access methods (Cloudflare Tunnel, custom reverse proxy), see the Setup Wizard.
ChatGPT / Codex behind a firewall (OpenAI Tunnel). ChatGPT connectors normally require a publicly reachable URL. If you can't (or don't want to) expose one, the community OpenAI Tunnel for HA-MCP integration by @norpol runs OpenAI's tunnel-client inside Home Assistant and connects your local MCP server URL to an OpenAI-hosted tunnel over an outbound-only connection — no port forwarding, reverse proxy, or public URL. Point it at your ha-mcp URL, then attach the ChatGPT connector to the same tunnel ID. See the FAQ entry and #1811.
</details>
Claude Code, Gemini CLI, ChatGPT, Open WebUI, VSCode, Cursor, and more.
<p> <a href="https://homeassistant-ai.github.io/ha-mcp/setup/"><img src="https://img.shields.io/badge/Open_Setup_Wizard-4A90D9?style=for-the-badge" alt="Open Setup Wizard" height="40"></a> </p>
Having issues? Check the FAQ & Troubleshooting
---
Install the HA-MCP File & YAML Tools entry from the same HA-MCP Custom Component:
To add manually: open HACS > Integrations > three-dot menu > Custom repositories > add https://github.com/homeassistant-ai/ha-mcp-integration (category: Integration) > Download. Or copy custom_components/ha_mcp_tools/ from this repository into your HA config/custom_components/ directory.
After installing, restart Home Assistant, then open Settings > Devices & Services > Add Integration, search for HA-MCP Custom Component, and add the HA-MCP File & YAML Tools entry.
To run the full ha-mcp server in-process through this same component, see the Get Started section at the top and the full in-process server documentation →.
---
Want to try ha-mcp before connecting your own Home Assistant? No paid subscription required. These one-command scripts set up a local stdio connection to a hosted demo environment so you can see it working in a few minutes. Each script's Connect your own Home Assistant link then shows how to point it at your instance.
<details> <summary><b>🍎 macOS</b></summary>
1. Go to claude.ai and sign in (or create a free account) 2. Open Terminal and run:
curl -LsSf https://raw.githubusercontent.com/homeassistant-ai/ha-mcp/master/scripts/install-macos.sh | sh
3. Download Claude Desktop (or restart: Claude menu → Quit) 4. Ask Claude: "Can you see my Home Assistant?"
You're now connected to the demo environment! Connect your own Home Assistant →
</details>
<details> <summary><b>🐧 Linux</b></summary>
Anthropic doesn't ship Claude Desktop for Linux, so pick one path:
Claude Desktop — free, via the community build:
1. Install the community Claude Desktop for Linux build and sign in with a free claude.ai account 2. Open Terminal and run:
curl -LsSf https://raw.githubusercontent.com/homeassistant-ai/ha-mcp/master/scripts/install-linux.sh | sh
3. Restart Claude Desktop, then ask: "Can you see my Home Assistant?"
Claude Code — official CLI, requires a paid Claude plan:
1. Install Claude Code: curl -fsSL https://claude.ai/install.sh | bash 2. Configure ha-mcp, then run claude:
curl -LsSf https://raw.githubusercontent.com/homeassistant-ai/ha-mcp/master/scripts/install.sh | sh -s -- --claude-code
3. Start claude, run /mcp to confirm, then ask: "Can you see my Home Assistant?"
</details>
<details> <summary><b>🪟 Windows</b></summary>
1. Go to claude.ai and sign in (or create a free account) 2. Open Windows PowerShell (from Start menu) and run:
irm https://raw.githubusercontent.com/homeassistant-ai/ha-mcp/master/scripts/install-windows.ps1 | iex
3. Download Claude Desktop (or restart: File → Exit) 4. Ask Claude: "Can you see my Home Assistant?"
You're now connected to the demo environment! Connect your own Home Assistant →
</details>
The HA-MCP Custom Component also powers a set of privileged tools that standard Home Assistant APIs can't provide: file system access and YAML config editing. (The same component runs the full server in-process — that's the recommended install in the Get Started section at the top.) Its File & YAML services entry (HA-MCP File & YAML Tools) enables the tools below.
Tools that require the component:
| Tool | Description |
|---|---|
ha_config_set_yaml *(beta)* | Safely add, replace, or remove top-level YAML keys in configuration.yaml and package files (automatic backup, validation, and config check) |
ha_list_files *(beta)* | List files in allowed directories |
ha_read_file *(beta)* | Read files from allowed paths (config YAML, logs, and allowed directories) |
ha_write_file *(beta)* | Write files to allowed directories |
ha_delete_file *(beta)* | Delete files from allowed directories |
All other tools work without the component. These five return an error with installation instructions if the component is missing.
These tools also require beta feature flags. See Beta Features for how to enable them — including the ENABLE_BETA_FEATURES master flag, which must be on before the filesystem/YAML sub-flags take effect.
Home Assistant ships its own MCP Server integration. It is built on the Assist pipeline, so a connected MCP client can read and control the entities you have exposed to Assist and run the intents Assist understands — handy for voice-style control of already-exposed devices.
ha-mcp is a standalone server built for configuring, building, and debugging your smart home, not just controlling it. On top of device control, it adds capabilities the built-in integration does not have:
| Capability | Built-in MCP Server | ha-mcp |
|---|---|---|
| Control exposed devices, query states | Yes | Yes |
| Entity scope | Only entities exposed to Assist | Everything in Home Assistant |
| Create / edit automations, scripts, scenes | No | Yes |
| Build & edit dashboards | No | Yes |
| Debug automations from traces, read history & logs | No | Yes |
| Manage helpers, areas, zones, labels, groups | No | Yes |
| Backups, apps, HACS, device & entity registry | No | Yes |
Rule of thumb: Use the built-in integration for voice-style control of devices you have already exposed; use ha-mcp when you want an AI assistant that can also build and maintain your Home Assistant setup.
---
高质量的MCP实现,星标认可度高。连接AI与智能家居,实用价值显著,社区维护活跃,值得关注。
AI Skill Hub 为第三方内容聚合平台,本页面信息基于公开数据整理,不对工具功能和质量作任何法律背书。
建议在沙箱或测试环境中充分验证后,再部署至生产环境,并做好必要的安全评估。
✅ MIT 协议 — 最宽松的开源协议之一,可自由商用、修改、分发,仅需保留版权声明。
经综合评估,ha-mcp MCP工具 在MCP工具赛道中表现稳健,质量优秀。如果你已有明确的使用需求,可以直接上手体验;如果还在评估阶段,建议对比同类工具后再做决策。
| 原始名称 | ha-mcp |
| 原始描述 | 开源MCP工具:The Unofficial and Awesome Home Assistant MCP Server。⭐2.9k · Python |
| Topics | 智能家居MCP协议Home Assistant家居自动化Python |
| GitHub | https://github.com/homeassistant-ai/ha-mcp |
| License | MIT |
| 语言 | Python |
收录时间:2026-05-17 · 更新时间:2026-05-19 · License:MIT · AI Skill Hub 不对第三方内容的准确性作法律背书。
选择 Agent 类型,复制安装指令后粘贴到对应客户端