Fire in da houseTop Tip:Paying $100+ per month for Perplexity, MidJourney, Runway, ChatGPT and other tools is crazy - get all your AI tools in one site starting at $15 per month with Galaxy AI Fire in da houseCheck it out free

mcp-server-home-assistant

MCP.Pizza Chef: allenporter

mcp-server-home-assistant is a Model Context Protocol (MCP) server that bridges Home Assistant smart home environments with AI models. It exposes Home Assistant's real-time device states, automations, and sensor data as structured context to LLMs, enabling intelligent, context-aware interactions and automation control. This server requires a custom Home Assistant component and supports secure API token authentication. It integrates seamlessly with AI clients like Claude Desktop, allowing models to perceive and act on smart home environments dynamically. The project is actively evolving, with its custom component moving into Home Assistant Core for broader adoption.

Use This MCP server To

Enable AI-driven smart home automation and control Provide real-time home sensor data to language models Integrate Home Assistant context into AI-powered assistants Automate device state queries and commands via LLMs Enhance smart home security monitoring with AI insights

README

mcp-server-home-assistant

A Model Context Protocol Server for Home Assistant. See Model Context Protocol for context.

The custom component required by this integration is moving to Home Assistant Core in home-assistant/core#134122

Usage in Claude Desktop

  1. Install the home-assistant-model-context-protocol custom component in your Home Assistant instance

  2. Create a Long Lived Access Token

  3. Clone this git repo to a path like /Users/allen/Development/mcp-server-home-assistant

  4. Edit your claude_desktop_config.json with something like this and include your home assistant url and api token:

    {
        "mcpServers": {
            "Home-assistant": {
                "command": "uv",
                "args": [
                    "--directory",
                    "/Users/allen/Development/mcp-server-home-assistant",
                    "run",
                    "mcp-server-home-assistant",
                    "-v",
                    "-v"
                ],
                "env": {
                    "HOME_ASSISTANT_WEB_SOCKET_URL": "http://localhost:8123/api/websocket",
                    "HOME_ASSISTANT_API_TOKEN": "byJhbVci0iJIUzI1ii1sInR5cCI6IkpXVCJ9.....
                }
            }
        }
    }
  5. You can view the logs e.g. ~Library/Logs/Claude/mcp-server-Home-assistant.log to understand what is happening

mcp-server-home-assistant FAQ

How do I install the mcp-server-home-assistant?
Install the custom component 'home-assistant-model-context-protocol' in your Home Assistant instance, then clone the server repo and configure your AI client with your Home Assistant URL and Long Lived Access Token.
What authentication method does mcp-server-home-assistant use?
It uses Home Assistant's Long Lived Access Token for secure API access.
Can I use mcp-server-home-assistant with AI models other than Claude?
Yes, it is compatible with any MCP client supporting the protocol, including models from OpenAI, Anthropic Claude, and Google Gemini.
Is the custom component included in Home Assistant Core?
The custom component is being merged into Home Assistant Core, simplifying installation and maintenance.
How does mcp-server-home-assistant handle real-time updates?
It streams or periodically fetches Home Assistant state changes to keep the AI model context current.
What kind of Home Assistant data is exposed?
Device states, sensor readings, automations, and other relevant smart home context are exposed to the model.
Do I need programming skills to set up mcp-server-home-assistant?
Basic familiarity with Home Assistant and command-line operations is helpful but detailed instructions are provided.
Can mcp-server-home-assistant control devices or only read data?
It supports both reading state and sending commands to control devices via the AI model.