Back to Home
homeassistant-ai icon

ha-mcp

Verified Safe

by homeassistant-ai

Overview

A Model Context Protocol (MCP) server that provides AI agents with comprehensive control and monitoring capabilities for Home Assistant through REST API and WebSocket integration, offering over 20 enhanced tools for smart home management and automation.

Installation

Run Command
ha-mcp web

Environment Variables

  • HOMEASSISTANT_URL
  • HOMEASSISTANT_TOKEN
  • LOG_LEVEL
  • MCP_API_KEY
  • MCP_WEB_SECRET
  • FUZZY_THRESHOLD
  • BACKUP_HINT
  • HAMCP_ENABLE_CUSTOM_COMPONENT_INTEGRATION

Security Notes

The server's security is largely dependent on the underlying Home Assistant instance it connects to and the validity of the provided long-lived access token. The application logic generally delegates complex operations (like template evaluation) to Home Assistant's internal APIs, relying on HA's inherent sandboxing. File system interactions, such as those related to the 'ha_mcp_tools' custom component, include explicit path validation against allowed directories, demonstrating a conscious effort to limit potential access. The 'ha_install_mcp_tools' tool, which handles HACS component installation, is disabled by default behind a feature flag and targets a specific hardcoded repository, preventing arbitrary code injection through user input. Proper management of Home Assistant itself, including strong API token security, is crucial.

Similar Servers

Stats

Interest Score79
Security Score8
Cost ClassMedium
Avg Tokens750
Stars119
Forks1
Last Update2025-12-06

Tags

Home AssistantSmart HomeAI AgentMCPAutomationIoTWebSocketREST APIConfigurationMonitoring