Allows for the management of the ESPHome add-on, including installation, configuration, and service control through the Supervisor API.
Provides automatic version control for configuration changes, enabling descriptive commit history, diff comparisons, and system rollbacks.
Facilitates the installation of the Home Assistant Community Store (HACS) and management of community integrations, themes, and plugins via GitHub repositories.
Provides deep integration with Home Assistant's REST and WebSocket APIs to manage entities, states, services, automations, scripts, and Lovelace dashboards.
Enables the management of the Node-RED add-on, allowing for installation, configuration, and lifecycle control within the Home Assistant ecosystem.
Supports managing the Zigbee2MQTT add-on, including installation, configuration, and service monitoring to bridge Zigbee devices.
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 Vibecode AgentCreate an automation to turn off all lights and lock the front door at 11 PM"
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.
HA Vibecode Agent - Home Assistant Add-on
Let AI build your Home Assistant automations โ or act as your DevOps for the ones you write by hand. Just describe what you need in natural language. ๐ ๐ค
You describe your goal โ AI inspects your Home Assistant โ designs a custom solution โ and deploys it on-board automatically. ๐
And if you prefer to handcraft your automations and scripts yourself, the agent can simply act as your DevOps and extra pair of hands: quickly uploading your changes, running tests, and analyzing logs on demand. You stay in control and decide how much you delegate to AI and how deep it should go.
Transform the way you manage your smart home. This add-on enables Cursor, Visual Studio Code (VS Code), or any MCP-enabled IDE to:
๐ Analyze your Home Assistant configuration, entities, and devices
๐๏ธ Create intelligent automations, scripts, and complete systems โ including Home Assistant helpers that can be fully managed programmatically
๐จ Design and customize Lovelace dashboards with full control over cards, layouts, and styling
๐๏ธ Create and tweak themes for a personalized UI
๐ Safely deploy changes with automatic Git-based versioning
๐ Monitor and troubleshoot your setup through log analysis
๐ฆ Install and manage HACS integrations and custom repositories
No more manual YAML editing or searching through documentation - just describe what you want in natural language!
Real example: User says "Install smart climate control" โ AI analyzes 7 TRVs, creates 10 automations + 9 helpers + 10 sensors + 5 scripts, deploys everything, and it just works!
https://github.com/user-attachments/assets/0df48019-06c0-48dd-82ad-c7fe0734ddb3
Full YouTube Demo:
๐ฏ What is this?
HA Vibecode Agent is a Home Assistant add-on that exposes a safe on-board REST API and toolset, allowing AI assistants (Cursor, VS Code, Claude, Continue, and any MCP-enabled IDE) to work with your Home Assistant instead of just generating YAML in the dark.
๐ Analyze your setup
โ
Read your full configuration โ entities, automations, scripts, helpers
โ
Understand your devices โ capabilities, relations, and usage patterns
โ
Learn existing logic โ analyze how your current automations and scripts behave
๐๏ธ Build intelligence
โ
Create complete systems โ multiple interconnected automations in seconds
โ
Generate helpers and sensors โ tailored to your actual setup and needs
โ
Write optimized scripts โ based on real entities, areas, and devices
โ
Refactor existing logic โ improve or merge automations instead of starting from scratch
๐ Dashboards & UI
โ
Create and update Lovelace dashboards โ fully programmatically
โ
Add, remove, or rearrange cards โ stat, graphs, history, custom cards, and more
โ
Control layouts and views โ organize rooms, areas, and scenarios
โ
Design and tweak themes โ colors, typography, and styles for a personalized UI
๐ Safe operations
โ
Git-based versioning โ every change is tracked with meaningful commit messages
โ
Human-readable commits โ AI explains what changed and why
โ
Configuration validation โ test before apply to reduce breaking changes
โ
One-click rollback โ revert to a previous state if something goes wrong
โ
Activity log โ full audit trail of what the agent did and when
๐ฆ Extend with the community
โ
Install and configure HACS โ unlock 1000+ community integrations
โ
Search repositories โ themes, plugins, custom components, dashboards
โ
Install integrations โ one-command setup for new HACS components
โ
Keep things fresh โ update all HACS repositories from a single place
Result:
You describe your goal โ AI inspects your Home Assistant โ designs a custom solution โ and deploys it on-board automatically. ๐
๐ How is this different from other MCP modules for Home Assistant?
Most MCP integrations Iโve seen for Cursor, VS Code or Claude work only on your local machine and talk to Home Assistant over SSH and sometimes the REST API.
For serious Home Assistant work, thatโs not really enough:
Home Assistant is not just a bunch of YAML files. It exposes multiple internal APIs, and some of the most important ones are only available from inside HA itself over the WebSocket API.
When you access HA only via SSH, the AI usually has to generate and upload a helper script on every request, then execute it blindly on the host. Since that script can be different every time, each request is a bit of a black box โ more like playing Russian roulette than doing reliable automation.
Because of that, I chose a different architecture.
This project is split into two modules:
Home Assistant Agent (this module) โ runs inside Home Assistant (as an add-on), has native access to all relevant APIs, files and services, and exposes a safe, well-defined interface for external tools.
Home Assistant MCP server โ runs on your computer alongside your AI IDE (Cursor, VS Code, etc.) and talks to the Agent over a controlled API instead of SSH hacks (installation steps below)
This design makes working with Home Assistant faster, more predictable, safer and repeatable. Your AI IDE gets exactly the actions and data it needs โ through a stable API โ instead of constantly inventing ad-hoc scripts and hoping they behave correctly.
๐ Features
๐ Home Assistant Integration
Full access to HA REST API and WebSocket
List all entities and their states
Call any HA service
Reload components (automations, scripts, templates)
Check configuration validity
Real-time state monitoring
๐ Dashboards & Themes
Create and update Lovelace dashboards programmatically
Add, remove, and rearrange cards (stat, graphs, history, custom cards, etc.)
Manage views, layouts, and groups for rooms and areas
Create and tweak themes for fully customized UI appearance
Safely adjust dashboards and themes through AI-driven operations
๐ File Management
List, read, write, append, delete files
Automatic backup before modifications
YAML parsing and validation
Safe path handling (restricted to
/config)
๐ง Component Management
Create/Delete Input Helpers (boolean, text, number, datetime, select)
Create/Delete Automations
Create/Delete Scripts
Automatic reload after changes
๐พ Git Versioning
Automatic commit on every change with meaningful commit messages
AI-generated descriptive messages explaining what and why changed
Backup history (up to 30 commits, configurable)
Automatic cleanup of old commits to prevent repository bloat
View change history โ ask AI to show recent commits with meaningful messages
Easy rollback โ ask AI to rollback to any previous version by description or commit hash
View diffs between versions
Commit messages include operation context (e.g., "Add automation: Control lights when motion detected")
Example AI interactions:
"Show me the last 10 changes to my configuration" โ AI displays commit history with meaningful messages
"Something broke! Roll back to the version from yesterday" โ AI finds and restores previous version
"What changed in the last commit?" โ AI shows detailed diff
"Roll back to when I added the motion sensor automation" โ AI finds and restores that specific commit
๐ก Monitoring & Troubleshooting
Agent logs API with filtering
Operation history
Real-time status
Health check endpoint
System monitoring and analysis
๐ Add-on Management
Complete add-on lifecycle management โ install, configure, and control services!
Install/uninstall add-ons (Zigbee2MQTT, Node-RED, ESPHome, etc.)
Configure add-on options
Start/stop/restart add-ons
Monitor add-on logs
Update add-ons
Powered by Supervisor API
๐ฆ HACS Management
Complete HACS integration via WebSocket โ browse 1000+ custom integrations!
Install HACS automatically from GitHub
Search repositories by name, author, or category
Install integrations, themes, and plugins
Update all installed repositories
View repository details (stars, versions, authors)
Powered by persistent WebSocket connection
โก Quick Start (5 minutes)
1. Add Repository
Open your Home Assistant UI (usually http://homeassistant.local:8123):
Go to Settings โ Add-ons โ Add-on Store โ โฎ โ Repositories (usually http://homeassistant.local:8123/hassio/dashboard )
Add:
https://github.com/coolver/home-assistant-vibecode-agentClick Add
2. Install and Start Add-on
Still in Home Assistant UI:
Refresh the page
Find HA Vibecode Agent โ Click INSTALL
Wait for installation to complete
Enable โ Start on boot: ON โ and push START button
Wait for startup (~10 seconds)
Click "Open Web UI" button
You'll see this interface:
Click the Cursor or VS Code tab (depending on which IDE you want to use with Home Assistant) and follow the setup instructions. Youโll need to install and configure Cursor or VS Code so they can connect to the HA Agent via the MCP protocol.
Thatโs it โ youโre ready to start working with your Home Assistant scripts, automations and dashboards using AI. If you find this project useful and want to support its development, please consider giving it a
YouTube Installation guide: how to install the Home Assistant Cursor Agent
๐ค Using with AI IDE (Cursor, VS Code etc)
This add-on enables AI IDE to autonomously manage your Home Assistant through natural language - no manual copy-pasting needed!
โ ๏ธ Important Disclaimer
This tool is designed for experienced Home Assistant users who understand what they're doing.
โ Always review changes before applying them to production systems
โ ๏ธ AI can accidentally break your configuration if given incorrect instructions or outdated information
๐พ Git versioning is enabled by default - all changes are backed up and can be rolled back
๐ Test in a safe environment first if you're new to AI-driven automation
๐ Verify syntax and compatibility with your Home Assistant version
Use at your own risk. The automatic backup system minimizes risk but doesn't eliminate it.
Start Using
Once connected, just describe what you want in natural language:
AI will autonomously read your configuration, create components, and deploy everything automatically!
That's it! AI IDE will use the MCP protocol to communicate with your Home Assistant.
Learn more: MCP Home Assistant on GitHub | NPM Package
Real-World Examples
Build Smart Climate Control:
AI will autonomously:
Detect all your TRV entities by analyzing Home Assistant
Create 10+ automations for intelligent heating control
Add 9 input helpers for system state management
Generate 10 template sensors for monitoring
Create 5 scripts for boiler and buffer control
Build Lovelace dashboard with all metrics
Test and deploy everything
All tailored to YOUR specific TRVs and configuration!
Optimize Existing System:
Debug Issues:
What Vibecode Agent Can Do
With this add-on and MCP integration, AI IDE can:
โ
Analyze YOUR configuration - detects your actual devices and entities
โ
Create complex systems autonomously - 10+ interconnected automations
โ
Tailored to your setup - uses your specific entity IDs and device capabilities
โ
Automatic backups - every change is Git-versioned with meaningful commit messages
โ
View change history - ask AI to show recent commits and what changed
โ
Easy rollback - ask AI to rollback to any previous version by description or date
โ
Intelligent debugging - reads logs, finds issues, fixes them
โ
Error recovery - can rollback if something goes wrong
โ
End-to-end deployment - from analysis to production
Stop writing YAML manually! Just describe what you want. ๐
๐ API Documentation
For complete API documentation, authentication details, and usage examples, see DEVELOPMENT.md.
Quick access:
Swagger UI:
http://homeassistant.local:8099/docs(when installed)ReDoc:
http://homeassistant.local:8099/redoc(when installed)
๐ Monitoring
Check Agent Health
Example response:
View Agent Logs
View Backup History
๐ก๏ธ Security
Safety Features
โ Path validation - Cannot access files outside
/configโ Authentication required - All endpoints (except health) require token
โ Automatic backups - Git commits before modifications with meaningful commit messages
โ Rollback capability - Restore any previous state
โ Configuration validation - Check before applying
โ Audit logs - Track all operations
Best Practices
Always backup before major changes
Check config before reloading
Review logs after operations
Use rollback if something breaks
Test in dev environment first
๐ง Development
For development setup, project structure, API documentation, and local development instructions, see DEVELOPMENT.md.
๐ค Contributing
Contributions are welcome! If you'd like to contribute:
Fork the repository
Create a feature branch
Make your changes
Submit a pull request
For detailed contribution guidelines, see CONTRIBUTING.md.
๐ฏ Use Cases
For Cursor AI, VS Code + Co-Pilot etc
This add-on enables Cursor AI to:
Autonomously install systems - AI reads current config, creates all components, tests
Debug issues - AI reads logs, configs, entity states, fixes problems
Evolve configurations - AI improves automations based on usage patterns
Safe experimentation - Git versioning allows instant rollback
Complete automation - No manual steps required!
Example Workflow
โ ๏ธ Important Notes
Git Versioning
Creates
.gitfolder in/configif not existsAuto-commits on every change (if enabled)
Meaningful commit messages: AI-generated descriptive messages explaining what and why changed
Examples: "Add automation: Control lights when motion detected", "Update theme: Change primary color to blue"
Messages are generated based on operation context and user-provided descriptions
Stores up to 30 commits (configurable via
max_backups)Automatic cleanup: When reaching max commits, keeps last 20 commits (maintains buffer)
Commit messages include operation details and context
File Operations
All paths are relative to
/configCannot access files outside config directory
Automatic backup before write/delete
YAML validation on parse
Service Calls
Full access to Home Assistant API
Can call any service (lights, climate, system, etc.)
Requires proper entity IDs
๐ Troubleshooting
"spawn npx ENOENT" error (Cursor / VS Code / Other IDE Console)
This error means Node.js is not installed or not found in your system PATH.
Solution: Install Node.js (v18.0.0 or higher) on the computer where Cursor is running:
Download and install Node.js from https://nodejs.org Restart Cursor completely after installation Verify installation by running node --version in a terminal Important: Node.js must be installed on your computer (where Cursor runs), not on the Home Assistant server.
Add-on won't start
Check logs: Supervisor โ HA Vibecode Agent โ Logs
Common issues:
Port 8099 already in use
Invalid configuration
Missing permissions
API returns 401 Unauthorized
Check Agent Key is correct
Regenerate key if needed: Settings โ Add-ons โ HA Vibecode Agent โ Open Web UI
Ensure Authorization header is present
Format:
Authorization: Bearer YOUR_AGENT_KEY
File operations fail
Check file paths are relative to
/configEnsure files exist for read/delete operations
Check YAML syntax for parse errors
Git versioning not working
Git versioning is always enabled in shadow repository (
/config/ha_vibecode_git)Check
git_versioning_autosetting for auto/manual commit modeView logs for Git errors
Ensure
/configis writable
๐ฌ Support
๐ Issues: GitHub Issues
๐ก Discussions: GitHub Discussions
๐ License
MIT License - See LICENSE file
Ready to give your AI full control of Home Assistant? Install now! ๐