Back to Home
DawidSu icon

ha-mcp-server

Verified Safe

by DawidSu

Overview

Provides a Model Context Protocol (MCP) server for Claude AI to securely and efficiently interact with Home Assistant configuration files, offering both Docker-based server deployment and Linux desktop integration tools.

Installation

Run Command
docker-compose up -d

Environment Variables

  • HA_CONFIG_PATH
  • LOG_LEVEL
  • BACKUP_BEFORE_CHANGE
  • MAX_BACKUPS
  • USE_GIT
  • MONITOR_INTERVAL
  • DASHBOARD_PORT
  • FRONTEND_PORT
  • NODE_ENV
  • MCP_SERVER_URL
  • CACHE_ENABLED
  • CACHE_DEFAULT_TTL
  • CACHE_MAX_SIZE
  • RATE_LIMIT_ENABLED
  • RATE_LIMIT_MAX
  • RATE_LIMIT_WINDOW
  • CB_FAILURE_THRESHOLD
  • CB_RECOVERY_TIMEOUT
  • CB_SUCCESS_THRESHOLD
  • HC_DISK_WARNING_THRESHOLD
  • HC_MEMORY_WARNING_THRESHOLD

Security Notes

The project demonstrates significant effort in security, implementing input validation, file access control (path traversal, extension/size limits, suspicious patterns), and rate limiting via `security-utils.sh`. It uses non-root Docker users and includes extensive security documentation. However, the `cache-manager.sh` script uses `eval "$command"`, allowing arbitrary command execution. While this is currently used for internal commands, its presence in a script callable by the Node.js API server (via `child_process.exec`) poses a critical remote code execution (RCE) vulnerability if an injection vector were to be discovered or introduced. Similarly, the `claude-mcp-widget.py` uses `subprocess.Popen` with f-strings for SSH commands, which, if not properly sanitized or if user input is maliciously crafted, could lead to command injection, though SSH clients typically offer some protection. Users must ensure strict control over all inputs and environments.

Similar Servers

Stats

Interest Score0
Security Score5
Cost ClassHigh
Avg Tokens50000
Stars0
Forks0
Last Update2026-01-19

Tags

Home AssistantClaude AIMCP ProtocolDockerLinux DesktopAutomationObservability