Home Assistant

by guilhermelirio

3 stars
Not rated
GitHub

About

Bridges Home Assistant with smart home devices, enabling status checks, entity control, and service calls through natural language interactions.

Details

Author
guilhermelirio
Repository
guilhermelirio/homeassistant-mpc
GitHub stars
3
License
MIT License
Categories
Design, Developer Tools, AI, API, Infrastructure, Frontend
Tags
#integration

Setting up with Highlight

This MCP is not yet compatible with Highlight’s one-click setup. However, you can still use it with Highlight by following these steps:

  1. Download and install Highlight from highlightai.com/download
  2. Navigate to the plugins tab and select "Add Custom Plugin"
  3. Configure the plugin with the settings below
    Plugin Name Home Assistant
    Command (node, npx, python, etc.) npx
    Arguments
    • Argument 1 -y
    • Argument 2 @highlight/mcp-server

    Please refer to the README for specific instructions on how to obtain API keys or other required environment variables.

  4. Enable "Start Automatically" if you want the plugin to start when Highlight launches

From the repository

To install Home Assistant Integration for Claude Desktop automatically via Smithery:

npx -y @smithery/cli install @guilhermelirio/homeassistant-mpc --client claude

1. Install dependencies:

npm install

2. Configure environment variables:
- Obtain a Long-Lived Access Token from your Home Assistant
- Configure the environment variables in a .env file at the project root:

HOME_ASSISTANT_URL=http://your-home-assistant:8123
HOME_ASSISTANT_TOKEN=your_token_here

homeassistant_api

Verifies if the Home Assistant API is online. Parameters: none.

homeassistant_get_state

Gets the current state of a Home Assistant entity. Parameters: `entity_id` (entity ID).

homeassistant_call_service

Calls a service for a Home Assistant entity. Parameters: `entity_id` (entity ID), `domain` (service domain), `service` (service to call).

Claude Desktop / Cursor

Paste into your MCP client config file to install this server.

{
    "mcpServers": {
        "home assistant": {
            "env": {},
            "args": [
                "-y",
                "@highlight/mcp-server"
            ],
            "command": "npx"
        }
    }
}

Linux

{
    "env": [],
    "args": [
        "-y",
        "@highlight/mcp-server"
    ],
    "command": "npx"
}

Macos

{
    "env": [],
    "args": [
        "-y",
        "@highlight/mcp-server"
    ],
    "command": "npx"
}

Windows

{
    "env": [],
    "args": [
        "/c",
        "npx",
        "-y",
        "@highlight/mcp-server"
    ],
    "command": "cmd"
}

Home Assistant MCP

This is an MCP (Model Context Protocol) server that provides tools for integration with Home Assistant, allowing AI assistants to interact with smart home devices.

Setup

Installing via Smithery

To install Home Assistant Integration for Claude Desktop automatically via Smithery:

npx -y @smithery/cli install @guilhermelirio/homeassistant-mpc --client claude

Manual Installation

1. Install dependencies:
npm install

2. Configure environment variables:
- Obtain a Long-Lived Access Token from your Home Assistant
- Configure the environment variables in a .env file at the project root:

HOME_ASSISTANT_URL=http://your-home-assistant:8123
HOME_ASSISTANT_TOKEN=your_token_here

Starting the server

npm start

For development:

npm run dev

Available Tools

Home Assistant API Verification

- homeassistant_api: Verifies if the Home Assistant API is online
- Parameters: none
- Example: homeassistant_api()

Get Entity State

- homeassistant_get_state: Gets the current state of a Home Assistant entity
- Parameters: entity_id (entity ID)
- Example: homeassistant_get_state("light.living_room")

Call Services

- homeassistant_call_service: Calls a service for a Home Assistant entity
- Parameters:
- entity_id (entity ID)
- domain (service domain)
- service (service to call)
- Example: homeassistant_call_service("light.living_room", "light", "turn_on")

Development

This project uses TypeScript and the MCP SDK library to create tools that can be accessed by language models such as Claude, GPT, etc.

To add new tools:

1. Create a module in src/tools/[category]
2. Implement your tools following the existing pattern
3. Register the module in src/index.ts

Contributions

Contributions are welcome! Feel free to open issues or submit pull requests.

License

This project is licensed under the MIT License - see the LICENSE file for details.

No reviews yet — be the first

Sign in to leave a review

Use Google, GitHub, or an email account so ratings stay tied to real people.

Email sign in

No reviews posted yet.