Home Assistant MCP Server

Enables natural language interaction with Home Assistant entities using the Model Context Protocol.

Local serverstdio 5

What is the Home Assistant MCP server?

Enables natural language interaction with Home Assistant entities using the Model Context Protocol. The home assistant mcp server wraps that behind the Model Context Protocol, so an assistant can use it through 10 defined tools rather than through you.

What it actually does

Create a .env file in your current directory with the following variables:

  • Query and control Home Assistant entities via natural language
  • Works with any MCP-compatible client (like Claude Desktop)
  • Provides tools for state management, service calls, history, and more
  • Secure authentication using Home Assistant long-lived access tokens
  • Multiple transport options (stdio for local processes, SSE for remote clients)
  • Demo mode with mock data for testing and demonstration when Home Assistant is not available

Its toolset

Everything the assistant can do here goes through one of these:

  • states — Query entity states
  • lights — List lights
  • light — Control a light
  • service — Call Home Assistant services
  • history — Retrieve historical entity data
  • services — List available services
  • config — Get Home Assistant configuration
  • domains — List available domains
  • error_log — Get Home Assistant error log
  • devices — Get all devices in Home Assistant

Adding it to your client

Setup follows the usual MCP pattern — install or clone the server, register it in your client's configuration file, restart the client.

Configuration

You will need 3 environment variables: HASS_URL, HASS_TOKEN, HASS_MOCK. The server will not start without them, which is usually why the tools fail to appear on a first run. Keep credentials in your client's env block or a secrets manager rather than in a file you might commit.

When to reach for it

Plenty of developer tooling servers cover similar ground. The differences that matter in practice are scope of access and how much setup stands between you and a working tool call. Home Assistant's toolset — states, lights, light and 7 more — is a fair guide to whether it matches your workflow. It is maintained by oleander; worth a glance at recent repository activity before you build anything load-bearing on it.

SyncDev reviews every entry in this directory against the project's own documentation before publishing, and revisits them as servers change.

Caveats

  • 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 10 tools registered it takes up a noticeable share of the context window; turn it off in projects that never touch Home Assistant.
  • Missing credentials fail quietly in some clients — if no tools show up, check the environment block first.
  • MCP clients confirm each tool call by default. Leave that on until you have watched what the home assistant mcp server does with a few real requests.

Available tools

ToolWhat it does
statesQuery entity states
lightsList lights
lightControl a light
serviceCall Home Assistant services
historyRetrieve historical entity data
servicesList available services
configGet Home Assistant configuration
domainsList available domains
error_logGet Home Assistant error log
devicesGet all devices in Home Assistant

Configuration

VariableDescriptionRequired
HASS_URLEndpoint or connection string the server talks to.Yes
HASS_TOKENCredential the server authenticates with.Yes
HASS_MOCKConfiguration value read at startup.Optional

Example prompts to try

  • Use Home Assistant to states.
  • Use Home Assistant to lights.
  • Use Home Assistant to light.

Frequently asked questions

It's a Model Context Protocol (MCP) server that allows you to control and query your Home Assistant smart home using natural language through Large Language Models (LLMs).