The ha-nexus-agent MCP server gives AI assistants comprehensive control over Home Assistant via 227 tools across 24 domains, covering smart home management, automation, configuration, and system administration.
Entity Control
List, get state, turn on/off/toggle, set values, select options, rename, assign to areas, enable/disable entities
Bulk control/bulk-write multiple entities; expose/hide entities to voice assistants (Alexa, Google, Assist)
Services & Events
Call any HA service; fire custom events; render Jinja2 templates; reload domain configurations
Press buttons, control covers, set climate/HVAC modes, set light color/brightness/color temperature
Control media players (play/pause, seek, volume); send standard and persistent notifications
Take camera snapshots and record video clips
Automations, Scripts & Scenes
Full CRUD on automations, scripts, and scenes via YAML; trigger, enable/disable, reload
View execution traces/debug history for automations and scripts
Areas & Devices
List, create, delete areas; list floors and all devices
Get entities/states within an area; bulk control all entities of a domain in an area
Helpers & Timers
Set input_boolean, input_number, input_text, input_select, input_datetime; increment/reset counters; start/cancel timers
Dashboards (Lovelace)
List, get, and save dashboard configs; add cards and views; manage Lovelace resources
Configuration File Management
Read, write, list, and validate YAML config files in the HA config directory
Git-based versioning: init, commit, rollback, view history, safe-write checkpoints
System Management
Validate config, restart/stop HA, reload all core configs, create backups, ping HA
List/reload integrations; manage config flows (start, submit, abort, remove/disable/enable entries)
Supervisor & HACS
List, install, start/stop/restart/update/uninstall add-ons; manage backups; get core/host info
List, install, uninstall, update HACS repositories; add custom repos
History & Logs
Get entity state history, logbook entries, error logs, and system/version info
Additional Features
WebSocket subscriptions for real-time state changes and events
Voice pipeline management (Assist pipelines, STT/TTS/wake-word engines)
Theme management (list, set active, create/update/delete theme files)
Blueprint management (list, import from URL, delete, instantiate)
Calendar & Todo (list/create/delete events; manage todo lists and items)
Energy Dashboard preferences, Zones (geofencing), Labels, Categories, and fuzzy entity search
Provides AI assistants full control over a Home Assistant smart home, including entities, automations, scripts, blueprints, dashboards, helpers, areas, devices, calendar, todo lists, history, system management, YAML config files, git-based versioning, real-time WebSocket events, energy dashboard, zones, labels, supervisor add-ons, and HACS integration.
Nexus Agent â MCP for Home Assistant
đ Release
đ HACS
đ HA Add-on
đ License
đ Stars
Give AI assistants full control over your smart home. 292 tools across 27 domains â entities, automations & scripts (CRUD + traces + linter + live reference validator), dashboards + screenshot + resource management, energy, voice pipelines, blueprints, calendar, HACS, Supervisor, themes, self-documenting Card Builder (visual cards, recipe builder, embedded block schema, upstream sync), aggregated snapshot (one-call context), BM25 tool search, HA-aware YAML validation, git versioning, and more.
Works with Claude Code, Claude Desktop, VS Code, Cursor, Windsurf, OpenAI Codex CLI, Gemini CLI.
What can you ask?
Once connected, just talk to your AI assistant:
"Turn off all lights in the house"
"Create an automation: alert me when the front door opens after 10 PM"
"Why is my bedroom sensor showing unavailable?"
"Take a screenshot of my main dashboard"
"Show all pending Home Assistant updates"
"Install Mushroom Cards from HACS"
"Commit my config changes to git with a summary of what changed"
"Build me a Lovelace card for the living room with temperature and humidity"
Related MCP server: Home Assistant MCP Server
What's New in v0.16.0
system_get_updatesâ list pending HA updates (core, add-ons, HACS, custom components) with version info and release URLssystem_get_system_healthâ health check of all HA subsystems (recorder, network, cloud, etc.)system_get_repairsâ list active repair issues that require attentionEntity groups CRUD â
automations_list_groups,automations_set_group,automations_remove_groupâ create/update/deletegroup.*entities viagroup.setLive automation reference validator â
automations_validate_automation_referencescross-checks everyentity_idandservicein your YAML against the live HA registry; template values skipped automaticallyLovelace resource management â
dashboards_add_dashboard_resource,dashboards_remove_dashboard_resource,dashboards_update_dashboard_resourceâ manage custom JS/CSS resources without touching YAML
What's New in v0.15.0
Pagination + field selection â
list_entitiesandget_snapshotnow acceptlimit,offset, andfields/state_fieldsConfirmation gates on all destructive operations â
restart_ha,stop_ha,git_rollback_*,delete_automation,delete_script,remove_integrationall requireconfirm=TrueAutomation best-practice linter â
automations_validate_best_practicesstatically checks YAML for 7 common mistakesDashboard screenshot via Puppet engine â
dashboards_screenshotrenders any Lovelace view to PNG
Installation â Home Assistant Add-on (Recommended)
đ Open your Home Assistant instance and add the repository.
Click the Open Add-on Repository on MY button above
Find Nexus Agent in the Add-on Store â Install â Start
Open Web UI â copy your MCP URL and paste it into your AI client
Manual Installation (Add-on Store)
If the MY button does not work for your setup:
In Home Assistant go to Settings â Add-ons â Add-on Store
Click the three-dot menu (âŽ) â Repositories
Add:
https://github.com/Fistacho/ha-nexus-agentFind Nexus Agent â Install â Start â Open Web UI
The web UI shows your API key and generates ready-to-paste config for every MCP client.
Standalone (outside HA)
git clone https://github.com/Fistacho/ha-nexus-agent
cd ha-nexus-agent
pip install -r requirements.txt
cp .env.example .env
# Edit .env: set HA_URL and HA_TOKEN
python server.pyOpen http://localhost:7123 to get your API key and MCP client configs.
Getting a Home Assistant token
In HA: Profile â Security â Long-Lived Access Tokens
Create Token â name it
nexusPaste as
HA_TOKENin.env
Connecting MCP Clients
Open http://your-ha-ip:7123 after starting Nexus. The setup page generates the exact config for each client.
All clients connect to:
http://your-ha-ip:7123/mcp?token=YOUR_API_KEYClaude Code CLI
claude mcp add nexus --transport sse "http://your-ha-ip:7123/mcp?token=YOUR_API_KEY" --scope userOpenAI Codex CLI
codex mcp add nexus --url "http://your-ha-ip:7123/mcp?token=YOUR_API_KEY"Gemini CLI
gemini mcp add nexus --url "http://your-ha-ip:7123/mcp?token=YOUR_API_KEY"VS Code
Create .vscode/mcp.json:
{
"servers": {
"nexus": {
"type": "sse",
"url": "http://your-ha-ip:7123/mcp?token=YOUR_API_KEY"
}
}
}Cursor
Add to ~/.cursor/mcp.json:
{
"mcpServers": {
"nexus": {
"url": "http://your-ha-ip:7123/mcp?token=YOUR_API_KEY",
"type": "sse"
}
}
}Windsurf
Add to ~/.codeium/windsurf/mcp_config.json:
{
"mcpServers": {
"nexus": {
"url": "http://your-ha-ip:7123/mcp?token=YOUR_API_KEY",
"type": "sse"
}
}
}Claude Desktop
Add to %APPDATA%/Claude/claude_desktop_config.json (Win) or ~/Library/Application Support/Claude/claude_desktop_config.json (Mac):
{
"mcpServers": {
"nexus": {
"command": "python",
"args": ["server.py"],
"cwd": "/path/to/ha-nexus-agent",
"env": {
"HA_URL": "http://homeassistant.local:8123",
"HA_TOKEN": "your_ha_token_here"
}
}
}
}Tip: Copy the exact config with your real key from the Nexus web UI at
http://your-ha-ip:7123.
Tools
292 tools across 27 categories:
Category | Tools | Highlights |
| 18 | list (paginated + field selection), turn on/off/toggle, bulk_control, voice expose, set_value |
| 19 | call_service, notify, light color, camera snapshot/record, media controls |
| 28 | CRUD + full YAML, traces, scripts, scenes, validate_best_practices (static linter), validate_automation_references (live registry check), list/set/remove groups, confirm gates on delete |
| 4 | list, import from URL, delete, instantiate |
| 8 | list, create, get_states, control_area |
| 4 | list, update (rename/move/disable), remove |
| 4 | list calendars/events, create/delete event |
| 5 | list, add/update/remove items |
| 11 | input_boolean/number/text/select/datetime, timers, counters |
| 5 | state history, logbook, error log, system info |
| 12 | check_config, backup, restart/stop (confirm gate), get_updates, get_system_health, get_repairs |
| 10 | get/save config, add cards/views, screenshot (Puppet), add/remove/update resources (JS/CSS) |
| 6 | read/write config files, YAML validation ( |
| 11 | commit, rollback (confirm gate), log, safe_write_with_checkpoint |
| 7 | listen state changes, events, subscribe_trigger, render_template |
| 20 | add-on install/start/stop/update/logs/stats, backups, core/host info |
| 7 | list/install/uninstall/update HACS repos, critical updates |
| 9 | grid, solar, battery sources, energy preferences |
| 8 | create/update/delete zones, person location |
| 14 | labels, categories, assign to entities/devices |
| 7 | fuzzy search, orphan devices, unused entities, deep_search |
| 13 | config_flow (install like in UI), options flow CRUD, enable/disable, remove (confirm gate) |
| 10 | Assist pipelines CRUD, STT/TTS/wake-word engines |
| 8 | list/create/update/delete Lovelace themes |
| 38 | Cards CRUD, style presets, CSS properties, media, renderer config, embedded block schema ( |
| 2 | Aggregated one-call context â states + areas + devices + entities + integrations, domain/area/field filters, pagination |
| 4 | BM25 tool search â query the tool catalogue, list namespaces, fetch full docstrings |
Features
292 MCP tools across 27 categories â the most complete HA MCP server available
Built-in tool search â
discover_tool_search("query")finds the right tool without flooding the AI's contextConfirmation gates â all destructive operations require
confirm=True; without it they return the exact command to re-runAutomation linter â
automations_validate_best_practicescatches 7 common YAML mistakes before they cause issuesLive reference validator â
automations_validate_automation_referencescross-checks every entity_id and service call against the running HA instanceUpdates monitor â
system_get_updateslists all pending updates across core, add-ons and HACSRepair issues â
system_get_repairssurfaces active issues from HA's repair centreLovelace resources â add/remove/update custom JS modules and CSS without editing YAML
Dashboard screenshot â render any Lovelace view to PNG via the Puppet engine (see below)
Real-time WebSocket â subscribe to state changes, events and triggers live
Git versioning â every config change auto-committed, instant rollback,
safe_write_with_checkpointYAML validation before writing any config file (
!include,!secretaware)Setup web UI â generates ready-to-use MCP config for every client
HA Add-on native â one-click install, no manual token setup
API key auth â MCP endpoint protected, token via URL or Bearer header
Dashboard Screenshots
dashboards_screenshot renders any Lovelace view to a base64-encoded PNG by delegating to the Puppet headless Chromium add-on. Nexus itself contains no browser dependencies â this approach works on every architecture (amd64, aarch64, armv7, armhf).
Setup
In HA: Settings â Add-ons â Add-on Store â ⎠â Repositories
Add:https://github.com/balloob/home-assistant-addonsInstall Puppet, set its
access_tokenoption to a HA long-lived access token, then start itDone â Nexus discovers Puppet automatically via the Supervisor
Docker / standalone:
# Run the Puppet container as a sidecar, then point Nexus at it:
NEXUS_SCREENSHOT_ENGINE_URL=http://puppet:10000Usage
dashboards_screenshot(url_path="caly-dom", width=1280, height=800, wait_ms=3000)
dashboards_screenshot(url_path="lovelace/0", full_page=True) # full scrollable pageReturns {"image_base64": "...", "format": "png", "size_bytes": ...}.
Git Versioning
Nexus keeps a git history of your HA config directory. Before every risky change, use git_safe_write_with_checkpoint â it commits current state first, then applies the change.
All rollback operations require confirm=True to prevent accidental data loss:
git_init_config()
git_safe_write_with_checkpoint("automations.yaml", new_content)
git_rollback_file("automations.yaml", confirm=True) # undo single file
git_rollback_to_commit("abc1234", confirm=True) # full rollback
git_log(limit=10) # see historyAutomation Linter
automations_validate_best_practices checks YAML against 7 rules before you save:
Rule | Severity | What it catches |
| â ī¸ warning | State trigger without |
| â ī¸ warning | Missing |
| âšī¸ info | No |
| âšī¸ info | Multiple triggers without |
| âšī¸ info |
|
| âšī¸ info | No |
| âšī¸ info |
|
automations_validate_best_practices(yaml_content="""
alias: Turn off lights
trigger:
- platform: state
entity_id: binary_sensor.motion
to: "off"
action:
- service: light.turn_off
target:
entity_id: light.living_room
""")
# â {"warnings": 2, "infos": 1, "issues": [...]}Environment Variables
Variable | Required | Default | Description |
| Yes |
| Home Assistant URL |
| Standalone only | â | Long-lived access token |
| Add-on only | auto-injected | Set automatically by HA |
| For git/file tools |
| Path to HA config directory |
| No | auto-generated | Pin to a specific API key |
| No |
| HTTP server port |
| No | auto-discovered | Explicit URL to Puppet engine (Docker/standalone) |
Changelog
See Releases for full history.
Maintenance
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
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/Fistacho/ha-nexus-agent'
If you have feedback or need assistance with the MCP directory API, please join our Discord server
