Home Assistant MCP Server
Provides comprehensive tools for controlling smart home devices, querying states, executing services, managing automations, scripts, dashboards, areas, zones, groups, calendars, blueprints, backups, add-ons, and more through Home Assistant.
Click on "Install Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@Home Assistant MCP Serverturn on the living room lights"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
Breaking change (v7.3.0):
ha_config_set_yamlhas been moved to beta.
The Unofficial and Awesome Home Assistant MCP Server

๐ Get Started
Full guide to get you started with Claude Desktop (~10 min)
No paid subscription required. Click on your operating system:
Quick install (~5 min)
Go to claude.ai and sign in (or create a free account)
Open Terminal and run:
curl -LsSf https://raw.githubusercontent.com/homeassistant-ai/ha-mcp/master/scripts/install-macos.sh | shDownload Claude Desktop (or restart: Claude menu โ Quit)
Ask Claude: "Can you see my Home Assistant?"
You're now connected to the demo environment! Connect your own Home Assistant โ
Anthropic doesn't ship Claude Desktop for Linux, so pick one path:
Claude Desktop โ free, via the community build:
Install the community Claude Desktop for Linux build and sign in with a free claude.ai account
Open Terminal and run:
curl -LsSf https://raw.githubusercontent.com/homeassistant-ai/ha-mcp/master/scripts/install-linux.sh | shRestart Claude Desktop, then ask: "Can you see my Home Assistant?"
Claude Code โ official CLI, requires a paid Claude plan:
Install Claude Code:
curl -fsSL https://claude.ai/install.sh | bashConfigure ha-mcp, then run
claude:curl -LsSf https://raw.githubusercontent.com/homeassistant-ai/ha-mcp/master/scripts/install.sh | sh -s -- --claude-codeStart
claude, run/mcpto confirm, then ask: "Can you see my Home Assistant?"
Go to claude.ai and sign in (or create a free account)
Open Windows PowerShell (from Start menu) and run:
irm https://raw.githubusercontent.com/homeassistant-ai/ha-mcp/master/scripts/install-windows.ps1 | iexDownload Claude Desktop (or restart: File โ Exit)
Ask Claude: "Can you see my Home Assistant?"
You're now connected to the demo environment! Connect your own Home Assistant โ
Add the repository to your Home Assistant instance:
Install "Home Assistant MCP Server" from the Add-on Store and wait for it to complete
Click Start, then open the Logs tab to find your unique MCP URL
Configure your AI client with that URL
No token or credential setup needed โ the add-on connects to Home Assistant automatically.
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.
Install the MCP Server add-on (see above) and the Webhook Proxy add-on from the same store
Start the webhook proxy and restart Home Assistant when prompted
Copy the webhook URL from the add-on logs:
MCP Server URL (remote): https://xxxxx.ui.nabu.casa/api/webhook/mcp_xxxxxxxxConfigure 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.
Having issues? Check the FAQ & Troubleshooting
Related MCP server: Enhanced Home Assistant MCP
๐ฌ 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 |
๐ Safety | Read Only Mode toggle, per-tool enable/disable, tool security policies (user approval), automatic edit backups |
Category | Tools |
Add-ons |
|
Areas & Floors |
|
Assist |
|
Automations |
|
Blueprints |
|
Calendar |
|
Camera |
|
Dashboard |
|
Dashboards |
|
Device Registry |
|
Energy |
|
Entity Registry |
|
Files |
|
Groups |
|
HACS |
|
Helper Entities |
|
History & Statistics |
|
Integrations |
|
Labels & Categories |
|
Scenes |
|
Scripts |
|
Search & Discovery |
|
Service & Device Control |
|
System |
|
Todo Lists |
|
Utilities |
|
Zones |
|
๐ ha-mcp vs. Home Assistant's built-in MCP Server
Home Assistant ships its own MCP Server integration. It is built on the Assist pipeline, so a connected MCP client can read and control the entities you have exposed to Assist and run the intents Assist understands โ handy for voice-style control of already-exposed devices.
ha-mcp is a standalone server built for configuring, building, and debugging your smart home, not just controlling it. On top of device control, it adds capabilities the built-in integration does not have:
Capability | Built-in MCP Server | ha-mcp |
Control exposed devices, query states | Yes | Yes |
Entity scope | Only entities exposed to Assist | Everything in Home Assistant |
Create / edit automations, scripts, scenes | No | Yes |
Build & edit dashboards | No | Yes |
Debug automations from traces, read history & logs | No | Yes |
Manage helpers, areas, zones, labels, groups | No | Yes |
Backups, add-ons, HACS, device & entity registry | No | Yes |
Rule of thumb: Use the built-in integration for voice-style control of devices you have already exposed; use ha-mcp when you want an AI assistant that can also build and maintain your Home Assistant setup.
๐ Custom Component (ha_mcp_tools) (beta)
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 |
| Safely add, replace, or remove top-level YAML keys in |
| List files in allowed directories (www/, themes/, custom_templates/) |
| Read files from allowed paths (config YAML, logs, www/, themes/, custom_templates/, custom_components/) |
| Write files to allowed directories |
| 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)
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 Home Assistant MCP Server Custom Component.
On Home Assistant OS / Supervised, the integration offers to add the add-on repository and install and start the Home Assistant MCP Server add-on for you โ no need to add the add-on repository by hand. On Container / Core installs (no Supervisor) there is no add-on; run the server via Docker or pip and the integration just sets up the file/YAML services.
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. For tool-only clients (claude.ai, etc.), the same skills are reachable through the polymorphic ha_get_skill_guide tool โ call it with no args to list bundled skills, with a skill arg to list its files, or with skill + file to read content. Resources are not auto-injected into context โ clients must explicitly request them, so idle context cost is just the metadata listing.
ha_get_skill_guide is a mandatory tool: the catalog always exposes it (it can't be disabled) so tool-only clients never see a silently missing skill surface.
Skills can still be installed manually for clients that prefer local skill files โ see the skills repo for instructions.
๐ Tool Discovery for AI Agents
By default, the full tool catalog (~86 tools) is listed to the client through the standard MCP tools/list response. Clients with deferred / on-demand tool loading (Claude Sonnet, Claude Opus,) handle that fine โ tools are pulled into context only when needed, so idle context cost is near-zero.
For models without deferred tool support โ Claude Haiku, Gemini, ChatGPT OpenAI-compatible local models, smaller open-weights models โ listing 86 tools eats ~46K tokens of idle context. To address that, the server ships with a search-based discovery mode built on top of FastMCP's BM25 search transform.
Enable search-based discovery
Set ENABLE_TOOL_SEARCH=true (or toggle the option in the HA add-on). The full catalog is replaced in the tool list with four entry points plus a small set of always-visible "pinned" tools (ha_search_entities, ha_get_overview, ha_restart, etc.). All tools remain callable directly by name once discovered:
Tool | Purpose |
| BM25 keyword search across all tools. Returns name, description, parameters, and annotations ( |
| Execute a |
| Execute a write tool that creates or updates data. |
| Execute a tool that removes / deletes data. |
The proxy split lets MCP clients apply different permission policies per category (e.g. auto-approve reads, prompt for writes, confirm deletes) without parsing tool docstrings.
Setting | Default | Description |
|
| Replace full tool catalog with search-based discovery (~46K โ ~5K idle tokens). |
|
| Max results returned by |
| empty | Comma-separated tool names to keep always visible. The web settings UI is the primary way to manage this. |
When to enable
Claude Haiku, OpenAI-compatible local models, Gemini, ChatGPT or any model without native deferred tool support โ large idle-context savings.
MCP clients that cap total tool count (some cap at 100) โ surfaces a minimal set (~10 tools) instead of 86.
Cost-sensitive deployments โ fewer idle tokens per turn.
Leave it off when using Claude Sonnet/Opus or any client with deferred tool loading; the full catalog has no idle cost there and direct calls skip the search step. If you choose to use our toolsearch then you should disable the native Claude Opus/Sonnet toolsearch, which is called deferred tools in the settings.
For the HA add-on, the same option is documented in homeassistant-addon/DOCS.md along with the in-add-on settings UI for fine-grained tool enable/disable/pin.
๐งช 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.
No telemetry today โ anonymous usage stats are a planned future feature (as of June 2026); when it lands it will follow your Home Assistant analytics/telemetry setting (which you can override), announced prominently in the release notes and the web Settings UI at least one month beforehand
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
Home Assistant: Amazing smart home platform (!)
FastMCP: Excellent MCP server framework
Model Context Protocol: Standardized AI-application communication
Claude Code: AI-powered coding assistant
PolicyLayer: Argument-path predicate DSL shape (
args.domain in [...]witheq/in/regex/contains/exists/...) inspired the per-tool approval rule schema (#966).
๐ฅ Contributors
Maintainers
@julienld โ Project creator.
@sergeykad โ Core maintainer.
@kingpanther13 โ Core maintainer.
@Patch76 โ Core maintainer.
Contributors
@bigeric08 โ Explicit
mcpdependency for protocol version 2025-11-25 support.@airlabno โ Support for
datafield 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_overviewfor entities assigned through their parent device. Financial support via GitHub Sponsors. Thank you! โ@zorrobyte โ Per-client WebSocket credentials in OAuth mode, fixing WebSocket tool failures.
@deanbenson โ Fixed
ha_deep_searchtimeout 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_integrationschema 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; replaced placeholder logo SVGs with real brand icons on the documentation site.
@teancom โ Fix add-on stats endpoint (
/addons/{slug}/stats).@TomasDJo โ Category support for automations, scripts, and scenes.
@bzelch โ
python_transformsupport for automations and scripts.@gcormier โ Windows installer improvements: removed unused variable and fixed terminal closing after install.
@ekobres โ Feature flags for
HAMCP_ENABLE_FILESYSTEM_TOOLSandHAMCP_ENABLE_CUSTOM_COMPONENT_INTEGRATIONin the add-on config, with beta tagging in source and docs.@w3z315 โ Financial support via GitHub Sponsors. Thank you! โ
@griffinmartin โ Added OpenCode (by Anomaly) as a selectable AI client in the setup wizard, with both stdio and streamable HTTP support.
@hhopke โ Fixed addon API calls to route through HA Core ingress proxy instead of direct container connections, fixing
ha_manage_addonproxy mode on addon installs.@tomwilkie โ JMESPath middleware exploration (#1147) whose review-time token-measurement data informed the design of #1199 and #1225.
@SealKan โ
fields=/attribute_keys=projection on six read-heavy tools (#1225),ha_call_eventtool (#1239), dashboards-list helper refactor (#1207),for:-field duration-math detector in the best-practice checker (#1264), persistent DCR OAuth client registrations across restarts (#1265), and issue-triage prompt token-budgeting (#1522).@KarelTestSpecial โ Cached YAML instance to prevent CPU spikes during bulk edits (#1371).
@corgan2222 โ HA brand assets for custom integration (#1317).
@drseanwing โ Progress emission via FastMCP
Contextin long-running tools (#1124); tool-discovery / categorized-search docs (#1123).@fnordpig โ Config subentry support (#1393) and Assist pipeline management tool (#1392).
@paul43210 โ
array_patchmode inha_manage_addonfor atomic GET-modify-POST (#1063).@L1AD โ Filed #966 proposing tool security policies; pointed to PolicyLayer's MCP-security work as prior art that inspired the predicate DSL shape.
@nightcityblade โ Updated stale Home Assistant Advanced Mode references after HA 2026.6 made formerly advanced options available by default (#1533).
@emmelutzer โ Financial support via GitHub Sponsors. Thank you! โ
๐ฌ Community
GitHub Discussions โ Ask questions, share ideas
Issue Tracker โ Report bugs, request features, or suggest tool behavior improvements
โญ Star History
This server cannot be installed
Maintenance
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
Latest Blog Posts
- Your AI Chatbot Just Exposed Your CEO's Salary to an InternBy Om-Shree-0709 on .Agent IdentityMCP SecurityOAuth Delegation
- Why MCP Servers Need Execution Sandboxing (And Why Your Current Stack Isn't Enough)By Om-Shree-0709 on .Agentic AiPrompt InjectionWebAssembly
MCP directory API
We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/harry189/ha-mcp'
If you have feedback or need assistance with the MCP directory API, please join our Discord server