Mcp Hass

by aahl47edd621dff4No license162 starsListed Oct 8, 2026Updated Oct 8, 2026Repository updated 3 weeks ago

The skill for control Home Assistant smart home devices and query states using MCP protocol.

Instructions onlyProductivity & Workflow
AI-generated overview

Controls Home Assistant smart home devices and queries their states through the MCP protocol.

What it does
This skill guides an agent in using the mcporter CLI to talk to a Home Assistant MCP server. It covers setup of the MCP integration, configuration of the HASS_BASE_URL and HASS_ACCESS_TOKEN environment variables, and example commands for reading live context and turning devices on or off. It also shows how to set light brightness and color and fan speed, and how to list available tools and schemas.
When to use it
Use it when a user wants to control Home Assistant devices or check their current states from an agent session. It fits requests such as turning lights or fans on and off, adjusting brightness or speed, or inspecting what Home Assistant entities are available.
Requirements
Requires a reachable Home Assistant instance with the MCP server integration enabled, the HASS_BASE_URL and HASS_ACCESS_TOKEN environment variables, and network access to run npx mcporter. No scripts ship with the skill; it is instructions only.

Home Assistant

Control Home Assistant smart home and query states using MCP protocol.

Prerequisites

Enable MCP server in Home Assistant:

  • Browse to your Home Assistant instance.
  • Go to Settings > Devices & services.
  • In the bottom right corner, select the + Add Integration button.
  • From the list, select Model Context Protocol.
  • Follow the instructions on screen to complete the setup.

Config

When prompted that the MCP server does not exist, remind the user to configure the HASS_BASE_URL and HASS_ACCESS_TOKEN environment variables by executing the following command to add the configuration:

shell
npx -y mcporter config add home-assistant \  --transport http \  --url "${HASS_BASE_URL:-http://homeassistant.local:8123}/api/mcp" \  --header "Authorization=Bearer \${HASS_ACCESS_TOKEN}"

Usage

shell
# Get statesnpx -y mcporter call home-assistant.GetLiveContext
# Turn on the devicenpx -y mcporter call home-assistant.HassTurnOn(name: "Bedroom Light")npx -y mcporter call home-assistant.HassTurnOn(name: "Light", area: "Bedroom")
# Turn off the devicenpx -y mcporter call home-assistant.HassTurnOff(name: "Bedroom Light")npx -y mcporter call home-assistant.HassTurnOff(area: "Bedroom", domain: ["light"])
# Control light# brightness: The percentage of the light, where 0 is off and 100 is fully lit.# color: Name of colornpx -y mcporter call home-assistant.HassLightSet(name: "Bedroom Light", brightness: 50)
# Control fan# percentage: The percentage of the fan, where 0 is off and 100 is full speed.npx -y mcporter call home-assistant.HassFanSetSpeed(name: "Fan", area: "Bedroom", percentage: 80)

Execute the following command to learn about specific usage methods:

  • npx -y mcporter list home-assistant --schema --all-parameters

About mcporter

Source and attribution

Source:aahl/skillsinskills/mcp-hassat commit47edd62

License: No license

Content belongs to its original authors. SourceWeft indexes it from a public repository.

Report or request removal