
Home Assistant Mcp
io.github.Coolver由 GitHub 帳號 Coolver 發布v3.2.12更新於 Nov 10, 2026
Vibecode your Home Assistant setup from your IDE: automations, dashboards, themes and configs
概覽
讓 AI 助理透過搭配的附加元件讀取與修改 Home Assistant 設定,包括自動化、指令碼、儀表板、主題與 HACS 整合。
- 可以做什麼
- 這是一個本機 MCP 伺服器,把支援 MCP 的 IDE 連接到執行於 Home Assistant 上的 Vibecode Agent 附加元件。透過該代理,它可以讀取設定、實體、裝置與現有自動化邏輯;建立與重構自動化、指令碼、輔助元素與感測器;以程式方式建立與調整 Lovelace 儀表板與主題;分析日誌以排查問題;並安裝或更新 HACS 整合與自訂儲存庫。變更會在裝置上部署,並具備以 Git 為基礎的版本管理、驗證與回復機制。
- 適用情境
- 適合想用自然語言在 AI IDE 中管理 Home Assistant、而不想手動編輯 YAML 的使用者;也適合讓助理充當自己撰寫的自動化的維運幫手,負責上傳變更、執行測試與查看日誌。
- 執行需求
- 在執行 IDE 的電腦上安裝 Node.js v20 或更高版本(建議 v24 LTS),而不是裝在 Home Assistant 主機上。需要執行中的 Home Assistant,並已安裝並啟動 HA Vibecode Agent 附加元件。需要兩個環境變數:HA_AGENT_URL(代理位址,預設 HA_AGENT_KEY(首次啟動時產生的代理金鑰)。IDE 所在機器需能連線到代理連接埠。
安裝
在 SourceWeft 中
- 開啟 儀表板中的 Home Assistant Mcp,將其新增到工作區。
- 為需要使用其工具的對話啟用該服務。
Desktop only,透過 STDIO。 STDIO 服務會啟動本機處理程序,因此需要 SourceWeft 桌面主機。
其他 MCP 客戶端
參照 儲存庫 中的啟動說明。
README
Home Assistant Vibecode MCP
⚙️ This MCP server works together with the
Home Assistant Vibecode Agent,
installed as a Home Assistant add-on.
The agent runs on your Home Assistant instance and provides “eyes and hands” for AI IDEs like Cursor, VS Code, Claude Code, or any other MCP-enabled IDE.
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!
Example: "Install smart climate control for my radiators" → AI creates 10+ automations, helpers, sensors, and scripts optimized for YOUR TRVs.
Built on Model Context Protocol and powered by HA Vibecode Agent.
✨ Key Features
🔍 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.
📋 Prerequisites
Before installing, you need:
- Home Assistant running (any version)
- HA Vibecode Agent v2.2.0+ installed as add-on
- Agent Key from HA Vibecode Agent (auto-generated on first start)
- AI-enabled editor installed (Cursor, VS Code + GitHub Copilot, Claude Code etc)
🚀 Quick Start (5 minutes)
Step 0: Install Node.js (if not already installed)
The MCP server requires Node.js to run on your computer (where your AI editor is installed):
- Check if Node.js is already installed: open terminal and run
node --version - If not installed or version is below v20.0.0, download and install from nodejs.org (use the 24.x LTS build when possible)
- After installation, verify:
node --versionshould show v20.0.0 or higher (v24 LTS recommended) - Important: Install Node.js on the computer where your AI editor runs, not on the Home Assistant server
Step 1: Install HA Vibecode Agent
Install the agent in your Home Assistant from :
- Go to Settings → Add-ons → Add-on Store
- Click ⋮ → Repositories
- Add:
https://github.com/Coolver/home-assistant-vibecode-agent - Install HA Vibecode Agent (v2.0.0+)
- Start the agent
Step 2: Setup MCP in Your AI Editor
Get configuration from Home Assistant:
- Open your Home Assistant (usually http://homeassistant.local:8123)
- Go to Settings → Add-ons → HA Vibecode Agent
- Click "Open Web UI" button
- 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 GitHub Star ⭐
Step 3: Test Connection
Verify everything works:
Open your AI editor (Cursor, VS Code, etc) and send this message to AI:
If AI successfully returns your entities and agent status, you're all set! ✅
Troubleshooting: If connection fails:
- Check that HA Vibecode Agent is running
- Ensure your AI editor was fully restarted
- Verify configuration was pasted correctly
Step 4: Start Building!
Just describe what you want in natural language - AI will handle the rest!
🔧 Configuration
Environment Variables
Custom Agent URL
If your agent runs on a different URL:
🐛 Troubleshooting
"Invalid Agent Key" error
- Check your Agent Key is correct in
mcp.json(underHA_AGENT_KEY) - Regenerate key if needed: Settings → Add-ons → HA Vibecode Agent → Open Web UI
- Make sure HA Vibecode Agent is running
- Verify agent is accessible:
curl http://homeassistant.local:8099/api/health
"Connection refused"
- Check HA Vibecode Agent is started in Home Assistant
- Verify the URL in
HA_AGENT_URL - Make sure port 8099 is not blocked by firewall
"spawn npx ENOENT" error
This error means Node.js is not installed or not found in your system PATH.
Solution: Install Node.js (v20.0.0 or higher; v24 LTS recommended) 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 --versionin a terminal
Important: Node.js must be installed on your computer (where Cursor, VS Code, Claude or other IDE runs), not on the Home Assistant server.
🔐 Security
- ✅ All communication goes through HA Vibecode Agent (port 8099)
- ✅ Agent Key authentication for MCP clients
- ✅ Agent validates Agent Key for all requests
- ✅ Agent uses internal SUPERVISOR_TOKEN for Home Assistant API operations
- ✅ Your Agent Key is stored only in local IDE config file
- ⚠️ Never commit
mcp.jsonwith your Agent Key to git!
🤝 Related Projects
- HA Vibecode Agent - Home Assistant add-on (required)
- Model Context Protocol - Protocol specification
📝 License
MIT © Vladimir Eremeev
🔧 Development
Project Structure
Architecture
MCP Server (index.ts) ← Communication Protocol
↓
Tool Handlers (handlers.ts) ← Business Logic
↓
HA Client (ha-client.ts) ← HTTP API Wrapper
↓
HA Vibecode Agent (https://github.com/Coolver/home-assistant-vibecode-agent) (REST API) ← Home Assistant Integration
🙏 Contributing
Contributions are welcome! Please feel free to submit a Pull Request.
- Fork the repository
- Create your feature branch (
git checkout -b feature/AmazingFeature) - Commit your changes (
git commit -m 'Add some AmazingFeature') - Push to the branch (
git push origin feature/AmazingFeature) - Open a Pull Request
💬 Support
- 🐛 Issues: GitHub Issues
- 💡 Discussions: GitHub Discussions
⭐ Show your support
Give a ⭐️ if this project helped you control your smart home with AI!
來源:README.md,提交 cf772dd
工具
0版本歷史
1- v3.2.12最新Sep 16, 2026
評分
已滿足適用檢查項的 50%
該評分衡量此收錄條目的完整程度,依據註冊中心條目、端點與公開來源計算得出。它不是對伺服器本身的評價,也不表示伺服器安全或目前可用:可連通性是帶日期的檢查結果,評分也不包含安裝量或使用者評價。
- 近 30 天內可連通25 分
請保持端點能夠回應 MCP 握手;SourceWeft 每 30 天探測一次。
- 已宣告認證方式10 分
請在註冊中心條目中宣告憑證請求標頭,或保持端點能夠回應探測,以便判定其認證方式。
- 已列出工具15 分
請讓伺服器在無憑證時回應 tools/list,或發布可在沙箱中無憑證啟動的軟體包。
- 描述必需15 分
- 圖示10 分
- 文件15 分
- 授權條款10 分