{"id":49944453,"url":"https://github.com/fistacho/ha-nexus-agent","last_synced_at":"2026-05-17T14:01:52.565Z","repository":{"id":353152441,"uuid":"1218194181","full_name":"Fistacho/ha-nexus-agent","owner":"Fistacho","description":"MCP server for Home Assistant — 264 tools across 27 domains: entities, automations, dashboards, energy, voice, HACS, Supervisor, Card Builder (with embedded block schema), BM25 tool search, aggregated snapshot, automation trace debug, git versioning","archived":false,"fork":false,"pushed_at":"2026-05-17T13:19:05.000Z","size":158,"stargazers_count":7,"open_issues_count":0,"forks_count":1,"subscribers_count":0,"default_branch":"main","last_synced_at":"2026-05-17T13:33:46.996Z","etag":null,"topics":["ai-agent","anthropic","card-builder","claude","claude-code","cursor","fastmcp","home-assistant","home-automation","homeassistant","lovelace","mcp","mcp-server","model-context-protocol","smart-home","vscode"],"latest_commit_sha":null,"homepage":null,"language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Fistacho.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2026-04-22T16:18:39.000Z","updated_at":"2026-05-17T13:19:08.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/Fistacho/ha-nexus-agent","commit_stats":null,"previous_names":["fistacho/ha-nexus-agent"],"tags_count":13,"template":false,"template_full_name":null,"purl":"pkg:github/Fistacho/ha-nexus-agent","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Fistacho%2Fha-nexus-agent","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Fistacho%2Fha-nexus-agent/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Fistacho%2Fha-nexus-agent/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Fistacho%2Fha-nexus-agent/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Fistacho","download_url":"https://codeload.github.com/Fistacho/ha-nexus-agent/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Fistacho%2Fha-nexus-agent/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":33141418,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-17T09:28:26.183Z","status":"ssl_error","status_checked_at":"2026-05-17T09:27:52.702Z","response_time":107,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.6:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["ai-agent","anthropic","card-builder","claude","claude-code","cursor","fastmcp","home-assistant","home-automation","homeassistant","lovelace","mcp","mcp-server","model-context-protocol","smart-home","vscode"],"created_at":"2026-05-17T14:01:51.592Z","updated_at":"2026-05-17T14:01:52.559Z","avatar_url":"https://github.com/Fistacho.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Nexus Agent — MCP for Home Assistant\n\n[![Release](https://img.shields.io/github/v/release/Fistacho/ha-nexus-agent?style=flat-square\u0026label=latest)](https://github.com/Fistacho/ha-nexus-agent/releases/latest)\n[![HACS](https://img.shields.io/badge/HACS-default-41BDF5?style=flat-square\u0026logo=home-assistant-community-store)](https://hacs.xyz)\n[![HA Add-on](https://img.shields.io/badge/Add--on-available-41BDF5?style=flat-square\u0026logo=home-assistant)](https://github.com/Fistacho/ha-nexus-agent#installation--home-assistant-add-on-recommended)\n[![License](https://img.shields.io/github/license/Fistacho/ha-nexus-agent?style=flat-square)](LICENSE)\n[![Stars](https://img.shields.io/github/stars/Fistacho/ha-nexus-agent?style=flat-square)](https://github.com/Fistacho/ha-nexus-agent/stargazers)\n\n**Give AI assistants full control over your smart home.** **276 tools across 27 domains** — entities (with bulk voice exposure), automations \u0026 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.\n\nWorks with **Claude Code**, **Claude Desktop**, **VS Code**, **Cursor**, **Windsurf**, **OpenAI Codex CLI**, **Gemini CLI**.\n\n---\n\n## Option 1: Installation via Home Assistant (Recommended)\n\nClick the button below to add the Nexus Agent repository to your Home Assistant instance, then install the add-on:\n\n[![Open your Home Assistant instance and add the repository.](https://my.home-assistant.io/badges/supervisor_add_addon_repository.svg)](https://my.home-assistant.io/redirect/supervisor_add_addon_repository/?repository_url=https%3A%2F%2Fgithub.com%2FFistacho%2Fha-nexus-agent)\n\n1. Click the **Open Add-on Repository on MY** button above\n2. Find **Nexus Agent** in the Add-on Store → **Install** → **Start**\n3. Open **Web UI** — copy your MCP URL and paste it into your AI client\n\n---\n\n## Option 2: Manual Installation (Add-on Store)\n\nIf the MY button does not work for your setup:\n\n1. In Home Assistant go to **Settings → Add-ons → Add-on Store**\n2. Click the three-dot menu (⋮) → **Repositories**\n3. Add:\n\n   ```text\n   https://github.com/Fistacho/ha-nexus-agent\n   ```\n\n4. Find **Nexus Agent** → **Install** → **Start** → **Open Web UI**\n\nThe web UI shows your API key and generates ready-to-paste config for every MCP client. No manual token setup.\n\n## Option 3: Standalone (outside HA)\n\n```bash\ngit clone https://github.com/Fistacho/ha-nexus-agent\ncd ha-nexus-agent\npip install -r requirements.txt\ncp .env.example .env\n# Edit .env: set HA_URL and HA_TOKEN\npython server.py\n```\n\nOpen \u003chttp://localhost:7123\u003e to get your API key and MCP client configs.\n\n### Getting a Home Assistant token\n\n1. In HA: **Profile → Security → Long-Lived Access Tokens**\n2. **Create Token** → name it `nexus`\n3. Paste as `HA_TOKEN` in `.env`\n\n---\n\n## Connecting MCP Clients\n\nOpen \u003chttp://your-ha-ip:7123\u003e after starting Nexus. The setup page generates the exact config for each client.\n\nAll clients connect to:\n\n```text\nhttp://your-ha-ip:7123/mcp?token=YOUR_API_KEY\n```\n\n### Claude Code CLI\n\n```bash\nclaude mcp add nexus --transport sse \"http://your-ha-ip:7123/mcp?token=YOUR_API_KEY\" --scope user\n```\n\n### OpenAI Codex CLI\n\n```bash\ncodex mcp add nexus --url \"http://your-ha-ip:7123/mcp?token=YOUR_API_KEY\"\n```\n\n### Gemini CLI\n\n```bash\ngemini mcp add nexus --url \"http://your-ha-ip:7123/mcp?token=YOUR_API_KEY\"\n```\n\n### VS Code\n\nCreate `.vscode/mcp.json`:\n\n```json\n{\n  \"servers\": {\n    \"nexus\": {\n      \"type\": \"sse\",\n      \"url\": \"http://your-ha-ip:7123/mcp?token=YOUR_API_KEY\"\n    }\n  }\n}\n```\n\n### Cursor\n\nAdd to `~/.cursor/mcp.json`:\n\n```json\n{\n  \"mcpServers\": {\n    \"nexus\": {\n      \"url\": \"http://your-ha-ip:7123/mcp?token=YOUR_API_KEY\",\n      \"type\": \"sse\"\n    }\n  }\n}\n```\n\n### Windsurf\n\nAdd to `~/.codeium/windsurf/mcp_config.json`:\n\n```json\n{\n  \"mcpServers\": {\n    \"nexus\": {\n      \"url\": \"http://your-ha-ip:7123/mcp?token=YOUR_API_KEY\",\n      \"type\": \"sse\"\n    }\n  }\n}\n```\n\n### Claude Desktop\n\nAdd to `%APPDATA%/Claude/claude_desktop_config.json` (Win) or `~/Library/Application Support/Claude/claude_desktop_config.json` (Mac):\n\n```json\n{\n  \"mcpServers\": {\n    \"nexus\": {\n      \"command\": \"python\",\n      \"args\": [\"server.py\"],\n      \"cwd\": \"/path/to/ha-nexus-agent\",\n      \"env\": {\n        \"HA_URL\": \"http://homeassistant.local:8123\",\n        \"HA_TOKEN\": \"your_ha_token_here\"\n      }\n    }\n  }\n}\n```\n\n\u003e **Tip:** Copy the exact config with your real key from the Nexus web UI at `http://your-ha-ip:7123`.\n\n---\n\n## Tools\n\n276 tools across 27 categories:\n\n| Category | Count | Highlights |\n| --- | --- | --- |\n| `entities_*` | 17 | list, turn on/off/toggle, **bulk_control**, voice expose |\n| `services_*` | 19 | call_service, notify, light color, camera snapshot/record |\n| `automations_*` | 21 | CRUD + full YAML, traces, scripts, scenes |\n| `blueprints_*` | 4 | list, import from URL, delete, instantiate |\n| `areas_*` | 8 | list, create, get_states, control_area |\n| `devices_*` | 4 | list, update (rename/move/disable), remove |\n| `calendar_*` | 4 | list calendars/events, create/delete event |\n| `todo_*` | 5 | list, add/update/remove items |\n| `helpers_*` | 11 | input_boolean/number/text/select, timers, counters |\n| `history_*` | 5 | state history, logbook, error log |\n| `system_*` | 9 | check_config, backup, restart, list integrations |\n| `dashboards_*` | 6 | get/save dashboard config, add cards/views |\n| `files_*` | 6 | read/write config files, YAML validation |\n| `git_*` | 11 | commit, rollback, log, safe_write_with_checkpoint |\n| `ws_*` | 7 | listen state changes, events, subscribe_trigger |\n| `supervisor_*` | 20 | add-on install/start/stop/update, backups, core/host info |\n| `hacs_*` | 7 | list/install/uninstall/update HACS repos |\n| `energy_*` | 9 | grid, solar, battery sources, energy preferences |\n| `zones_*` | 8 | create/update/delete zones, person location |\n| `labels_*` | 13 | labels, categories, assign to entities/devices |\n| `search_*` | 7 | fuzzy search, orphan devices, unused entities |\n| `integrations_*` | 12 | **config_flow** (install like in UI), options flow CRUD, enable/disable |\n| `voice_*` | 9 | Assist pipelines CRUD, STT/TTS/wake-word engines |\n| `themes_*` | 8 | list/create/update/delete Lovelace themes |\n| `card_builder_*` | 32 | Cards CRUD, style presets, CSS properties, media, renderer config, **embedded block schema** (`list_block_types`, `get_block_schema`, `list_button_toggle_features`), **embedded styles knowledge** (`list_style_categories`, `list_style_targets`, `list_style_snippets`, `get_style_snippet`, `build_styles`), **10 turnkey templates** (`list_card_templates`, `get_card_template`, `make_template_card` — tile_simple, tile_action, climate_full, cover_panel, light_dimmer, sensor_hero, media_panel, weather_pretty, gauge_radial, stat_compare), **recipe guide**, **`build_from_recipe`** high-level builder (auto-wraps props), **`validate_config`** structural check, **`check_schema_sync`** upstream drift detection |\n| `snapshot_*` | 2 | Aggregated one-call context — states + areas + devices + entities + integrations, with filters |\n| `discover_*` | 4 | **BM25 tool search** — query the 259-tool catalogue, list namespaces, fetch full docstrings |\n\n---\n\n## Features\n\n- **270 MCP tools** across 27 categories — the most complete HA MCP server\n- **Built-in tool search** — `discover_tool_search(\"query\")` finds the right tool without flooding the AI's working memory\n- **Real-time WebSocket** — subscribe to state changes, events and triggers live\n- **Git versioning** — every config change auto-committed, instant rollback\n- **YAML validation** before writing any config file\n- **Setup web UI** — generates ready-to-use MCP config for every client\n- **HA Add-on native** — one-click install, no manual token setup\n- **API key auth** — MCP endpoint protected, token via URL or Bearer header\n\n---\n\n## Git Versioning\n\nNexus 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.\n\n```python\ngit_init_config()\ngit_safe_write_with_checkpoint(\"automations.yaml\", new_content)\ngit_rollback_file(\"automations.yaml\")       # undo single file\ngit_rollback_to_commit(\"abc1234\")           # full rollback\ngit_log(limit=10)                           # see history\n```\n\n---\n\n## Environment Variables\n\n| Variable | Required | Default | Description |\n| --- | --- | --- | --- |\n| `HA_URL` | Yes | `http://homeassistant.local:8123` | Home Assistant URL |\n| `HA_TOKEN` | Standalone only | — | Long-lived access token |\n| `SUPERVISOR_TOKEN` | Add-on only | auto-injected | Set automatically by HA |\n| `HA_CONFIG_PATH` | For git/file tools | `/config` | Path to HA config directory |\n| `NEXUS_API_KEY` | No | auto-generated | Pin to a specific API key |\n| `NEXUS_PORT` | No | `7123` | HTTP server port |\n\n---\n\n## Changelog\n\nSee [Releases](https://github.com/Fistacho/ha-nexus-agent/releases) for full history.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffistacho%2Fha-nexus-agent","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ffistacho%2Fha-nexus-agent","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffistacho%2Fha-nexus-agent/lists"}