freshcrate
Home > MCP Servers > ha-mcp

ha-mcp

The Unofficial and Awesome Home Assistant MCP Server

Description

The Unofficial and Awesome Home Assistant MCP Server

README

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

Home Assistant MCP Server Logo

The Unofficial and Awesome Home Assistant MCP Server

95+ Tools Release E2E Tests License
Activity Built with FastMCP Python Version GitHub Sponsors Website

A comprehensive Model Context Protocol (MCP) server that enables AI assistants to interact with Home Assistant.
Using natural language, control smart home devices, query states, execute services and manage your automations.


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:

Setup Guide for macOSSetup Guide for Windows

Quick install (~5 min)

๐ŸŽ macOS
  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 โ†’

๐ŸชŸ Windows
  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 โ†’

๐Ÿ  Home Assistant OS (Add-on)
  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 โ†’

๐ŸŒ Remote Access (Nabu Casa / Webhook Proxy)

Already have Nabu Casa or another reverse proxy pointing at your Home Assistant? The Webhook Proxy add-on routes MCP traffic through your existing setup โ€” no separate tunnel or port forwarding needed.

  1. Install the MCP Server add-on (see above) and the Webhook Proxy add-on from the same store
  2. Start the webhook proxy and restart Home Assistant when prompted
  3. Copy the webhook URL from the add-on logs:
    MCP Server URL (remote): https://xxxxx.ui.nabu.casa/api/webhook/mcp_xxxxxxxx
    
  4. Configure your AI client with that URL

For other remote access methods (Cloudflare Tunnel, custom reverse proxy), see the Setup Wizard.

Webhook proxy documentation โ†’

๐Ÿง™ Setup Wizard for 15+ clients

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

Open Setup WizardHaving issues? Check the FAQ & Troubleshooting


๐Ÿ’ฌ What Can You Do With It?

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

You Say What 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

Category Capabilities
๐Ÿ” Search Fuzzy entity search, deep config search, system overview
๐Ÿ  Control Any service, bulk device control, real-time states
๐Ÿ”ง Manage Automations, scripts, helpers, dashboards, areas, zones, groups, calendars, blueprints
๐Ÿ“Š Monitor History, statistics, camera snapshots, automation traces, ZHA devices
๐Ÿ’พ System Backup/restore, updates, add-ons, device registry
Complete Tool List (86 tools)
Category Tools
Add-ons ha_call_addon_api, ha_get_addon
Areas & Floors ha_config_list_areas, ha_config_list_floors, ha_config_remove_area, ha_config_remove_floor, ha_config_set_area, ha_config_set_floor
Automations ha_config_get_automation, ha_config_remove_automation, ha_config_set_automation
Blueprints ha_get_blueprint, ha_import_blueprint
Calendar ha_config_get_calendar_events, ha_config_remove_calendar_event, ha_config_set_calendar_event
Camera ha_get_camera_image
Dashboards ha_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
Device Registry ha_get_device, ha_remove_device, ha_update_device
Entity Registry ha_get_entity_exposure, ha_get_entity, ha_remove_entity, ha_set_entity
Files ha_delete_file, ha_list_files, ha_read_file, ha_write_file
Groups ha_config_list_groups, ha_config_remove_group, ha_config_set_group
HACS ha_hacs_add_repository, ha_hacs_download, ha_hacs_repository_info, ha_hacs_search
Helper Entities ha_config_list_helpers, ha_config_remove_helper, ha_config_set_helper, ha_get_helper_schema, ha_set_config_entry_helper
History & Statistics ha_get_automation_traces, ha_get_history, ha_get_logs
Integrations ha_delete_config_entry, ha_get_integration, ha_set_integration_enabled
Labels & Categories ha_config_get_category, ha_config_get_label, ha_config_remove_category, ha_config_remove_label, ha_config_set_category, ha_config_set_label
Scripts ha_config_get_script, ha_config_remove_script, ha_config_set_script
Search & Discovery ha_deep_search, ha_get_overview, ha_get_state, ha_search_entities
Service & Device Control ha_bulk_control, ha_call_service, ha_get_operation_status, ha_list_services
System ha_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 Lists ha_get_todo, ha_remove_todo_item, ha_set_todo_item
Utilities ha_eval_template, ha_install_mcp_tools, ha_report_issue
Zones ha_get_zone, ha_remove_zone, ha_set_zone

๐Ÿ”Œ Custom Component (ha_mcp_tools)

Some tools require a companion custom component installed in Home Assistant. Standard HA APIs do not expose file system access or YAML config editing. This component provides both.

Tools that require the component:

Tool Description
ha_config_set_yaml Safely add, replace, or remove top-level YAML keys in configuration.yaml and package files (automatic backup, validation, and config check)
ha_list_files List files in allowed directories (www/, themes/, custom_templates/)
ha_read_file Read files from allowed paths (config YAML, logs, www/, themes/, custom_templates/, custom_components/)
ha_write_file Write files to allowed directories
ha_delete_file Delete files from allowed directories

All other tools work without the component. These five return an error with installation instructions if the component is missing.

These tools also require feature flags: HAMCP_ENABLE_FILESYSTEM_TOOLS=true (file tools) and ENABLE_YAML_CONFIG_EDITING=true (YAML editing). To enable the ha_install_mcp_tools installer tool, set HAMCP_ENABLE_CUSTOM_COMPONENT_INTEGRATION=true.

Install using HACS (recommended)

Open your Home Assistant instance and open a repository inside the Home Assistant Community Store.

To add manually: open HACS > Integrations > three-dot menu > Custom repositories > add https://github.com/homeassistant-ai/ha-mcp (category: Integration) > Download.

After installing, restart Home Assistant. Then open Settings > Devices & Services > Add Integration and search for HA MCP Tools.

Install manually

Copy custom_components/ha_mcp_tools/ from this repository into your HA config/custom_components/ directory. Restart Home Assistant, then add the integration as described above.


๐Ÿง  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.

Setting Default Description
ENABLE_SKILLS true Serve skills as MCP resources. Resources are not auto-injected into context โ€” clients must explicitly request them.
ENABLE_SKILLS_AS_TOOLS true Expose 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.
  • @lcrostarosa โ€” Diagnostic and health monitoring tools concept (#675), inspiring system/error logs, repairs, and ZHA radio metrics integration.
  • @roysha1 โ€” Copilot CLI support in the installation wizard.
  • @Patch76 โ€” ha_remove_entity tool, docs sync automation, and file-read deduplication in check_sync.
  • @teancom โ€” Fix add-on stats endpoint (/addons/{slug}/stats).
  • @TomasDJo โ€” Category support for automations, scripts, and scenes.

๐Ÿ’ฌ Community


โญ Star History

Star History Chart

Release History

VersionChangesUrgencyDate
v7.3.0 ### Added - Harden ha_config_set_yaml description and require justification ([#942](https://github.com/homeassistant-ai/ha-mcp/pull/942)) - Add python_transform support to automations and scripts ([#968](https://github.com/homeassistant-ai/ha-mcp/pull/968)) - **history**: Add offset pagination for history and statistics sources ([#964](https://github.com/homeassistant-ai/ha-mcp/pull/964)) - **site**: Redesign documentation site with professional visual identity ([#938](https://github.cHigh4/15/2026
v7.2.0 ### Added - Add managed YAML config editing tool (ha_config_set_yaml) ([#827](https://github.com/homeassistant-ai/ha-mcp/pull/827)) - Tool explorer with taxonomy, auto-generated docs, and design mode ([#839](https://github.com/homeassistant-ai/ha-mcp/pull/839)) - Add generic add-on API proxy tool (ha_call_addon_api) ([#641](https://github.com/homeassistant-ai/ha-mcp/pull/641)) - Add support for automation/script/scene categories ([#677](https://github.com/homeassistant-ai/ha-mcp/pull/6Medium4/1/2026

Dependencies & License Audit

Loading dependencies...

Similar Packages

nmap-mcp๐Ÿ” Enable AI-driven network security scanning with a production-ready Nmap MCP server supporting diverse tools, scan types, and timing templates.main@2026-04-21
noapi-google-search-mcp๐Ÿ” Enable local LLMs with real-time Google search, live feeds, OCR, and video insights using noapi-google-search-mcp server tools.main@2026-04-21
hybrid-orchestrator๐Ÿค– Implement hybrid human-AI orchestration patterns in Python to coordinate agents, manage sessions, and enable smooth AI-human handoffs.master@2026-04-21
aiA productive AI coworker that learns, self-improves, and ships work.main@2026-04-21
Advanced-AI-Agents๐Ÿค– Build advanced AI agents with a collection of production-ready applications using modern frameworks for single and multi-agent systems.main@2026-04-21