Skip to main content
Glama
TheWhykiki

hass-mcp

by TheWhykiki

hass-mcp

An open-source MCP server for controlling and querying Home Assistant.

  • Transport: stdio

  • Auth: Home Assistant long-lived token

  • API: Home Assistant REST API

Features

Tools exposed:

  • ha_get_state — get state for an entity

  • ha_list_states — list all states (can be large)

  • ha_call_service — call any service

Install

pnpm install
pnpm build

Run

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

pnpm start

Configure in an MCP client

Example (conceptual):

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

Security

  • Treat tokens as secrets.

  • Prefer running this server on the same LAN as Home Assistant.

  • If your HA is behind Cloudflare Access, run this MCP server on the LAN side.

License

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