homeassistant-ai

ha mcp

Built by homeassistant-ai โ€ข 1,774 stars

What is ha mcp?

The Unofficial and Awesome Home Assistant MCP Server

How to use ha mcp?

1. Install a compatible MCP client (like Claude Desktop). 2. Open your configuration settings. 3. Add ha mcp using the following command: npx @modelcontextprotocol/ha-mcp 4. Restart the client and verify the new tools are active.
๐Ÿ›ก๏ธ Scoped (Restricted)
npx @modelcontextprotocol/ha-mcp --scope restricted
๐Ÿ”“ Unrestricted Access
npx @modelcontextprotocol/ha-mcp

Key Features

Native MCP Protocol Support
Real-time Tool Activation & Execution
Verified High-performance Implementation
Secure Resource & Context Handling

Optimized Use Cases

Extending AI models with custom local capabilities
Automating system workflows via natural language
Connecting external data sources to LLM context windows

ha mcp FAQ

Q

Is ha mcp safe?

Yes, ha mcp follows the standardized Model Context Protocol security patterns and only executes tools with explicit user-granted permissions.

Q

Is ha mcp up to date?

ha mcp is currently active in the registry with 1,774 stars on GitHub, indicating its reliability and community support.

Q

Are there any limits for ha mcp?

Usage limits depend on the specific implementation of the MCP server and your system resources. Refer to the official documentation below for technical details.

Official Documentation

View on GitHub

โš ๏ธ Breaking change in OAuth mode (v7.0.0) โ€” Set HOMEASSISTANT_URL server-side. The consent form now accepts only the token. Migration guide โ†’

<div align="center"> <img src="docs/img/ha-mcp-logo.png" alt="Home Assistant MCP Server Logo" width="300"/>

The Unofficial and Awesome Home Assistant MCP Server

<!-- mcp-name: io.github.homeassistant-ai/ha-mcp --> <p align="center"> <img src="https://img.shields.io/badge/tools-92-blue" alt="95+ Tools"> <a href="https://github.com/homeassistant-ai/ha-mcp/releases"><img src="https://img.shields.io/github/v/release/homeassistant-ai/ha-mcp" alt="Release"></a> <a href="https://github.com/homeassistant-ai/ha-mcp/actions/workflows/e2e-tests.yml"><img src="https://img.shields.io/github/actions/workflow/status/homeassistant-ai/ha-mcp/e2e-tests.yml?branch=master&label=E2E%20Tests" alt="E2E Tests"></a> <a href="LICENSE.md"><img src="https://img.shields.io/github/license/homeassistant-ai/ha-mcp.svg" alt="License"></a> <br> <a href="https://github.com/homeassistant-ai/ha-mcp/commits/master"><img src="https://img.shields.io/github/commit-activity/m/homeassistant-ai/ha-mcp.svg" alt="Activity"></a> <a href="https://github.com/jlowin/fastmcp"><img src="https://img.shields.io/badge/Built%20with-FastMCP-purple" alt="Built with FastMCP"></a> <img src="https://img.shields.io/python/required-version-toml?tomlFilePath=https%3A%2F%2Fraw.githubusercontent.com%2Fhomeassistant-ai%2Fha-mcp%2Fmaster%2Fpyproject.toml" alt="Python Version"> <a href="https://github.com/sponsors/julienld"><img src="https://img.shields.io/badge/GitHub_Sponsors-โ˜•-blueviolet" alt="GitHub Sponsors"></a> </p> <p align="center"> <em>A comprehensive Model Context Protocol (MCP) server that enables AI assistants to interact with Home Assistant.<br> Using natural language, control smart home devices, query states, execute services and manage your automations.</em> </p> </div>

Demo with Claude Desktop


๐Ÿš€ Get Started

Full guide to get you started with Claude Desktop (~10 min)

No paid subscription required. Click on your operating system:

<p> <a href="https://homeassistant-ai.github.io/ha-mcp/guide-macos/"><img src="https://img.shields.io/badge/Setup_Guide_for_macOS-000000?style=for-the-badge&logo=apple&logoColor=white" alt="Setup Guide for macOS" height="120"></a>&nbsp;&nbsp;&nbsp;&nbsp;<a href="https://homeassistant-ai.github.io/ha-mcp/guide-windows/"><img src="https://img.shields.io/badge/Setup_Guide_for_Windows-0078D6?style=for-the-badge&logo=windows&logoColor=white" alt="Setup Guide for Windows" height="120"></a> </p>

Quick install (~5 min)

<details> <summary><b>๐ŸŽ macOS</b></summary>
  1. Go to claude.ai and sign in (or create a free account)
  2. Open Terminal and run:
    curl -LsSf https://raw.githubusercontent.com/homeassistant-ai/ha-mcp/master/scripts/install-macos.sh | sh
    
  3. Download Claude Desktop (or restart: Claude menu โ†’ Quit)
  4. Ask Claude: "Can you see my Home Assistant?"

You're now connected to the demo environment! Connect your own Home Assistant โ†’

</details> <details> <summary><b>๐ŸชŸ Windows</b></summary>
  1. Go to claude.ai and sign in (or create a free account)
  2. Open Windows PowerShell (from Start menu) and run:
    irm https://raw.githubusercontent.com/homeassistant-ai/ha-mcp/master/scripts/install-windows.ps1 | iex
    
  3. Download Claude Desktop (or restart: File โ†’ Exit)
  4. Ask Claude: "Can you see my Home Assistant?"

You're now connected to the demo environment! Connect your own Home Assistant โ†’

</details> <details> <summary><b>๐Ÿ  Home Assistant OS (Add-on)</b></summary>
  1. Add the repository to your Home Assistant instance:

    Add Repository

  2. Install "Home Assistant MCP Server" from the Add-on Store and wait for it to complete

  3. Click Start, then open the Logs tab to find your unique MCP URL

  4. Configure your AI client with that URL

No token or credential setup needed โ€” the add-on connects to Home Assistant automatically.

Full add-on documentation โ†’

</details>

๐Ÿง™ Setup Wizard for 15+ clients

Claude Code, Gemini CLI, ChatGPT, Open WebUI, VSCode, Cursor, and more.

<p> <a href="https://homeassistant-ai.github.io/ha-mcp/setup/"><img src="https://img.shields.io/badge/Open_Setup_Wizard-4A90D9?style=for-the-badge" alt="Open Setup Wizard" height="40"></a> </p>

Having issues? Check the FAQ & Troubleshooting


๐Ÿ’ฌ What Can You Do With It?

Just talk to Claude naturally. Here are some real examples:

You SayWhat Happens
"Create an automation that turns on the porch light at sunset"Creates the automation with proper triggers and actions
"Add a weather card to my dashboard"Updates your Lovelace dashboard with the new card
"The motion sensor automation isn't working, debug it"Analyzes execution traces, identifies the issue, suggests fixes
"Make my morning routine automation also turn on the coffee maker"Reads the existing automation, adds the new action, updates it
"Create a script that sets movie mode: dim lights, close blinds, turn on TV"Creates a reusable script with the sequence of actions

Spend less time configuring, more time enjoying your smart home.


โœจ Features

CategoryCapabilities
๐Ÿ” SearchFuzzy entity search, deep config search, system overview
๐Ÿ  ControlAny service, bulk device control, real-time states
๐Ÿ”ง ManageAutomations, scripts, helpers, dashboards, areas, zones, groups, calendars, blueprints
๐Ÿ“Š MonitorHistory, statistics, camera snapshots, automation traces, ZHA devices
๐Ÿ’พ SystemBackup/restore, updates, add-ons, device registry
<details> <!-- TOOLS_TABLE_START --> <summary><b>Complete Tool List (92 tools)</b></summary>
CategoryTools
Add-onsha_call_addon_api, ha_get_addon
Areas & Floorsha_config_list_areas, ha_config_list_floors, ha_config_remove_area, ha_config_remove_floor, ha_config_set_area, ha_config_set_floor
Automationsha_config_get_automation, ha_config_remove_automation, ha_config_set_automation
Blueprintsha_get_blueprint, ha_import_blueprint
Calendarha_config_get_calendar_events, ha_config_remove_calendar_event, ha_config_set_calendar_event
Cameraha_get_camera_image
Dashboardsha_config_delete_dashboard_resource, ha_config_delete_dashboard, ha_config_get_dashboard, ha_config_list_dashboard_resources, ha_config_set_dashboard_resource, ha_config_set_dashboard, ha_dashboard_find_card
Device Registryha_get_device, ha_remove_device, ha_rename_entity, ha_update_device
Entity Registryha_get_entity_exposure, ha_get_entity, ha_set_entity
Filesha_delete_file, ha_list_files, ha_read_file, ha_write_file
Groupsha_config_list_groups, ha_config_remove_group, ha_config_set_group
HACSha_hacs_add_repository, ha_hacs_download, ha_hacs_info, ha_hacs_list_installed, ha_hacs_repository_info, ha_hacs_search
Helper Entitiesha_config_list_helpers, ha_config_remove_helper, ha_config_set_helper, ha_get_helper_schema, ha_set_config_entry_helper
History & Statisticsha_get_automation_traces, ha_get_history, ha_get_logbook, ha_get_statistics
Integrationsha_delete_config_entry, ha_get_integration, ha_set_integration_enabled
Labels & Categoriesha_config_get_category, ha_config_get_label, ha_config_remove_category, ha_config_remove_label, ha_config_set_category, ha_config_set_label
Scriptsha_config_get_script, ha_config_remove_script, ha_config_set_script
Search & Discoveryha_deep_search, ha_get_overview, ha_get_state, ha_get_states, ha_search_entities
Service & Device Controlha_bulk_control, ha_call_service, ha_get_operation_status, ha_list_services
Systemha_backup_create, ha_backup_restore, ha_check_config, ha_config_set_yaml, ha_get_system_health, ha_get_updates, ha_reload_core, ha_restart
Todo Listsha_add_todo_item, ha_get_todo, ha_remove_todo_item, ha_update_todo_item
Utilitiesha_eval_template, ha_install_mcp_tools, ha_report_issue
Zonesha_get_zone, ha_remove_zone, ha_set_zone
<!-- TOOLS_TABLE_END --> </details>

๐Ÿง  Better Results with Agent Skills

This server gives your AI agent tools to control Home Assistant. For better configurations, pair it with Home Assistant Agent Skills โ€” domain knowledge that teaches the agent Home Assistant best practices.

An MCP server can create automations, helpers, and dashboards, but it has no opinion on how to structure them. Without domain knowledge, agents tend to over-rely on templates, pick the wrong helper type, or produce automations that are hard to maintain. The skills fill that gap: native constructs over Jinja2 workarounds, correct helper selection, safe refactoring workflows, and proper use of automation modes.

Bundled Skills (built-in)

Skills from homeassistant-ai/skills are bundled and served as MCP resources via skill:// URIs. Any MCP client that supports resources can discover them automatically โ€” no manual installation needed.

SettingDefaultDescription
ENABLE_SKILLStrueServe skills as MCP resources. Resources are not auto-injected into context โ€” clients must explicitly request them.
ENABLE_SKILLS_AS_TOOLStrueExpose skills and doc resources via list_resources/read_resource tools. Resource-capable clients can set to false to reduce tool count.

Skills can still be installed manually for clients that prefer local skill files โ€” see the skills repo for instructions.


๐Ÿงช Dev Channel

Want early access to new features and fixes? Dev releases (.devN) are published on every push to master.

Dev Channel Documentation โ€” Instructions for pip/uvx, Docker, and Home Assistant add-on.


๐Ÿค Contributing

For development setup, testing instructions, and contribution guidelines, see CONTRIBUTING.md.

For comprehensive testing documentation, see tests/README.md.


๐Ÿ”’ Privacy

Ha-mcp runs locally on your machine. Your smart home data stays on your network.

  • Configurable telemetry โ€” optional anonymous usage stats
  • No personal data collection โ€” we never collect entity names, configs, or device data
  • User-controlled bug reports โ€” only sent with your explicit approval

For full details, see our Privacy Policy.


๐Ÿ“„ License

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


๐Ÿ™ Acknowledgments

๐Ÿ‘ฅ Contributors

Maintainers

Contributors

  • @bigeric08 โ€” Explicit mcp dependency for protocol version 2025-11-25 support.
  • @airlabno โ€” Support for data field in schedule time blocks.
  • @ryphez โ€” Codex Desktop UI MCP quick setup guide.
  • @Danm72 โ€” Entity registry tools (ha_set_entity, ha_get_entity) for managing entity properties.
  • @Raygooo โ€” SOCKS proxy support.
  • @cj-elevate โ€” Integration & entity management tools (enable/disable/delete); person/zone/tag config store routing.
  • @maxperron โ€” Beta testing.
  • @kingbear2 โ€” Windows UV setup guide.
  • @konradwalsh โ€” Financial support via GitHub Sponsors. Thank you! โ˜•
  • @knowald โ€” Area resolution via device registry in ha_get_system_overview for entities assigned through their parent device.
  • @zorrobyte โ€” Per-client WebSocket credentials in OAuth mode, fixing WebSocket tool failures.
  • @deanbenson โ€” Fixed ha_deep_search timeout on large Home Assistant instances with many automations.
  • @saphid โ€” Config entry options flow tools (initial design, #590).
  • @adraguidev โ€” Fix menu-based config entry flows for group helpers (#647).
  • @transportrefer โ€” Integration options inspection (ha_get_integration schema support, #689).
  • @teh-hippo โ€” Fix blueprint import missing save step.
  • @smenzer โ€” Documentation fix.
  • @The-Greg-O โ€” REST API for config entry deletion.
  • @restriction โ€” Responsible disclosure: python_transform sandbox missing call target validation.

๐Ÿ’ฌ Community


โญ Star History

Star History Chart

Global Ranking

-
Trust ScoreMCPHub Index

Based on codebase health & activity.

Manual Config

{ "mcpServers": { "ha-mcp": { "command": "npx", "args": ["ha-mcp"] } } }