hass-mcp
Allows controlling and querying Home Assistant, including getting entity states, listing all states, and calling any service.
Click on "Deploy Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@hass-mcp turn on the living room light"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
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 entityha_list_states— list all states (can be large)ha_call_service— call any service
Related MCP server: mcp-homeassistant
Install
pnpm install
pnpm buildRun
export HASS_URL="http://homeassistant.local:8123"
export HASS_TOKEN="<your long-lived access token>"
pnpm startConfigure 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
Available Tools
13 toolsha_area_lights_offA
Turn off all lights in an area (by area_id).
Inputs: area_id (required), transition.
ha_area_lights_onA
Turn on all lights in an area (by area_id).
Inputs: area_id (required), transition, brightness_pct.
ha_call_serviceC
Call a Home Assistant service (domain/service) with data payload.
Inputs: domain (required), service (required), data.
ha_get_historyC
Fetch history since an ISO time (optionally for an entity).
Inputs: since (required), end, entity_id, minimal_response.
ha_get_logbookA
Fetch logbook entries since an ISO time (optionally for an entity).
Inputs: since (required), end, entity_id.
ha_get_stateB
Get Home Assistant entity state by entity_id.
Inputs: entity_id (required).
ha_light_turn_offB
Turn off a light by entity_id.
Inputs: entity_id (required).
ha_light_turn_onC
Turn on a light by entity_id.
Inputs: entity_id (required).
ha_list_areasA
List Home Assistant areas from the area registry.
Inputs: no named parameters.
ha_list_devicesA
List Home Assistant devices from the device registry.
Inputs: no named parameters.
ha_list_entity_registryA
List Home Assistant entity registry entries.
Inputs: no named parameters.
ha_list_servicesA
List Home Assistant services and their fields.
Inputs: no named parameters.
ha_list_statesA
List Home Assistant entity states (can be large).
Inputs: no named parameters.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 13 tools
Most tools have distinct purposes (get vs list vs control), but ha_call_service can duplicate any service-specific tool like ha_light_turn_on. Descriptions clearly delineate scope, so selection is unambiguous in practice.
All tools share the 'ha_' prefix and snake_case, but the order varies: 'ha_light_turn_on' (noun_verb) vs 'ha_get_state' (verb_noun). This is a minor deviation from a fully consistent pattern.
13 tools is well within the ideal range and matches the server's clear purpose for Home Assistant integration. Each tool covers a meaningful operation without redundancy.
Covers state reads, lists, registries, light control (individual and area), logbook, history, and a generic service caller, so most workflows are possible. Specific controls are limited to lights, but ha_call_service fills the gap for other domains.
Maintenance
Related MCP Connectors
Control your Tesla from your AI assistant - climate, charging, access, and security.
Home energy for AI assistants: live Power flow, Energy history, solar forecast, and device control.
Control your existing Philips lights, Sonos speakers, Roborock vacuums and other supported devices through Port OS cloud. Give ChatGPT, Claude and other MCP-compatible assistants access to the devices you connect. Turn off the living room lights, play music on your speakers, adjust the thermostat, run a vacuum in a room, check a camera snapshot or find a connected tracker. Available actions depend on your linked provider accounts and each device’s supported capabilities. Port OS runs in the cloud; no local server is required. You choose the account, device and capability permissions each assistant receives. Device operations require user OAuth; public tool discovery does not grant device access. Port OS is in alpha. Setup: https://portoperatingsystem.com/docs/getting-started/ Support: https://portoperatingsystem.com/contact/
Interact with the Stitch API using natural language commands.
Related MCP Servers
- AlicenseNot gradedqualityDmaintenanceEnables AI assistants to interact with Home Assistant smart home devices through natural language. Control devices, manage automations, query entity states, and retrieve historical data across your home automation system.1MIT
- AlicenseNot gradedqualityDmaintenanceEnables interaction with Home Assistant through the REST API, allowing users to query states, call services, and manage entities via natural language.53 PyPIMIT
- AlicenseNot gradedqualityDmaintenanceEnables AI assistants to control Home Assistant via natural language, including device control, automation management, and system monitoring.MIT
- FlicenseNot gradedqualityDmaintenanceEnables LLMs to control Home Assistant devices, including lights, switches, and climate devices, through natural language commands.-