ha-ai
Provides tools for interacting with Home Assistant, enabling AI agents to inspect and configure dashboards, manage automations and scripts, list entities, retrieve logs, and create or restore backups, with visual rendering capabilities for UI validation.
Click on "Install 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., "@ha-aitake a screenshot of my dashboard on mobile viewport"
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.
Home Assistant AI Helper (ha-ai)
Lightweight, paranoid-secure Home Assistant MCP Server and OS Add-on with client-side Playwright visual feedback for autonomous AI agents.
Overview
The ha-ai platform enables autonomous AI coding agents (such as Antigravity, Gemini CLI, Claude Code, OpenCode, and Cursor) to safely inspect, configure, iterate on, and visually validate a remote Home Assistant instance.
Primary Capabilities
šļø Visual Dashboard Iteration: Render Lovelace dashboards headlessly via client-side Playwright, capture full or card-level screenshots across desktop, tablet, and mobile viewports, and visually iterate until UI design is perfected.
ā” Full Lifecycle Automation & Script Authoring: Safely read, write, validate, and trigger automations and scripts with automatic syntax checks and zero-downtime service reloads.
š”ļø Paranoid Security: Strict path jailing within
/config, constant-time API key verification, automatic secret redaction, and zero unauthorized command execution.šŖ¶ Minimal Server Footprint: Lightweight Python FastAPI container running as a Home Assistant OS Add-on (< 35MB RAM, ~0% idle CPU) with zero heavy browser or ML dependencies on the HA host.
š Atomic Snapshots & One-Click Rollback: Automatic pre-edit snapshots created before every file modification, with instant atomic rollback capabilities.
Related MCP server: pagelens
Architecture
flowchart TD
subgraph Workstation["Local Workstation / AI Agent Host"]
Agent["AI Coding Agent<br/>(Antigravity / Claude / OpenCode)"]
MCPServer["Local MCP Server<br/>(TypeScript / Stdio)"]
Renderer["Playwright Browser Engine<br/>(Client-Side Headless)"]
Agent <-->|"Model Context Protocol"| MCPServer
MCPServer -->|"Render Requests"| Renderer
end
subgraph HAHost["Remote Home Assistant OS Instance"]
HACore["Home Assistant Core<br/>(REST & WebSocket APIs)"]
Addon["AI Helper Add-on<br/>(FastAPI / Alpine Container)"]
Storage["HA Filesystem (/config)<br/>- automations.yaml<br/>- ui-lovelace.yaml<br/>- .snapshots/<br/>- home-assistant.log"]
Addon -->|"Mounts rw"| Storage
end
MCPServer <-->|"HTTPS / WSS :8123"| HACore
MCPServer <-->|"HTTP :8099 (X-Addon-API-Key)"| Addon
Renderer -.->|"HTTP/S (Render Web UI)"| HACoreSecurity & Safety Highlights
Security Guard | Implementation | Protection |
Path Traversal Jail |
| Prevents access to |
Constant-Time Auth |
| Eliminates timing-attack vulnerabilities against add-on API authentication. |
Deny-List Protection | File path blocking on | Protects sensitive user credentials and tokens from being read or overwritten. |
Secret Redaction | Regex redaction filters on log streaming | Automatically sanitizes passwords, long-lived tokens, and API keys from tail logs. |
Atomic Pre-Edit Snapshots | Automated | Guarantees safe rollback to the exact prior disk state upon syntax or runtime errors. |
Quickstart
1. Prerequisites
Node.js 20+ and npm installed locally.
Python 3.11+ with
uv(for running add-on tests locally).Running Home Assistant OS instance.
2. Installation & Build
# Clone the repository
git clone https://github.com/sergii-shevchenko-ultimaker/home-assistant-mcp.git
cd home-assistant-mcp
# Install root dependencies
npm install
# Build the TypeScript MCP server
npm run build3. Developer Workflows & Commands
# Local Development: Start Add-on daemon with hot-reloading on :8099
npm run dev:addon
# Local Development: Start MCP server in TypeScript watch mode
npm run dev:mcp
# Run full test suites (TypeScript Vitest & Python Pytest)
npm test
npm run test:addon
# Synchronize versions across all manifests and code atomically
npm run version:bump patch # e.g. 0.1.0 -> 0.1.1
npm run version:bump minor # e.g. 0.1.0 -> 0.2.0
npm run version:bump 1.0.0 # explicit version targetMCP Tools Reference
The server exposes 12 specialized tools under the Model Context Protocol:
š Dashboard Tools
Tool Name | Parameters | Description |
|
| Retrieve Lovelace dashboard configuration via WebSocket or storage file. |
|
| Validate YAML schema, trigger automatic safety snapshot, and commit dashboard updates. |
|
| Render high-resolution PNG screenshot via Playwright (presets: |
āļø Automation & Script Tools
Tool Name | Parameters | Description |
|
| List active automations/scripts with entity IDs, friendly names, and trigger times. |
|
| Fetch the exact YAML definition of a specific automation or script. |
|
| Validate YAML syntax, snapshot file, update automation block, and trigger service reload. |
|
| Manually trigger an automation or script entity to verify execution. |
š ļø System, Diagnostics & Safety Tools
Tool Name | Parameters | Description |
| (none) | Check health and connectivity of both Home Assistant Core and the Add-on daemon. |
|
| Search and filter entities by domain (e.g. |
|
| Retrieve the last $N$ lines of Home Assistant core logs with automatic secret redaction. |
|
| Create a named manual snapshot backup in |
|
| Atomically restore a file from a snapshot ID with safety backup preservation. |
AI Skill Pack (skills/)
This repository includes production-ready AI agent skills:
šØ
ha-dashboard-designer: Standard Operating Procedure for entity discovery, Lovelace card drafting, responsive layout verification, and iterative screenshot-based visual feedback loops.š§
ha-automation-builder: Standard Operating Procedure for drafting automations, validating trigger conditions, safe saving with automatic reloads, and log trace verification.šØ
ha-troubleshooter: Safety SOP for diagnosing integration errors, analyzing sanitized logs, and triggering immediate rollback restorations.
Documentation
For full installation instructions, add-on configuration, agent integration guides (Antigravity, Gemini CLI, Claude Desktop, OpenCode, Cursor), and network architecture details, see:
š Full Installation & Setup Guide
License
This project is licensed under the Apache License, Version 2.0. See LICENSE for details.
This server cannot be installed
Maintenance
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
Related MCP Servers
FlicenseNot gradedqualityCmaintenanceEnables AI agents to capture screenshots and inspect DOM elements from connected browser pages via WebSocket.- AlicenseNot gradedqualityDmaintenanceEnables AI coding agents to visually interact with frontend apps by taking screenshots, clicking elements, reading console logs, and performing visual diffs.3MIT
- AlicenseAqualityBmaintenanceEnables AI coding assistants to visually inspect local web pages by providing screenshots, console errors, and sanitized DOM snapshots.18MIT
- AlicenseNot gradedqualityBmaintenanceEnables AI coding agents to see and interact with real Chrome pages through structured DOM inspection, targeted screenshots, recordings, and human-in-the-loop approvals across major coding-agent hosts.MIT
Related MCP Connectors
Generate images, GIFs, and PDFs from HTML, URLs, or templates ā from your AI agent.
Provides cloud browser automation capabilities using Stagehand and Browserbase, enabling LLMs to iā¦
Live browser debugging for AI assistants ā DOM, console, network via MCP.
Latest Blog Posts
- Who's Calling? MCP Hosts Are an Identity Blind Spot (And the Spec Knows It)By Om-Shree-0709 on .mcpAgent IdentityOAuth 2.1
- Your AI Chatbot Just Exposed Your CEO's Salary to an InternBy Om-Shree-0709 on .Agent IdentityMCP SecurityOAuth Delegation
- Why MCP Servers Need Execution Sandboxing (And Why Your Current Stack Isn't Enough)By Om-Shree-0709 on .Agentic AiPrompt InjectionWebAssembly
MCP directory API
We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/sergii-shevchenko-ultimaker/home-assistant-mcp'
If you have feedback or need assistance with the MCP directory API, please join our Discord server