mcp-hass
The skill for control Home Assistant smart home devices and query states using MCP protocol.
Security Assessment
About mcp-hass
The mcp-hass skill enables control and monitoring of Home Assistant smart home devices through the Model Context Protocol (MCP). It provides a command-line interface for interacting with your Home Assistant installation, allowing you to query device states, control lights, fans, and other smart home devices without needing to access the Home Assistant web interface or write custom scripts.
This skill supports essential smart home operations including turning devices on/off, adjusting light brightness and colors, controlling fan speeds, and retrieving real-time state information from all connected devices. It uses the mcporter CLI tool to communicate with Home Assistant's MCP server endpoint via HTTP, requiring only a base URL and access token for authentication. The skill supports targeting devices by name, area, or domain for flexible control patterns.
Ideal for users who prefer command-line workflows, automation scripts, or AI-assisted smart home management. Home automation enthusiasts, developers building smart home integrations, and users seeking programmatic control of their Home Assistant setup will benefit from this skill. It's particularly useful for batch operations, scripting repetitive tasks, or integrating smart home controls into larger automation workflows.
FAQ
What are the prerequisites for using this skill?
You need a running Home Assistant instance with the Model Context Protocol integration installed. Navigate to Settings > Devices & services, add the Model Context Protocol integration, and configure the HASS_BASE_URL and HASS_ACCESS_TOKEN environment variables for authentication.
How do I configure the connection to Home Assistant?
Run the configuration command: 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}". Replace the environment variables with your actual Home Assistant URL and access token.
Can I control multiple devices at once?
Yes, you can target devices by area or domain. For example, you can turn off all lights in a specific area using npx -y mcporter call home-assistant.HassTurnOff(area: "Bedroom", domain: ["light"]).
What types of devices can I control?
The skill supports lights (with brightness and color control), fans (with speed percentage), and general on/off devices. Any device exposed through Home Assistant can be queried for state information.
Why should I use npx -y mcporter instead of just mcporter?
Using npx -y mcporter ensures better compatibility by automatically downloading and running the latest version of mcporter without requiring a global installation, and the -y flag skips confirmation prompts.
Install mcp-hass
Quick Setup:
- Copy the skill folder to
.claude/skills/ - Claude will automatically detect and use the skill
Repository
aahl/skills