mcp_ha_xiaozhi
Provides an integration bridge between Xiaozhi (小智) and Home Assistant, enabling AI assistants to control and monitor Home Assistant entities and services.
Click on "Install Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@mcp_ha_xiaozhiturn on the living room lights"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
mcp_ha_xiaozhi
小智官方服务器(虾哥)对接home assistant的mcp server
原理
使用小智官方给的示例代码,结合mcp_proxy,实现小智官方服务器和home assistant的mcp server打通
参数
XIAOZHI_MCP_ENDPOINT:你的小智 MCP 接入点
HA_MCP_ENDPOINT:你的 HA MCP SERVER 地址
API_ACCESS_TOKEN:你的长效 API 令牌
MCP_TRANSPORT:auto、sse 或 streamablehttp,默认 auto
小智 MCP 接入点: 登录小智官方服务器即可获取。
HA MCP SERVER 地址: 可以使用旧版官方 SSE 地址,也可以使用新版 HA-MCP 的 Streamable HTTP 地址。
点击此链接:Home Assistant MCP Server 集成直达安装
或 在 Home Assistant 中,前往 设置 > 设备和服务 > 添加集成。
从列表中选择“模型上下文协议服务器”,并按照屏幕上的说明完成设置。
使用新版 HA-MCP 时,填写设置页面生成的
/private_xxx连接地址,并确保地址末尾没有空格。
长效 API 令牌: 用于授权访问你的 Home Assistant 实例。
访问你的 Home Assistant 账户配置文件设置,进入“安全”选项卡。
创建长期访问令牌。
1.1.0 代理式工具路由
本版本不再把全部 HA 工具压缩后直接发布给小智,也不需要额外的大模型。 桥接器缓存 HA-MCP 的完整工具目录,只向小智后台的模型提供三个循环工具:
ha_discover:根据用户目标发现相关工具和推荐执行流程。ha_get_tool_help:按需读取一个真实 HA 工具的完整参数结构。ha_execute:执行真实 HA 工具,并把结果交回小智模型继续判断。
复杂任务采用“发现 → 查看参数 → 执行 → 根据结果继续”的循环。例如搜索歌曲时,
桥接器会明确引导模型依次查询 music_assistant 服务、获取集成配置条目,最后调用
music_assistant.search,避免把歌曲搜索误判为普通 HA 实体搜索。
启动成功后,日志应出现:
Agentic tool router ready: 78 HA tools cached, exposing 3 loop tools to XiaoZhi小智执行任务时,还会依次出现 Capability discovery、Serving full help 和
Agent loop executing HA tool。这表示后台模型正在持续使用同一组工具结果完成多步任务。
docker运行
docker run -d --name mcp_ha_xiaozhi \
-e XIAOZHI_MCP_ENDPOINT="你的小智MCP接入点" \
-e HA_MCP_ENDPOINT="你的HA MCP SERVER地址" \
-e API_ACCESS_TOKEN="你的长时效API令牌" \
-e MCP_TRANSPORT=auto \
shawn68/mcp_ha_xiaozhihttps://hub.docker.com/r/shawn68/mcp_ha_xiaozhi/
新版 HA-MCP 配置示例
新版 HA-MCP 的连接地址通常是设置页面生成的私密地址,使用 Streamable HTTP:
docker run -d --name mcp_ha_xiaozhi \
-e XIAOZHI_MCP_ENDPOINT="你的小智 MCP 接入点" \
-e HA_MCP_ENDPOINT="http://192.168.1.8:9584/private_xxx" \
-e MCP_TRANSPORT=streamablehttp \
-e API_ACCESS_TOKEN="你的长期访问令牌" \
mcp_ha_xiaozhi:localHA_MCP_ENDPOINT 末尾不要有空格。使用 /private_xxx 私密地址时,完整地址本身就是凭据,请不要公开。
作为 Home Assistant 自定义应用安装
在 Home Assistant 的应用商店中添加本仓库地址:
https://github.com/soonnn1/mcp_ha_xiaozhi-custom找到“小智 MCP Server(新版)”并安装。
在配置中填写小智 MCP 地址和 HA-MCP 私密地址。
MCP_TRANSPORT选择streamablehttp,然后启动应用。
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections. Dates show when Glama detected each change.
No tool schema history has been recorded yet.
This server cannot be installed
Maintenance
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
Related MCP Connectors
MCP server for AI dialogue using various LLM models via AceDataCloud
Hosted MCP server connecting claude.ai, ChatGPT and other AI apps to your own computer
MCP server for Hailuo (MiniMax) AI video generation
MCP server for GLM chat completions using Zhipu AI models via AceDataCloud
Related MCP Servers
- AlicenseBqualityDmaintenanceWraps the SJTU Zhiyuan No.1 API as a local MCP server, allowing direct use of SJTU models in Claude Code and Codex without custom integration scripts.411MIT
- FlicenseNot gradedqualityDmaintenanceA Node.js + TypeScript MCP server that proxies to DeepSeek's Chat, Image, and TTS APIs for conversation, image generation, and text-to-speech.-
- FlicenseAqualityDmaintenanceA lightweight MCP server that lets AI assistants publish notes to Xiaohongshu (Little Red Book) via browser automation. Supports login, image-text note publishing with up to 9 images, and search.41-
- AlicenseAqualityBmaintenanceA self-hosted MCP server for Home Assistant that exposes full control over entity states, service calls, history, templates, and areas via local stdio, enabling AI assistants to manage your smart home.991MIT
Latest Blog Posts
- Who's Calling? MCP Hosts Are an Identity Blind Spot (And the Spec Knows It)By Om-Shree-0709 on .mcpAgent IdentityOAuth 2.1
- Your AI Chatbot Just Exposed Your CEO's Salary to an InternBy Om-Shree-0709 on .Agent IdentityMCP SecurityOAuth Delegation
- Why MCP Servers Need Execution Sandboxing (And Why Your Current Stack Isn't Enough)By Om-Shree-0709 on .Agentic AiPrompt InjectionWebAssembly
MCP directory API
We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/soonnn1/mcp_ha_xiaozhi-custom'
If you have feedback or need assistance with the MCP directory API, please join our Discord server