家庭助手模型上下文协议服务器

为Home Assistant提供模型上下文协议服务的集成组件,支持与Claude Desktop等应用的无缝连接。

  • by allenporter
  • Python
  • 本地部署
  • 68 星标
  • 更新于
在 GitHub 查看 allenporter/mcp-server-home-assistant

使用说明

mcp服务器家庭助理

家庭助理的模型上下文协议服务器。看 模型上下文协议 为了上下文。

此集成所需的自定义组件将在中移动到Home Assistant Corehttps://github.com/home-assistant/core/pull/134122

在Claude Desktop中的使用

  1. 安装 家庭助理模型上下文协议 Home Assistant实例中的自定义组件

  2. 创建一个 长效访问令牌

  3. 将此git仓库克隆到以下路径 /Users/allen/Development/mcp-server-home-assistant

  4. 编辑您的 claude_desktop_config.json 使用类似这样的内容,并包含您的家庭助理url和api令牌:

    {
        "mcpServers": {
            "Home-assistant": {
                "command": "uv",
                "args": [
                    "--directory",
                    "/Users/allen/Development/mcp-server-home-assistant",
                    "run",
                    "mcp-server-home-assistant",
                    "-v",
                    "-v"
                ],
                "env": {
                    "HOME_ASSISTANT_WEB_SOCKET_URL": "http://localhost:8123/api/websocket",
                    "HOME_ASSISTANT_API_TOKEN": "byJhbVci0iJIUzI1ii1sInR5cCI6IkpXVCJ9.....
                }
            }
        }
    }
    
  5. 您可以查看日志,例如。 ~Library/Logs/Claude/mcp-server-Home-assistant.log 了解正在发生的事情