MCP Ha Connect MCP Server

Smart home MCP server for Home Assistant plus Local AI integration

Local serverstdioTypeScript

What is the MCP Ha Connect MCP server?

Smart home MCP server for Home Assistant plus Local AI integration. That is what the mcp ha connect mcp server brings to an AI assistant: the same capability, reachable through the Model Context Protocol rather than a separate app or dashboard.

The short version

A production-ready Model Context Protocol (MCP) server for Home Assistant integration with AI assistants like Claude and LM Studio.

Getting it running

methods on npm is all you need. Most clients run it directly, so configuration is a few lines and a restart.

The tools it exposes

The server publishes 14 tools. What each one is for:

  • getStates — Get all entity states (paginated, 50/page default). Use includeAttributes=true for full data
  • getState — Get the state of a specific entity by entity_id
  • getEntitiesByDomain — Get entities for a domain (paginated, 50/page default). Use includeAttributes=true for full data
  • searchEntities — Search entities by name/entity_id (paginated, 50/page default). Use includeAttributes=true for full data
  • getAllSensors — Get all sensors (paginated, 50/page default). Use includeAttributes=true for full data
  • listEntities — List entities with filtering (domain, state, search, limit). Use includeAttributes=true for full data
  • getDomainSummary — Get summary statistics for a domain
  • getHistory — Get historical data for an entity
  • listPersons — List all household members with location state (home/away)
  • callService — Call any Home Assistant service
  • entityAction — Simple turn_on/turn_off/toggle actions
  • controlLight — Control lights with brightness, color, temperature

What it needs from you

Configuration is passed through the environment: HA_URL, HA_TOKEN, AI_PROVIDER, AI_URL, AI_MODEL, MCP_HTTP_PATH, MCP_HTTP_HEALTHCHECK_PATH, MCP_SSE_EVENTS_PATH. Treat anything key-shaped as a real credential — scope it to the minimum the server needs, and rotate it if it ever lands in a shared config.

  • Node.js 20+ (tested with v20.19.6) - for npm/npx methods - npm 10.8+ (tested with v10.8.2) - for npm/npx methods - Docker (optional) - for Docker method - Home Assistant instance with long-lived access token - Network access to your Home Assistant instance - (Optional) Ollama for AI-powered analysis

Things to watch

  • It runs with your machine's permissions. That is convenient and also the reason to think about what you point it at before you approve a tool call.
  • With 14 tools registered it takes up a noticeable share of the context window; turn it off in projects that never touch MCP Ha Connect.
  • Missing credentials fail quietly in some clients — if no tools show up, check the environment block first.
  • Keep per-call confirmation enabled while you learn its behaviour; it is the cheapest safeguard you have.

How it compares

This sits in the developer tooling group, where several servers overlap in what they claim to do but differ sharply once you actually set them up. MCP Ha Connect's toolset — getStates, getState, getEntitiesByDomain and 11 more — is a fair guide to whether it matches your workflow. It is maintained by coffeerunhobby; worth a glance at recent repository activity before you build anything load-bearing on it.

We check each listing at SyncDev against the project's documentation before it goes live — if something here drifts out of date, it is a bug worth reporting.

Available tools

ToolWhat it does
getStatesGet all entity states (paginated, 50/page default). Use includeAttributes=true for full data
getStateGet the state of a specific entity by entity_id
getEntitiesByDomainGet entities for a domain (paginated, 50/page default). Use includeAttributes=true for full data
searchEntitiesSearch entities by name/entity_id (paginated, 50/page default). Use includeAttributes=true for full data
getAllSensorsGet all sensors (paginated, 50/page default). Use includeAttributes=true for full data
listEntitiesList entities with filtering (domain, state, search, limit). Use includeAttributes=true for full data
getDomainSummaryGet summary statistics for a domain
getHistoryGet historical data for an entity
listPersonsList all household members with location state (home/away)
callServiceCall any Home Assistant service
entityActionSimple turn_on/turn_off/toggle actions
controlLightControl lights with brightness, color, temperature
controlClimateControl thermostats with temperature, HVAC mode
controlMediaPlayerControl media players with playback, volume

How to install the MCP Ha Connect MCP server

### Disable AI Features

```json
{
  "mcpServers": {
    "homeassistant": {
      "command": "npx",
      "args": ["-y", "@coffeerunhobby/mcp-ha-connect"],
      "env": {
        "HA_URL": "http://homeassistant.10.0.0.19.nip.io:8123",
        "HA_TOKEN": "your_token",
        "AI_PROVIDER": "none"
      }
    }
  }
}

Configuration as documented by the project. Restart the client after saving.

Configuration

  • Node.js 20+ (tested with v20.19.6) - for npm/npx methods - npm 10.8+ (tested with v10.8.2) - for npm/npx methods - Docker (optional) - for Docker method - Home Assistant instance with long-lived access token - Network access to your Home Assistant instance - (Optional) Ollama for AI-powered analysis
VariableDescriptionRequired
HA_URLEndpoint or connection string the server talks to.Yes
HA_TOKENCredential the server authenticates with.Yes
AI_PROVIDERConfiguration value read at startup.Optional
AI_URLEndpoint or connection string the server talks to.Yes
AI_MODELConfiguration value read at startup.Optional
MCP_HTTP_PATHFilesystem location the server is allowed to use.Optional
MCP_HTTP_HEALTHCHECK_PATHFilesystem location the server is allowed to use.Optional
MCP_SSE_EVENTS_PATHFilesystem location the server is allowed to use.Optional

Example prompts to try

  • Use MCP Ha Connect to getStates.
  • Use MCP Ha Connect to getState.
  • Use MCP Ha Connect to getEntitiesByDomain.

Frequently asked questions

It connects MCP Ha Connect to MCP-compatible AI assistants such as Claude and Cursor, exposing 14 tools (getStates, getState, getEntitiesByDomain, and more) that the assistant can call on your behalf. Instead of copying data back and forth by hand, the assistant works with MCP Ha Connect directly.