# ha-mcp

ha-mcp connects an AI assistant to Home Assistant so it can control devices, check their states and call services. Use it to manage smart-home tasks through chat.

- MCP server · `type=mcp` · Claude Code, Codex, Cursor, GitHub Copilot, Windsurf (Devin Desktop), Cline, Zed, Gemini CLI · ★ 5195
- Author: homeassistant-ai
- License: MIT · policy=link-only · description only; the file stays with the author
- Source: https://github.com/homeassistant-ai/ha-mcp
- Updated: 2026-10-24
- HTML: https://affpapa.org/en/nevibecode/mcp/ha-mcp

## What it does

With ha-mcp, an assistant can interact with Home Assistant over MCP. Ask it to change a device state, retrieve current values, call a service or work with automations. The server also adds an admin-only HA-MCP panel to the Home Assistant sidebar.

For Claude Code, add the server with `claude mcp add ha-mcp -- uvx ha-mcp`. This setup uses `uvx`; the Home Assistant component setup instead requires an administrator token, with client access configured separately. Choose one way to run ha-mcp: running multiple installations at once can cause conflicts.

## Requirements
- Needs: Python and uv (commands run via uvx)
- Works with: Home Assistant

## Install

### Claude Code (native platform)

**Platform CLI**
```bash
claude mcp add ha-mcp -- uvx ha-mcp
```
uvx runs the command named after the package; if the README names another one, use uvx --from ha-mcp <command>

### Codex

**Platform CLI**
```bash
codex mcp add ha-mcp -- uvx ha-mcp
```
uvx runs the command named after the package; if the README names another one, use uvx --from ha-mcp <command>

### Cursor

**Config file**
File `.cursor/mcp.json`:
```json
{
    "mcpServers": {
        "ha-mcp": {
            "command": "uvx",
            "args": [
                "ha-mcp"
            ]
        }
    }
}
```
uvx runs the command named after the package; if the README names another one, use uvx --from ha-mcp <command>

### GitHub Copilot

**Config file**
File `.vscode/mcp.json`:
```json
{
    "servers": {
        "ha-mcp": {
            "type": "stdio",
            "command": "uvx",
            "args": [
                "ha-mcp"
            ]
        }
    }
}
```
uvx runs the command named after the package; if the README names another one, use uvx --from ha-mcp <command>

### Gemini CLI

**Platform CLI**
```bash
gemini mcp add ha-mcp uvx ha-mcp
```
uvx runs the command named after the package; if the README names another one, use uvx --from ha-mcp <command>

## When to use it
- control Home Assistant devices through an assistant
- check a device’s current state from chat
- call a Home Assistant service with a request
- manage automations through an AI assistant

## Example prompts
- Turn off the living room light through Home Assistant.
- Show me the current temperature sensor readings.
- Call the Home Assistant service to restart the router.

## Similar
- [embedded-iot-mentor](https://affpapa.org/en/nevibecode/skills/embedded-iot-mentor.md) — skill · 22 installs
- [sonoscli](https://affpapa.org/en/nevibecode/skills/sonoscli.md) — skill · 5300 installs
- [REA](https://affpapa.org/en/nevibecode/mcp/rea.md) — MCP server · ★ 386989
- [GitHub](https://affpapa.org/en/nevibecode/mcp/github.md) — MCP server · ★ 33918
- [Netdata](https://affpapa.org/en/nevibecode/mcp/netdata.md) — MCP server · ★ 81115
- [browser-use](https://affpapa.org/en/nevibecode/mcp/browser-use.md) — MCP server · ★ 119160
- [Codebase Memory](https://affpapa.org/en/nevibecode/mcp/codebase-memory.md) — MCP server · ★ 47392
- [mcp-server](https://affpapa.org/en/nevibecode/mcp/mcp-server.md) — MCP server · ★ 43872

---
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
