Skip to main content
Glama

HA Vibecode Agent - Home Assistant Add-on

Version License MCP Package

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):

  1. Go to Settings โ†’ Add-ons โ†’ Add-on Store โ†’ โ‹ฎ โ†’ Repositories (usually http://homeassistant.local:8123/hassio/dashboard )

  2. Add: https://github.com/coolver/home-assistant-vibecode-agent

  3. Click Add

2. Install and Start Add-on

Still in Home Assistant UI:

  1. Refresh the page

  2. Find HA Vibecode Agent โ†’ Click INSTALL

  3. Wait for installation to complete

  4. Enable โ†’ Start on boot: ON โ†’ and push START button

  5. Wait for startup (~10 seconds)

  6. Click "Open Web UI" button

You'll see this interface:

  1. 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.

  2. 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:

Show me all my climate entities and their current states
Analyze my automations and suggest optimizations
Create a smart lighting automation for movie mode

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:

Install a smart climate control system for my TRV radiators. Analyze my current devices, create automations for efficient heating with predictive shutdown, buffer radiators, and adaptive cooldowns. Set up monitoring sensors and dashboard.

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:

My heating wastes energy. Analyze my current climate automations and optimize for efficiency while maintaining comfort.

Debug Issues:

My bedroom lights automation isn't working. Check the logs, find the problem, and fix it.

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

# No auth required for health check curl http://homeassistant.local:8099/api/health

Example response:

{ "status": "healthy", "version": "2.0.1" }

View Agent Logs

curl -H "Authorization: Bearer YOUR_AGENT_KEY" \ http://homeassistant.local:8099/api/logs/?limit=50

View Backup History

curl -H "Authorization: Bearer YOUR_AGENT_KEY" \ http://homeassistant.local:8099/api/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

  1. Always backup before major changes

  2. Check config before reloading

  3. Review logs after operations

  4. Use rollback if something breaks

  5. 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:

  1. Fork the repository

  2. Create a feature branch

  3. Make your changes

  4. 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:

  1. Autonomously install systems - AI reads current config, creates all components, tests

  2. Debug issues - AI reads logs, configs, entity states, fixes problems

  3. Evolve configurations - AI improves automations based on usage patterns

  4. Safe experimentation - Git versioning allows instant rollback

  5. Complete automation - No manual steps required!

Example Workflow

User: "Install smart climate control system" โ†“ AI via Agent: 1. Reads current TRV entities 2. Creates backup 3. Creates 7 input helpers 4. Adds 12 template sensors to configuration.yaml 5. Creates 5 scripts 6. Creates 10 automations 7. Reloads all components 8. Validates installation 9. Shows dashboard YAML for user to add โ†“ User: "Show me the last 10 changes to my configuration" โ†“ AI via Agent: 1. Calls `ha_git_history` to get commit history 2. Displays commits with meaningful messages: - "Add automation: Control lights when motion detected" - "Update theme: Change primary color to blue" - "Add helper: Enable/disable climate system" 3. Shows timestamps and commit hashes 4. Helps identify which changes to review User: "Something broke! Rollback to the version from yesterday" โ†“ AI via Agent: 1. Gets recent commit history 2. Finds commits from yesterday 3. Shows options with descriptions 4. Rolls back to selected version 5. Verifies rollback was successful User: "Rollback to when I added the motion sensor automation" โ†“ AI via Agent: 1. Searches commit history for "motion sensor automation" 2. Finds matching commit 3. Shows commit details 4. Rolls back to that specific version 3. Restarts HA 4. Verifies restoration

โš ๏ธ Important Notes

Git Versioning

  • Creates .git folder in /config if not exists

  • Auto-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 /config

  • Cannot 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 /config

  • Ensure 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_auto setting for auto/manual commit mode

  • View logs for Git errors

  • Ensure /config is writable

๐Ÿ’ฌ Support


๐Ÿ“œ License

MIT License - See LICENSE file


Ready to give your AI full control of Home Assistant? Install now! ๐Ÿš€

-
security - not tested
A
license - permissive license
-
quality - not tested

Latest Blog Posts

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/Coolver/home-assistant-vibecode-agent'

If you have feedback or need assistance with the MCP directory API, please join our Discord server