MCP Homeassistant logo

MCP Homeassistant

Access Home Assistant configuration, entities, services, history, calendars, and actions through MCP.

Install MCP Homeassistant

Pick your client, then add it in one click or paste the config.

STDIOPython
~/Library/Application Support/Claude/claude_desktop_config.json
claude_desktop_config.json
{
  "mcpServers": {
    "mcp-homeassistant": {
      "command": "uvx",
      "args": [
        "mcp-homeassistant"
      ],
      "env": {
        "HA_URL": "YOUR_VALUE_HERE",
        "HA_TOKEN": "YOUR_VALUE_HERE"
      }
    }
  }
}

Settings → Developer → Edit Config, merge this into mcpServers, then fully quit and reopen Claude Desktop.

Values are written into the snippet above so you can paste it as is. They never leave your browser.

We couldn’t confirm it starts correctly

We ran the install command but it didn't respond within our test window — this can mean a slow first-time install rather than a real problem.

uvx mcp-homeassistant

Process exited before answering initialize.

This is an experimental automated check and can have false negatives — missing environment variables, a slow cold install, etc. It doesn’t necessarily mean something’s wrong. Last checked 1d ago.

Overview

The mcp-homeassistant MCP server connects MCP clients to the Home Assistant REST API for reading system data and performing supported actions. It provides tools for entity states, services, events, templates, history, logbook entries, calendars, configuration, and error information, along with resources for commonly queried data. Reach for it when an agent needs to inspect or operate a Home Assistant instance using a URL and long-lived access token.

Use cases

  • Inspect entity states and Home Assistant configuration
  • Call Home Assistant services from an MCP client
  • Query state history and logbook entries
  • Render Jinja templates or handle intents
  • Review calendars and upcoming calendar events

Key features

  • Home Assistant REST API access
  • Entity state reads and mutations
  • Service calls and custom events
  • History, logbook, and calendar queries
  • Jinja template rendering
  • Configuration validation and diagnostics

Tools19

What MCP Homeassistant lets your agent do. Expand a tool for its parameters.

Self-reported~171 tokens of context

Security & health

What it can reach and how reliably it runs — from our own checks, not the maintainer’s claims.

ActiveLast checked 2d ago

Recent health check succeeded.

5/5 checks healthy over the last 42d

Supply-chain signal

No high-severity advisories surfaced by our automated scan.

Critical 0High 0Medium 0Low 0

Scanned 7h ago via OSV.dev · mcp-homeassistant (PyPI)

Adoption & maintenance

Factual signals from GitHub, npm, and our automated checks — not a rating.

Last commit6mo agoMost recent push to the default branch.
Install checkInconclusiveDidn't respond in our test window — often a slow first install.
Tools exposed19Callable tools this server registers over MCP.
Directory activity3 viewsConfig copies, upvotes, and views on AllMCPs.

How MCP Homeassistant works

What mcp-homeassistant MCP server does

The mcp-homeassistant MCP server exposes Home Assistant REST API operations as MCP tools. It supports both inspection and mutation: an agent can read configuration, loaded components, event types, available services, entity states, historical changes, logbook entries, calendars, and error logs. It can also update or create an entity state, delete a state, call a Home Assistant service, fire a custom event, render a Jinja template, validate configuration.yaml, or handle an intent.

The package also publishes four Home Assistant resources: the current configuration, all entity states, available services, and loaded components. These resources provide fixed MCP addresses for frequently accessed information in addition to the callable tools.

How it works

The MCP process uses the Home Assistant REST API at the configured address and authenticates with a long-lived access token. Tool calls map to Home Assistant operations such as retrieving states, invoking services, rendering templates, and querying history. The available operations cover API status, configuration, components, events, services, states, calendars, and diagnostic data.

The server is started as the mcp-homeassistant command after installation. An MCP client can then use the exposed tools and resources, while Home Assistant remains the system that stores entity data and executes service calls.

Setup and configuration

Install the package from PyPI with:

Terminal
pip install mcp-homeassistant

Set HA_TOKEN to a Home Assistant long-lived access token. Set HA_URL to the Home Assistant base URL when the instance is not available at the default http://localhost:8123 address. For example:

server.ts
export HA_URL="http://homeassistant:8123"
export HA_TOKEN="your_long_lived_access_token"
mcp-homeassistant

The token is required. HA_URL is optional because the server supplies a localhost default. The configured URL must be reachable from the environment where the process runs.

Tools and capabilities

Available tools include:

  • Check API availability and retrieve Home Assistant configuration.
  • List components, event types, services, calendars, and calendar events.
  • Read all entity states or inspect one specific entity.
  • Create or update a state, or delete a state.
  • Call services and fire custom events.
  • Render Jinja templates and handle intents.
  • Query state history and logbook entries.
  • Validate configuration.yaml and retrieve the error log.

Limitations and notes

The provided configuration exposes a URL and token but does not document additional authentication methods, client-specific setup, or filtering options for the individual tools. Actions that change state or call services depend on the permissions and behavior of the connected Home Assistant instance.

Reviews

No reviews yet — be the first to share how it worked for you.

Frequently Asked Questions about MCP Homeassistant

mcp-homeassistant is an MCP server that connects MCP clients to the Home Assistant REST API. Its main tools read configuration, components, events, services, states, history, logbook, calendars, and logs; change states; call services; fire events; render templates; validate configuration; and handle intents. It also exposes configuration, state, service, and component resources.

Install it with `pip install mcp-homeassistant`. After installation, set the required Home Assistant token and optionally set the Home Assistant URL, then start the `mcp-homeassistant` command.

Only `HA_TOKEN` is required. Set it to a Home Assistant long-lived access token. `HA_URL` is optional and defaults to `http://localhost:8123`; set it when Home Assistant uses another address.

It can retrieve all entity states or one specific state, create or update a state, and delete a state. It can also call Home Assistant services, fire custom events, query history, and retrieve logbook entries.

Related MCP servers

Add a badge to your READMEShow it’s listed — live SVG, Markdown or HTML.

AllMCPs Directory Badge

Full Badge Customizer

Showcase your server listing on GitHub or your project documentation. Embed this dynamic SVG badge to highlight official listing status and live engagement.

Badge Style:
Live Dynamic SVG PreviewMCP Homeassistant AllMCPs Directory Badge
Markdown (GitHub README)
[![AllMCPs](https://allmcps.com/api/badge/mcp-homeassistant?style=directory)](https://allmcps.com/mcp/mcp-homeassistant)
HTML Embed
<a href="https://allmcps.com/mcp/mcp-homeassistant"><img src="https://allmcps.com/api/badge/mcp-homeassistant?style=directory" alt="MCP Homeassistant on AllMCPs" /></a>