Back to MCP directory
publicPublicdnsLocal runtime

allenporter_mcp-server-home-assistant

一个为Home Assistant设计的模型上下文协议服务器,通过自定义组件实现与Claude桌面客户端的集成

article

README

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

本项目旨在为家庭助手创建一个模型上下文协议服务器。若你想了解相关背景信息,可参阅模型上下文协议

🚀 快速开始

在Claude桌面中的使用方法

  1. 在你的家庭助手实例中安装家庭助手模型上下文协议自定义组件。
  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.....
            }
        }
    }
}
  1. 你可以查看日志,例如~Library/Logs/Claude/mcp-server-Home-assistant.log以了解正在发生的事情。
help

Runtime guide

cloud

Hosted runtime

Hosted servers run from a provider-managed environment. You usually connect the MCP client to the hosted endpoint or follow the provider's authorization flow, without keeping a local process alive

  1. Open provider connection page
  2. Authorize or copy endpoint
  3. Connect from your MCP client
terminal

Local runtime / other methods

Local servers run on your own machine or infrastructure. You normally copy the server_config into your MCP client, install the required package, and provide env variables from env_schema when needed

  1. Copy server_config
  2. Install required package
  3. Fill env variables and restart client