Home Assistant MCP Server

by hekmon8

Integrations

  • Allows to interact with Home Assistant devices, including getting device states, controlling device states (on/off), triggering automations, and listing available entities

Servidor MCP de Home Assistant

Un servidor de Protocolo de Contexto de Modelo (MCP) para interactuar con Home Assistant. Este servidor proporciona herramientas para controlar y supervisar sus dispositivos Home Assistant mediante aplicaciones compatibles con MCP.

Este proyecto forma parte del ecosistema del Protocolo de Contexto de Modelo de IA (MCP). Para más información y documentación sobre las herramientas MCP, visite www.aimcp.info .

Características

  • Obtener estados del dispositivo
  • Estados del dispositivo de control (encendido/apagado)
  • Automatizaciones de activación
  • Lista de entidades disponibles

Instalación

  1. Clonar este repositorio:
git clone https://github.com/yourusername/homeassistant-server-mcp.git cd homeassistant-server-mcp
  1. Instalar dependencias:
npm install
  1. Construir el proyecto:
npm run build
  1. Configure el servidor MCP agregando lo siguiente a su archivo de configuración de MCP (normalmente ubicado en ~/Library/Application Support/Code/User/globalStorage/saoudrizwan.claude-dev/settings/cline_mcp_settings.json para VSCode):
{ "mcpServers": { "homeassistant": { "command": "node", "args": ["/path/to/homeassistant-mcp/homeassistant-server/build/index.js"], "env": { "HA_URL": "http://your-homeassistant-url:8123", "HA_TOKEN": "your-long-lived-access-token" } } } }

Reemplace your-homeassistant-url y your-long-lived-access-token con la URL de su instancia de Home Assistant y el token de acceso.

Uso

El servidor proporciona las siguientes herramientas:

1. Obtener el estado del dispositivo

// Example usage use_mcp_tool({ server_name: "homeassistant", tool_name: "get_state", arguments: { entity_id: "light.living_room" } });

2. Alternar estado del dispositivo

// Example usage use_mcp_tool({ server_name: "homeassistant", tool_name: "toggle_entity", arguments: { entity_id: "switch.bedroom", state: "on" // or "off" } });

3. Automatización de activadores

// Example usage use_mcp_tool({ server_name: "homeassistant", tool_name: "trigger_automation", arguments: { automation_id: "automation.morning_routine" } });

4. Entidades de lista

// Example usage use_mcp_tool({ server_name: "homeassistant", tool_name: "list_entities", arguments: { domain: "light" // optional, filters by domain } });

Contribuyendo

¡Agradecemos tus contribuciones! Puedes ayudarnos de la siguiente manera:

  1. Bifurcar el repositorio
  2. Crea tu rama de funciones ( git checkout -b feature/amazing-feature )
  3. Confirme sus cambios ( git commit -m 'Add some amazing feature' )
  4. Empujar a la rama ( git push origin feature/amazing-feature )
  5. Abrir una solicitud de extracción

Asegúrese de actualizar las pruebas según corresponda y seguir el estilo del código existente.

Documentación

Para obtener documentación detallada sobre las herramientas MCP y el ecosistema:

  • Visita www.aimcp.info
  • Consulte el directorio de herramientas MCP en el sitio web
  • Lea las guías de integración y las mejores prácticas

Licencia

Este proyecto está licenciado bajo la licencia MIT: consulte a continuación para obtener más detalles:

MIT License Copyright (c) 2024 homeassistant-mcp Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

Seguridad

Para utilizar este servidor de forma segura:

  1. Utilice siempre HTTPS para su instancia de Home Assistant
  2. Mantenga sus tokens de acceso seguros y nunca los comprometa con el control de versiones
  3. Gire periódicamente sus tokens de acceso
  4. Utilice variables de entorno para información confidencial

Apoyo

Si tiene algún problema o pregunta, por favor:

  1. Verifique los problemas existentes en el repositorio
  2. Crea un nuevo problema si tu problema no ha sido reportado
  3. Proporcione tanto contexto como sea posible al informar problemas.
  4. Visite www.aimcp.info para obtener recursos de soporte adicionales

You must be authenticated.

A
security – no known vulnerabilities
A
license - permissive license
A
quality - confirmed to work

hybrid server

The server is able to function both locally and remotely, depending on the configuration or use case.

Un servidor que permite la interacción con dispositivos y automatizaciones de Home Assistant a través del Protocolo de contexto de modelo, lo que permite a los usuarios monitorear estados de dispositivos, controlar dispositivos, activar automatizaciones y enumerar entidades.

  1. Características
    1. Instalación
      1. Uso
        1. 1. Obtener el estado del dispositivo
        2. 2. Alternar estado del dispositivo
        3. 3. Automatización de activadores
        4. 4. Entidades de lista
      2. Contribuyendo
        1. Documentación
          1. Licencia
            1. Seguridad
              1. Apoyo

                Related MCP Servers

                • -
                  security
                  F
                  license
                  -
                  quality
                  A versatile Model Context Protocol server that enables AI assistants to manage calendars, track tasks, handle emails, search the web, and control smart home devices.
                  Last updated -
                  2
                  Python
                  • Apple
                  • Linux
                • -
                  security
                  A
                  license
                  -
                  quality
                  A Model Context Protocol server that integrates with Home Assistant to provide smart home control capabilities through natural language, supporting devices like lights, climate systems, locks, alarms, and humidifiers.
                  Last updated -
                  Python
                  MIT License
                  • Apple
                • -
                  security
                  A
                  license
                  -
                  quality
                  A Model Context Protocol server that enables AI assistants like Claude to interact directly with Home Assistant, allowing them to query device states, control smart home entities, and perform automation tasks.
                  Last updated -
                  15
                  Python
                  MIT License
                  • Apple
                  • Linux
                • -
                  security
                  F
                  license
                  -
                  quality
                  A Model Context Protocol server that connects AI assistants like Claude to Notion workspaces, enabling them to view, search, create, and update Notion databases, pages, and content blocks.
                  Last updated -
                  275
                  JavaScript
                  • Apple

                View all related MCP servers

                ID: io8m0yc5wq