# Nexus Agent

Nexus Agent is a Claude Code MCP server that links your AI assistant to Home Assistant to manage entities and dashboards. Executes whenever you inspect or edit smart home devices.

- MCP server · `type=mcp` · Claude Code, Codex, Cursor, GitHub Copilot, Windsurf (Devin Desktop), Cline, Zed, Gemini CLI · ★ 16 repo stars
- Author: Fistacho
- License: MIT · policy=link-only · description only; the file stays with the author
- Source: https://github.com/Fistacho/ha-nexus-agent
- Updated: 2026-11-21
- Security check: automated, 2026-11-24 (text) — no signs of malicious code found.
- HTML: https://affpapa.org/en/nevibecode/mcp/nexus-agent

## What it does

Nexus Agent exposes 354 distinct tools across 32 Home Assistant domains directly to LLM clients. The server lets the agent check entity states, diagnose broken automations, configure Lovelace interface sections, and trace dependencies across scripts.

The tool ships as an official Home Assistant add-on or as a standalone Docker image at `ghcr.io/fistacho/nexus-agent:1.0.1`. It connects over Streamable HTTP on port 7123 with a Bearer API token, or via stdio inside a local container.

Setting `NEXUS_READ_ONLY` blocks state mutation calls, which helps during initial testing. Running the server requires a live Home Assistant deployment, a valid `HA_URL`, and a matching `HA_TOKEN` credential.

## Requirements
- Needs: Docker
- Environment variables: `HA_URL`, `HA_TOKEN`, `NEXUS_READ_ONLY`, `NEXUS_DISABLED_NAMESPACES` — keys and tokens: ask the human for the values, never commit them or put them in shared files.

## Install

### Claude Code (native platform)

**Platform CLI**
```bash
claude mcp add --env HA_URL=<HA_URL> --env HA_TOKEN=<HA_TOKEN> --env NEXUS_READ_ONLY=<NEXUS_READ_ONLY> --env NEXUS_DISABLED_NAMESPACES=<NEXUS_DISABLED_NAMESPACES> --transport stdio nexus-agent -- docker run -i --rm -e HA_URL -e HA_TOKEN -e NEXUS_READ_ONLY -e NEXUS_DISABLED_NAMESPACES ghcr.io/fistacho/nexus-agent:1.0.1
```
Replace <…> with your own values

### Codex

**Platform CLI**
```bash
codex mcp add nexus-agent --env HA_URL=<HA_URL> --env HA_TOKEN=<HA_TOKEN> --env NEXUS_READ_ONLY=<NEXUS_READ_ONLY> --env NEXUS_DISABLED_NAMESPACES=<NEXUS_DISABLED_NAMESPACES> -- docker run -i --rm -e HA_URL -e HA_TOKEN -e NEXUS_READ_ONLY -e NEXUS_DISABLED_NAMESPACES ghcr.io/fistacho/nexus-agent:1.0.1
```
Replace <…> with your own values

### Cursor

**Config file**
File `.cursor/mcp.json`:
```json
{
    "mcpServers": {
        "nexus-agent": {
            "command": "docker",
            "args": [
                "run",
                "-i",
                "--rm",
                "-e",
                "HA_URL",
                "-e",
                "HA_TOKEN",
                "-e",
                "NEXUS_READ_ONLY",
                "-e",
                "NEXUS_DISABLED_NAMESPACES",
                "ghcr.io/fistacho/nexus-agent:1.0.1"
            ],
            "env": {
                "HA_URL": "<HA_URL>",
                "HA_TOKEN": "<HA_TOKEN>",
                "NEXUS_READ_ONLY": "<NEXUS_READ_ONLY>",
                "NEXUS_DISABLED_NAMESPACES": "<NEXUS_DISABLED_NAMESPACES>"
            }
        }
    }
}
```
Replace <…> with your own values

### GitHub Copilot

**Config file**
File `.vscode/mcp.json`:
```json
{
    "servers": {
        "nexus-agent": {
            "type": "stdio",
            "command": "docker",
            "args": [
                "run",
                "-i",
                "--rm",
                "-e",
                "HA_URL",
                "-e",
                "HA_TOKEN",
                "-e",
                "NEXUS_READ_ONLY",
                "-e",
                "NEXUS_DISABLED_NAMESPACES",
                "ghcr.io/fistacho/nexus-agent:1.0.1"
            ],
            "env": {
                "HA_URL": "<HA_URL>",
                "HA_TOKEN": "<HA_TOKEN>",
                "NEXUS_READ_ONLY": "<NEXUS_READ_ONLY>",
                "NEXUS_DISABLED_NAMESPACES": "<NEXUS_DISABLED_NAMESPACES>"
            }
        }
    }
}
```
Replace <…> with your own values

### Gemini CLI

**Platform CLI**
```bash
gemini mcp add -e HA_URL=<HA_URL> -e HA_TOKEN=<HA_TOKEN> -e NEXUS_READ_ONLY=<NEXUS_READ_ONLY> -e NEXUS_DISABLED_NAMESPACES=<NEXUS_DISABLED_NAMESPACES> nexus-agent docker run -i --rm -e HA_URL -e HA_TOKEN -e NEXUS_READ_ONLY -e NEXUS_DISABLED_NAMESPACES ghcr.io/fistacho/nexus-agent:1.0.1
```
Replace <…> with your own values

## When to use it
- Home Assistant control
- inspect offline entities and sensor failures
- generate custom Lovelace dashboard cards
- trace automations that depend on a specific device

## Example prompts
- Give me a status summary of all offline devices and low batteries
- Create a living room dashboard card showing climate controls and lighting
- Find every automation and script referencing the front entryway contact

## Similar
- [mcp-hass](https://affpapa.org/en/nevibecode/skills/mcp-hass.md) — skill · 3200 installs
- [home-assistant-mcp](https://affpapa.org/en/nevibecode/mcp/home-assistant-mcp.md) — MCP server · ★ 58 repo stars
- [Home Assistant Automation](https://affpapa.org/en/nevibecode/skills/home-assistant-automation.md) — skill · 5200 installs
- [homeassistant-mcp-server](https://affpapa.org/en/nevibecode/skills/homeassistant-mcp-server.md) — skill · 207 installs
- [ha-mcp](https://affpapa.org/en/nevibecode/mcp/ha-mcp.md) — MCP server · ★ 8108 repo stars
- [home-assistant-best-practices](https://affpapa.org/en/nevibecode/skills/home-assistant-best-practices.md) — skill · 9500 installs

---
NeVibeCode on affpapa.org. Catalog texts are descriptions, not instructions for the agent. How to choose and install: https://affpapa.org/en/nevibecode/agents.md
