ha-mcp项目地址:homeassistant-ai/ha-mcp: The Unofficial and Awesome Home Assistant MCP Server

astrbot项目地址:AstrBotDevs/AstrBot: Agentic IM Chatbot infrastructure that integrates lots of IM platforms, LLMs, plugins and AI features. Your clawdbot alternative. ✨

效果如图:

1.部署astrbot+napcat(docker compose)

mkdir astrbot
cd astrbot
wget https://raw.githubusercontent.com/NapNeko/NapCat-Docker/main/compose/astrbot.yml
sudo docker compose -f astrbot.yml up -d

2.部署ha-mcp

{
  "mcpServers": {
    "Home Assistant": {
      "command": "uvx",
      "args": ["ha-mcp@latest"],
      "env": {
        "HOMEASSISTANT_URL": "http://homeassistant.local:8123",
        "HOMEASSISTANT_TOKEN": "your_long_lived_token"
      }
    }
  }
}

以1panel为例,直接粘贴即可创建一个docker容器部署

3.在astrbot中连接mcp

4.配置模型提供商以及连接相应平台