{"type":"mcp_server","name":"hass-mcp","description":"Hass-MCP is a Model Context Protocol server that integrates Home Assistant with AI assistants like Claude, enabling them to query, control, and summarize smart home devices and automations.","category":"AI","language":"Python","stars":309,"forks":0,"owner":"voska","github_url":"https://github.com/voska/hass-mcp","homepage":null,"setup":"## Setup\n\n### Prerequisites\n\n- Home Assistant instance with Long-Lived Access Token\n- One of the following:\n  - Docker (recommended)\n  - Python 3.13+ and [uv](https://github.com/astral-sh/uv)\n\n## Setting Up With Claude Desktop\n\n### Docker Installation (Recommended)\n\n1. Pull the Docker image:\n\n   ```bash\n   docker pull voska/hass-mcp:latest\n   ```\n\n2. Add the MCP server to Claude Desktop:\n\n   a. Open Claude Desktop and go to Settings\n   b. Navigate to Developer > Edit Config\n   c. Add the following configuration to your `claude_desktop_config.json` file:\n\n   ```json\n   {\n     \"mcpServers\": {\n       \"hass-mcp\": {\n         \"command\": \"docker\",\n         \"args\": [\n           \"run\",\n           \"-i\",\n           \"--rm\",\n           \"-e\",\n           \"HA_URL\",\n           \"-e\",\n           \"HA_TOKEN\",\n           \"voska/hass-mcp\"\n         ],\n         \"env\": {\n           \"HA_URL\": \"http://homeassistant.local:8123\",\n           \"HA_TOKEN\": \"YOUR_LONG_LIVED_TOKEN\"\n         }\n       }\n     }\n   }\n   ```\n\n   d. Replace `YOUR_LONG_LIVED_TOKEN` with your actual Home Assistant long-lived access token\n   e. Update the `HA_URL`:\n\n   - If running Home Assistant on the same machine: use `http://host.docker.internal:8123` (Docker Desktop on Mac/Windows)\n   - If running Home Assistant on another machine: use the actual IP or hostname\n\n   f. Save the file and restart Claude Desktop\n\n3. The \"Hass-MCP\" tool should now appear in your Claude Desktop tools menu\n\n> **Note**: If you're running Home Assistant in Docker on the same machine, you may need to add `--network host` to the Docker args for the container to access Home Assistant. Alternatively, use the IP address of your machine instead of `host.docker.internal`.\n\n## Other MCP Clients\n\n### Cursor\n\n1. Go to Cursor Settings > MCP > Add New MCP Server\n2. Fill in the form:\n   - Name: `Hass-MCP`\n   - Type: `command`\n   - Command:\n     ```\n     docker run -i --rm -e HA_URL=http://homeassistant.local:8123 -e HA_TOKEN=YOUR_LONG_LIVED_TOKEN voska/hass-mcp\n     ```\n   - Replace `YOUR_LONG_LIVED_TOKEN` with your actual Home Assistant token\n   - Update the HA_URL to match your Home Assistant instance address\n3. Click \"Add\" to save\n\n### Claude Code (CLI)\n\nTo use with Claude Code CLI, you can add the MCP server directly using the `mcp add` command:\n\n**Using Docker (recommended):**\n\n```bash\nclaude mcp add hass-mcp -e HA_URL=http://homeassistant.local:8123 -e HA_TOKEN=YOUR_LONG_LIVED_TOKEN -- docker run -i --rm -e HA_URL -e HA_TOKEN voska/hass-mcp\n```\n\nReplace `YOUR_LONG_LIVED_TOKEN` with your actual Home Assistant token and update the HA_URL to match your Home Assistant instance address.","tools":"## Available Tools\n\n1. Entity Management (Get states, control devices, and search for entities)\n2. Domain Summaries (Get high-level information about entity types)\n3. Automation Support (List and control automations)\n4. Guided Conversations (Use prompts for common tasks like creating automations)\n5. Smart Search (Find entities by name, type, or state)\n6. Token Efficiency (Lean JSON responses to minimize token usage)\n7. `get_version` (Get the Home Assistant version)\n8. `get_entity` (Get the state of a specific entity with optional field filtering)\n9. `entity_action` (Perform actions on entities (turn on, off, toggle))\n10. `list_entities` (Get a list of entities with optional domain filtering and search)\n11. `search_entities_tool` (Search for entities matching a query)\n12. `domain_summary_tool` (Get a summary of a domain's entities)\n13. `list_automations` (Get a list of all automations)\n14. `call_service_tool` (Call any Home Assistant service)\n15. `restart_ha` (Restart Home Assistant)\n16. `get_history` (Get the state history of an entity)\n17. `get_error_log` (Get the Home Assistant error log)\n18. `create_automation` (Guide for creating Home Assistant automations based on trigger type)\n19. `debug_automation` (Troubleshooting help for automations that aren't working)\n20. `troubleshoot_entity` (Diagnose issues with entities)\n21. `routine_optimizer` (Analyze usage patterns and suggest optimized routines based on actual behavior)\n22. `automation_health_check` (Review all automations, find conflicts, redundancies, or improvement opportunities)\n23. `entity_naming_consistency` (Audit entity names and suggest standardization improvements)\n24. `dashboard_layout_generator` (Create optimized dashboards based on user preferences and usage patterns)","faq":null,"created_at":"2025-03-16T18:27:30+00:00","updated_at":"2025-03-25T10:19:43+00:00","source_url":"https://model-context-protocol.com/servers/home-assistant-ai-assistant-integration-server","related_articles":[]}