Skip to main content

Home Assistant MCP Server - Complete control of Home Assistant through MCP

Project description

โš ๏ธ Breaking change in OAuth (beta) mode โ€” v7.0.0 requires HOMEASSISTANT_URL to be set server-side. See issue #749 for migration instructions.

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

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 macOSย ย ย ย Setup 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 โ†’

๐Ÿง™ Setup Wizard for 15+ clients

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

Open Setup Wizard

Having 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 (96 tools)
Category Tools
Search & Discovery ha_search_entities, ha_deep_search, ha_get_overview, ha_get_state
Service & Device Control ha_call_service, ha_bulk_control, ha_get_operation_status, ha_get_bulk_status, ha_list_services
Automations ha_config_get_automation, ha_config_set_automation, ha_config_remove_automation
Scripts ha_config_get_script, ha_config_set_script, ha_config_remove_script
Helper Entities ha_config_list_helpers, ha_config_set_helper, ha_config_remove_helper
Dashboards ha_config_get_dashboard, ha_config_set_dashboard, ha_config_delete_dashboard, ha_get_dashboard_guide, ha_get_card_documentation
Areas & Floors ha_config_list_areas, ha_config_set_area, ha_config_remove_area, ha_config_list_floors, ha_config_set_floor, ha_config_remove_floor
Labels ha_config_get_label, ha_config_set_label, ha_config_remove_label, ha_manage_entity_labels
Zones ha_get_zone, ha_set_zone, ha_remove_zone
Groups ha_config_list_groups, ha_config_set_group, ha_config_remove_group
Todo Lists ha_get_todo, ha_add_todo_item, ha_update_todo_item, ha_remove_todo_item
Calendar ha_config_get_calendar_events, ha_config_set_calendar_event, ha_config_remove_calendar_event
Blueprints ha_list_blueprints, ha_get_blueprint, ha_import_blueprint
Device Registry ha_get_device, ha_update_device, ha_remove_device, ha_rename_entity
ZHA & Integrations ha_get_zha_devices, ha_get_entity_integration_source
Add-ons ha_get_addon
Camera ha_get_camera_image
History & Statistics ha_get_history, ha_get_statistics
Automation Traces ha_get_automation_traces
System & Updates ha_check_config, ha_restart, ha_reload_core, ha_get_system_info, ha_get_system_health, ha_get_updates
Backup & Restore ha_backup_create, ha_backup_restore
Utility ha_get_logbook, ha_eval_template, ha_get_domain_docs, ha_get_integration

๐Ÿง  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 false Also expose skills via list_resources/read_resource tools for clients that don't support MCP resources natively.

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).
  • @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).

๐Ÿ’ฌ Community


โญ Star History

Star History Chart

Project details


Release history Release notifications | RSS feed

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

ha_mcp_dev-7.0.0.dev270.tar.gz (269.5 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

ha_mcp_dev-7.0.0.dev270-py3-none-any.whl (309.3 kB view details)

Uploaded Python 3

File details

Details for the file ha_mcp_dev-7.0.0.dev270.tar.gz.

File metadata

  • Download URL: ha_mcp_dev-7.0.0.dev270.tar.gz
  • Upload date:
  • Size: 269.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for ha_mcp_dev-7.0.0.dev270.tar.gz
Algorithm Hash digest
SHA256 20c0d306bc2d93083e7a5346d6dbdda30f919bbd520e783bc5ab85dfe0eee955
MD5 b34c35b7a65400ac0e5f142e9955e504
BLAKE2b-256 bb19980563b15faf44560afd8a5a7866cf8564c8c03989c483552447162e9c9b

See more details on using hashes here.

Provenance

The following attestation bundles were made for ha_mcp_dev-7.0.0.dev270.tar.gz:

Publisher: publish-dev.yml on homeassistant-ai/ha-mcp

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file ha_mcp_dev-7.0.0.dev270-py3-none-any.whl.

File metadata

File hashes

Hashes for ha_mcp_dev-7.0.0.dev270-py3-none-any.whl
Algorithm Hash digest
SHA256 3cf17484960293393d79ec95e7824af92f250b0dac04932184a6c97c9611241f
MD5 fe9c05611c4fedb8dc39aa0975c534d1
BLAKE2b-256 35fadf30d78c0266e5c06791b3a7e75d854f8387839969b034cbe437cce6aacf

See more details on using hashes here.

Provenance

The following attestation bundles were made for ha_mcp_dev-7.0.0.dev270-py3-none-any.whl:

Publisher: publish-dev.yml on homeassistant-ai/ha-mcp

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page