An open-source MCP server (v0.1.7) for controlling and querying Home Assistant via REST API and WebSocket. It exposes three tool calls: ha_get_state, ha_list_states, and ha_call_service. Communicates over stdin/stdout (stdio transport) and requires Home Assistant long-lived access tokens. Unlike the official Home Assistant MCP server (which may have different tool names or features), hass-mcp is community-maintained and lightweight. It ships TypeScript types and requires Node >=24. Notable: it is a thin wrapper around Home Assistant's REST API; no direct WebSocket control. Prefer running on the same LAN as Home Assistant for security.
npm install hass-mcpNo compatibility data collected yet for this library.
Verified import paths — ran on the pinned version, not inferred.
Initializes and runs hass-mcp programmatically with Home Assistant URL and long-lived access token.
If you need real-time updates, consider using Home Assistant WebSocket API directly or another MCP server that supports subscriptions.
Run the server on the same LAN or behind a secure reverse proxy like Cloudflare Access.
Use ha_get_state to query specific entities instead of listing all states.
Run npm install hass-mcp or pnpm add hass-mcp (requires Node >=24).
Set HASS_TOKEN to a valid long-lived access token from Home Assistant.
Ensure HASS_URL includes protocol and port, e.g., http://homeassistant.local:8123.