ha-nexus-agent
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
Give AI assistants full control over your smart home. 276 tools across 27 domains — entities (with bulk voice exposure), automations & scripts (CRUD + traces + last-failed shortcuts), dashboards, energy, voice pipelines, blueprints, calendar, HACS, Supervisor, themes, self-documenting Card Builder (visual drag-and-drop cards, recipe builder with embedded block schema + style categories + style targets + style snippets + upstream sync check), aggregated snapshot (one-call context), BM25 tool search (find the right tool without memorising 270 names), HA-aware YAML validation (!include, !secret), git versioning, and more.
Works with Claude Code, Claude Desktop, VS Code, Cursor, Windsurf, OpenAI Codex CLI, Gemini CLI.
Option 1: Installation via Home Assistant (Recommended)
Click the button below to add the Nexus Agent repository to your Home Assistant instance, then install the add-on:
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
Option 2: 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. No manual token setup.
Option 3: 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
276 tools across 27 categories:
Category | Count | Highlights |
| 17 | list, turn on/off/toggle, bulk_control, voice expose |
| 19 | call_service, notify, light color, camera snapshot/record |
| 21 | CRUD + full YAML, traces, scripts, scenes |
| 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, timers, counters |
| 5 | state history, logbook, error log |
| 9 | check_config, backup, restart, list integrations |
| 6 | get/save dashboard config, add cards/views |
| 6 | read/write config files, YAML validation |
| 11 | commit, rollback, log, safe_write_with_checkpoint |
| 7 | listen state changes, events, subscribe_trigger |
| 20 | add-on install/start/stop/update, backups, core/host info |
| 7 | list/install/uninstall/update HACS repos |
| 9 | grid, solar, battery sources, energy preferences |
| 8 | create/update/delete zones, person location |
| 13 | labels, categories, assign to entities/devices |
| 7 | fuzzy search, orphan devices, unused entities |
| 12 | config_flow (install like in UI), options flow CRUD, enable/disable |
| 9 | Assist pipelines CRUD, STT/TTS/wake-word engines |
| 8 | list/create/update/delete Lovelace themes |
| 32 | Cards CRUD, style presets, CSS properties, media, renderer config, embedded block schema ( |
| 2 | Aggregated one-call context — states + areas + devices + entities + integrations, with filters |
| 4 | BM25 tool search — query the 259-tool catalogue, list namespaces, fetch full docstrings |
Features
270 MCP tools across 27 categories — the most complete HA MCP server
Built-in tool search —
discover_tool_search("query")finds the right tool without flooding the AI's working memoryReal-time WebSocket — subscribe to state changes, events and triggers live
Git versioning — every config change auto-committed, instant rollback
YAML validation before writing any config file
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
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.
git_init_config()
git_safe_write_with_checkpoint("automations.yaml", new_content)
git_rollback_file("automations.yaml") # undo single file
git_rollback_to_commit("abc1234") # full rollback
git_log(limit=10) # see historyEnvironment 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 |
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