Skip to main content
Glama
TheWhykiki

hass-mcp

by TheWhykiki

hass-mcp

一个用于控制和查询 Home Assistant 的开源 MCP 服务器

  • 传输方式:stdio

  • 身份验证:Home Assistant 长期访问令牌

  • API:Home Assistant REST API

功能

提供的工具:

  • ha_get_state — 获取实体的状态

  • ha_list_states — 列出所有状态(数据量可能较大)

  • ha_call_service — 调用任何服务

安装

pnpm install
pnpm build

运行

export HASS_URL="http://homeassistant.local:8123"
export HASS_TOKEN="<your long-lived access token>"

pnpm start

在 MCP 客户端中配置

示例(概念性):

{
  "mcpServers": {
    "homeassistant": {
      "command": "npx",
      "args": ["-y", "hass-mcp"],
      "env": {
        "HASS_URL": "http://homeassistant.local:8123",
        "HASS_TOKEN": "..."
      }
    }
  }
}

安全性

  • 请将令牌视为机密信息。

  • 建议在与 Home Assistant 相同的局域网内运行此服务器。

  • 如果您的 HA 位于 Cloudflare Access 之后,请在局域网侧运行此 MCP 服务器。

许可证

MIT

Install Server
A
license - permissive license
A
quality
C
maintenance

Resources

Unclaimed servers have limited discoverability.

Looking for Admin?

If you are the server author, to access and configure the admin panel.

Latest Blog Posts

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/TheWhykiki/hass-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server