Ha MCP Integration 标志

Ha MCP Integration

组织
homeassistant-ai

HA-MCP Custom Component - HACS distribution mirror of homeassistant-ai/ha-mcp (integration only)

发布者homeassistant-ai
代码仓库ha-mcp-integration
语言Python
复刻数
3
星标数
69
可用工具
0
传输类型stdio
许可协议MIT
链接
  • 将工具接入 AI 工作流

    Ha MCP Integration 提供 MCP 功能,可供兼容的 AI 客户端和智能体使用。

  • 0 个可用工具

    浏览下方可调用的操作;如果服务器提供了名称和描述,也会一并显示。

  • 可直接复制的配置

    使用安装配置片段,在您首选的 MCP 客户端中配置此服务器。

  • 开源社区热度

    关联的代码仓库有 69 个星标和 3 个复刻。

HA-MCP Custom Component

HACS distribution repository for the ha-mcp custom integration. The source of truth is the main repository - homeassistant-ai/ha-mcp - which syncs this repository automatically.

  • Stable: install the latest release (default in HACS).
  • Development: enable this repository's Pre-release switch in HACS (an entity HACS creates per downloaded repository, disabled by default) to receive -dev.N pre-release builds. Their new features may require a newer server and only become fully usable with the next stable release. To install a specific development build, open the repository menu in HACS and select Update information. Open the menu again, select Redownload, expand Need a different version?, choose the desired pre-release, and select Download. Home Assistant will then show a notification that a restart is required; restart from that notification to finish installing the selected integration version. If you do not want notifications for later development releases, turn the repository's Pre-release switch off again; HACS will continue checking stable releases and notify you when the next stable version is available.

Please open issues and pull requests on the main repository - this mirror carries no hand-made changes.


Breaking change (v7.3.0): ha_config_set_yaml has been moved to beta.

The Unofficial and Awesome Home Assistant MCP Server


Demo with Claude Desktop


🚀 Get Started

The recommended way to run ha-mcp is the HA-MCP Custom Component. It installs into Home Assistant through HACS, runs the full server in-process, and works on every Home Assistant installation type — Home Assistant OS, Supervised, Container, and Core — with full feature parity. It is the easiest setup in every case: setup asks for an administrator access token and how clients may connect.

Add it to Home Assistant via HACS (the preferred install):

Add HA-MCP to HACS

Quick start:

  1. Install the HA-MCP Custom Component from HACS — click the badge above, or in HACS open Integrations → ⋮ → Custom repositories, add https://github.com/homeassistant-ai/ha-mcp-integration (category: Integration), then Download.
  2. Restart Home Assistant.
  3. Decide which administrator account the server acts as. Either create a long-lived access token on your own account (your profile → Security → Long-lived access tokens → Create token; it works from anywhere if it leaks, and the server's changes show under your name), or, safer, create an account just for HA-MCP under Settings → People → Add person with Allow login, Local access only and Administrator on. Never use your own login for the second option.
  4. Go to Settings → Devices & Services → Add Integration, search for HA-MCP Custom Component and choose HA-MCP Server. Paste your token, or enter the user name and password of the account you made for HA-MCP (HA-MCP creates its token), pick how clients may connect — Remote access through Home Assistant (start with Secret URL, the simplest; Home Assistant sign-in adds a login) and/or Network access: Local network — then click Submit. Both start disabled, so a client on another device needs one of them.
  5. Copy the connect URL from the entry's Configure screen (Settings → Devices & Services → HA-MCP Custom Component → HA-MCP Server → Configure). A notification confirms the server started and points you there.
  6. Paste that URL into your AI client — done.

Connect URL. The Configure screen gives you a Home Assistant webhook URL for remote clients — https://<your-ha-domain>/api/webhook/<webhook-id> through Nabu Casa or any reverse proxy already pointed at Home Assistant (locally, http://<ha-host>:8123/api/webhook/<webhook-id>). For clients on the same network, the server is also reachable directly at http://<ha-ip>:9584/private_<random>.

  • Replaces other install methods: the in-process server is a complete, standalone ha-mcp install — it takes the place of the app (add-on), Docker, and uvx/PyPI (stdio) methods. Run only one; do not run the in-process server alongside another install.
  • Local only? Leave remote access disabled at setup (or turn off Remote access via webhook in the entry options) — no webhook is registered at all, while the direct port and sidebar panel keep working.
  • Settings panel: while the server runs, an admin-only HA-MCP panel appears in the Home Assistant sidebar for managing tools, feature flags, backups, and themes.
  • Optional authentication: set Authentication mode to ha_auth to require a Home Assistant account sign-in instead of using the secret URL as the credential.
  • Manual install (no HACS): copy custom_components/ha_mcp_tools/ from this repository into your Home Assistant config/custom_components/ directory, then restart and add the integration as above.

The component's second entry type, the File & YAML services entry (HA-MCP File & YAML Tools), is only needed if you enable ha-mcp's opt-in file and YAML editing tools (feature flags, off by default) — skip it otherwise; you can add it later at any time. It works with any server type (in-process, app, Docker, or stdio).

Full in-process server documentation → · Setup Wizard for client-specific config →

🏠 Home Assistant app (add-on)

Prefer to run ha-mcp as a Home Assistant app (add-on)? On Home Assistant OS and Supervised installs it is a close second — no access token to manage, and it works with Claude Desktop, Claude.ai, ChatGPT, and any other MCP client on your local network or configured for remote access.

  1. Add the repository to your Home Assistant instance:

    Add Repository

    If that opens the App store without an add-repository dialog (a known Home Assistant issue), add it manually: Settings → Apps → Install app → ⋮ → Repositories, then paste https://github.com/homeassistant-ai/ha-mcp.

  2. Install "Home Assistant MCP Server" from Settings → Apps → Install app and click Start. (Home Assistant 2026.2 renamed "Add-ons" to "Apps"; on older versions this is the Add-on store.)

  3. Open the Logs tab to find your unique MCP URL.

  4. Connect your AI client to that URL — no token or credential setup needed.

Full app documentation →

⚠️ Configure exactly one install method per client. The custom component, the app, Docker/PyPI, and local stdio are independent ways to run the same server — pick one and point your AI client at that single URL. Keeping two entries for the same server in one client (for example a local uvx ha-mcp@latest entry with HOMEASSISTANT_URL / HOMEASSISTANT_TOKEN alongside an app or component URL) is a known cause of connection hangs.

Other install methods

These run the server outside Home Assistant — useful for Container / Core installs (which can't run apps) or a separate host. The Setup Wizard generates the exact client-specific config for each.

  • Docker (HTTP server): run ghcr.io/homeassistant-ai/ha-mcp in HTTP mode, pointed at your Home Assistant URL and a long-lived token (an administrator's is recommended; non-admin tokens work with limitations), and connect your client to its secret URL. See the Setup Wizard for the full command and per-client config.

  • PyPI / uvx (HTTP server): run the published ha-mcp package with uvx ha-mcp@latest (or pip) as a streamable-HTTP server the same way. Details in the Setup Wizard.

  • Local stdio (not recommended): runs ha-mcp on your own machine over stdio. The one-command installers in the Demo server section below use this path; the Setup Wizard covers connecting it to your own Home Assistant.

  • OIDC authentication: gate remote access behind an external identity provider (Authentik, Keycloak, Auth0, etc.) instead of a secret URL — all authenticated users share the server's Home Assistant credentials. See OIDC Mode.

    ⚠️ stdio has known transport issues. The stdio transport has connection problems that streamable HTTP does not (#1713). It is recommended only for demo/testing tinkering — for a real setup, use the custom component or an HTTP method above.

Using the HA-MCP custom component? You do not need the Webhook Proxy — the component has its own built-in webhook for remote access (see the Get Started quick start at the top). The proxy is for the app (it can also front another external server via its mcp_server_url option). The OpenAI Tunnel below is different: it applies to any install method when Home Assistant isn't publicly reachable at all (no Nabu Casa or reverse proxy).

Already have Nabu Casa or another reverse proxy pointing at your Home Assistant? The Webhook Proxy app routes MCP traffic through your existing setup — no separate tunnel or port forwarding needed.

  1. Install the MCP Server app (see above) and the Webhook Proxy app from the same store
  2. Start the webhook proxy and restart Home Assistant when prompted
  3. Copy the webhook URL from the app 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.

ChatGPT / Codex behind a firewall (OpenAI Tunnel). ChatGPT connectors normally require a publicly reachable URL. If you can't (or don't want to) expose one, the community OpenAI Tunnel for HA-MCP integration by @norpol runs OpenAI's tunnel-client inside Home Assistant and connects your local MCP server URL to an OpenAI-hosted tunnel over an outbound-only connection — no port forwarding, reverse proxy, or public URL. Point it at your ha-mcp URL, then attach the ChatGPT connector to the same tunnel ID. See the FAQ entry and #1811.

Webhook proxy documentation →

🧪 Demo server (Windows / macOS / Linux)

Want to try ha-mcp before connecting your own Home Assistant? No paid subscription required. These one-command scripts set up a local stdio connection to a hosted demo environment so you can see it working in a few minutes. Each script's Connect your own Home Assistant link then shows how to point it at your instance.

  1. Go to claude.ai and sign in (or create a free account)
  2. Open Terminal and run:
    sh
    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 →

Anthropic doesn't ship Claude Desktop for Linux, so pick one path:

Claude Desktop — free, via the community build:

  1. Install the community Claude Desktop for Linux build and sign in with a free claude.ai account
  2. Open Terminal and run:
    sh
    curl -LsSf https://raw.githubusercontent.com/homeassistant-ai/ha-mcp/master/scripts/install-linux.sh | sh
  3. Restart Claude Desktop, then ask: "Can you see my Home Assistant?"

Claude Code — official CLI, requires a paid Claude plan:

  1. Install Claude Code: curl -fsSL https://claude.ai/install.sh | bash
  2. Configure ha-mcp, then run claude:
    sh
    curl -LsSf https://raw.githubusercontent.com/homeassistant-ai/ha-mcp/master/scripts/install.sh | sh -s -- --claude-code
  3. Start claude, run /mcp to confirm, then ask: "Can you see my Home Assistant?"

Full Linux guide →

  1. Go to claude.ai and sign in (or create a free account)
  2. Open Windows PowerShell (from Start menu) and run:
    powershell
    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 →

🧙 Setup Wizard for 15+ clients

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

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, apps, device registry
🔒 SafetyRead Only Mode toggle, per-tool enable/disable, tool security policies (user approval), automatic edit backups

Template helper edit backups capture persisted options through the HA-MCP custom component, using either its Server entry or File & YAML Tools entry. Helper edits, generic integration options edits, and deletion capture the stable config-entry identity and entity ID/name mapping. Capture refuses degraded secret scrubbing. Restoring an existing helper requires a fresh safety backup, removes optional settings absent from the snapshot, and verifies persisted options.

For Template backup listing and bulk deletion, filter by the config-entry ID returned as entity_id by capture. Capture accepts an entity alias; the history filters use the stable config-entry ID. Recreation reports its replacement config-entry ID and saved entity mapping separately.

If the original entry has been deleted, restore recreates the helper and reports its new config-entry ID. The saved entity ID and custom name are restored when available; an occupied entity ID is refused before creation. Older snapshots without entity metadata cannot preserve renamed entity IDs. If a collision or verification failure occurs after creation, the new helper and source backup are retained and the result reports the new entry for inspection. Other entity/device registry settings are not restored. Helper and integration edits through the same server wait until restore finishes; other Home Assistant clients are outside this coordination. Failed or uncertain restores report their outcome and safe refusal reasons; inspect the current helper before retrying.

CategoryTools
Apps (add-ons)ha_get_app, ha_manage_app
Areas & Floorsha_list_floors_areas, ha_remove_area_or_floor, ha_set_area_or_floor
Assistha_manage_pipeline
Automationsha_config_get_automation, ha_config_remove_automation, ha_config_set_automation
Blueprintsha_manage_blueprints
Calendarha_config_get_calendar_events, ha_config_remove_calendar_event, ha_config_set_calendar_event
Cameraha_get_camera_image
Dashboardha_get_dashboard_screenshot (beta)
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
Developerha_dev_manage_server, ha_dev_manage_settings
Device Registryha_get_device, ha_remove_device, ha_set_device
Energyha_manage_energy_prefs
Entity Registryha_get_entity_exposure, ha_get_entity, ha_remove_entity, ha_set_entity
Filesha_delete_file (beta), ha_list_files (beta), ha_read_file (beta), ha_write_file (beta)
Groupsha_config_list_groups, ha_config_remove_group, ha_config_set_group
HACSha_get_hacs_info, ha_manage_hacs
Helper Entitiesha_config_list_helpers, ha_config_set_helper, ha_remove_helpers_integrations
History & Statisticsha_get_automation_traces, ha_get_history, ha_get_logs
Integrationsha_get_integration, ha_get_system_health, ha_set_integration
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
Matterha_manage_radio
Scenesha_config_get_scene, ha_config_remove_scene, ha_config_set_scene
Scriptsha_config_get_script, ha_config_remove_script, ha_config_set_script
Search & Discoveryha_get_overview, ha_get_state, ha_search
Service & Device Controlha_bulk_control, ha_call_event, ha_call_service, ha_get_operation_status, ha_list_services
Systemha_config_get_yaml (beta), ha_config_set_yaml (beta), ha_manage_backup, ha_manage_custom_tool (beta), ha_manage_security_policy, ha_manage_theme, ha_manage_updates, ha_reload_core, ha_restart
Todo Listsha_get_todo, ha_remove_todo_item, ha_set_todo_item
Utilitiesha_eval_template, ha_report_issue
Zonesha_get_zone, ha_remove_zone, ha_set_zone

Z-Wave configuration values can be read through ha_manage_radio with action="get_config_params" or action="get_config_param", even when their configuration entities are disabled or absent. Reads use the Z-Wave JS cache by default; a single full root parameter can explicitly request a device read. See parameter reads, freshness, and examples.


🆚 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:

CapabilityBuilt-in MCP Serverha-mcp
Control exposed devices, query statesYesYes
Entity scopeOnly entities exposed to AssistEverything in Home Assistant
Create / edit automations, scripts, scenesNoYes
Build & edit dashboardsNoYes
Debug automations from traces, read history & logsNoYes
Manage helpers, areas, zones, labels, groupsNoYes
Backups, apps, HACS, device & entity registryNoYes

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) — File & YAML Services

The HA-MCP Custom Component also powers a set of privileged tools that standard Home Assistant APIs can't provide: file system access and YAML config editing. (The same component runs the full server in-process — that's the recommended install in the Get Started section at the top.) Its File & YAML services entry (HA-MCP File & YAML Tools) enables the tools below.

Tools that require the component:

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

Template helper edit backups and restores also require the component, using either its Server entry or File & YAML Tools entry. These five tools return an error with installation instructions if the component is missing.

These tools also require beta feature flags. See Beta Features for how to enable them — including the ENABLE_BETA_FEATURES master flag, which must be on before the filesystem/YAML sub-flags take effect.

Install

Install the HA-MCP File & YAML Tools entry from the same HA-MCP Custom Component:

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-integration (category: Integration) > Download. Or copy custom_components/ha_mcp_tools/ from this repository into your HA config/custom_components/ directory.

After installing, restart Home Assistant, then open Settings > Devices & Services > Add Integration, search for HA-MCP Custom Component, and add the HA-MCP File & YAML Tools entry.

To run the full ha-mcp server in-process through this same component, see the Get Started section at the top and the full in-process server documentation →.


🧠 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 best-practices skill is reachable through the ha_get_skill_guide tool: call it with no arguments to read SKILL.md, or with file set to a path SKILL.md links to read that reference file. 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 (~87 tools) is listed to the client through the standard MCP tools/list response. Clients with deferred / on-demand tool loading (claude.ai, Claude Desktop, Claude Code) handle that fine — tools are pulled into context only when needed, so idle context cost is near-zero.

For setups without deferred tool support — models like Claude Haiku, Gemini, OpenAI-compatible local models and smaller open-weights models, or clients that inline all tool schemas regardless of model (e.g. GitHub Copilot CLI) — listing the full tool catalog up front adds a lot of idle context and can overwhelm smaller models. To address that, the server ships with a search-based discovery mode built on top of FastMCP's BM25 search transform.

Smaller or local LLMs (Ollama, etc.)

If your model can't see the tools or your Home Assistant, it may be getting handed the whole tool catalog at once and struggling with it. It's recommended to try the following to see if it helps:

  • Enable tool search (ENABLE_TOOL_SEARCH=true, or the app option below). Instead of listing every tool up front, the server defers the catalog behind a search interface so the model pulls in only the tools it needs, when it needs them.
  • Raise the model's context window above the default. Local runtimes ship with small defaults (Ollama's num_ctx is one example) that can't hold a large tool set plus the conversation — increase it well beyond the default.

Enable search-based discovery

Set ENABLE_TOOL_SEARCH=true (or toggle the option in the HA app). The full catalog is replaced in the tool list with four entry points plus a small set of always-visible "pinned" tools (ha_search, ha_get_overview, ha_report_issue, etc.). All tools remain callable directly by name once discovered:

ToolPurpose
ha_search_toolsBM25 English-keyword search across all tools, pinned ones included. A hidden tool comes back compact: name, one-line description (the docstring's first paragraph), a one-line params list (types, enum values, required) and the proxy that executes it. ha_search_tools(tools=[...]) returns the full definition (description, input schema and annotations) of the named tools, the second hop before a call. A pinned tool returns a name-only stub (pinned: true) pointing back at the tool list, and does not use up a result slot.
ha_call_read_toolExecute a readOnlyHint tool by name. Safe — clients can auto-approve.
ha_call_write_toolExecute a write tool that creates or updates data.
ha_call_delete_toolExecute 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.

A ha_manage_* tool combines several operations, so it is reachable from more than one proxy: ha_call_write_tool and ha_call_delete_tool run the whole tool, while ha_call_read_tool runs only the read actions Read Only Mode approves (the same per-call verdict), so a manage tool with no approved read actions is not reachable there. Search results list each proxy the tool can be reached through. In Read Only Mode only ha_call_read_tool is listed; the other two still answer a client that holds them in a cached tool list, and any write they carry gets the Read Only Mode error rather than Unknown tool.

SettingDefaultDescription
ENABLE_TOOL_SEARCHfalseReplace full tool catalog with search-based discovery (tools deferred behind on-demand search).
TOOL_SEARCH_MAX_RESULTS5Max hidden tools returned per ha_search_tools call (range 2–10); a pinned tool that ranks inside that top count is added as a name-only stub on top of it.
PINNED_TOOLSemptyComma-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, or any model without native deferred tool support — large idle-context savings. The same applies to clients that inline all tool schemas regardless of model (e.g. GitHub Copilot CLI, even when running Claude Sonnet/Opus).
  • MCP clients that cap total tool count (some cap at 100) — surfaces a minimal set (~10 tools) instead of 87.
  • Cost-sensitive deployments — fewer idle tokens per turn.

Leave it off in clients with deferred tool loading (claude.ai, Claude Desktop, Claude Code); the full catalog has no idle cost there, direct calls skip the search step, and the client's built-in tool search is the better choice — there is no benefit to running ha-mcp's on top of it. Whether tools are deferred depends on the client and model combination: the same model can behave differently per client — GitHub Copilot CLI running Claude Sonnet/Opus inlines the full catalog and still benefits from tool search here. Some Codex models and ChatGPT include deferred tools too — check your client/model directly to confirm its features so you don't leave this enabled unnecessarily.

🔄 Refresh your client's tool list after changing this (or any) setting. Toggling ENABLE_TOOL_SEARCH (or changing pinned/disabled tools, Read Only Mode, etc.) changes the tools the server exposes, but your AI client keeps serving its cached tool list until it re-fetches. Restarting the app or Home Assistant does not refresh the client — reconnect or refresh the MCP server in your client (e.g. re-add/refresh the connector in ChatGPT, or close and reopen Claude Desktop). If you skip this, newly enabled tools won't appear in the client at all, and tools the server no longer exposes still show as available but fail when called (Unknown tool, or the Read Only Mode error for a write tool that mode hides). ChatGPT sometimes keeps serving the stale list even after the connector is removed and re-added under the same name — if tools are still missing after re-adding, delete the connector and create a new one with a different name.

For the HA app, the same option is documented in homeassistant-addon/DOCS.md along with the in-app settings UI for fine-grained tool enable/disable/pin.


Read-only HTTP connections

Append /readonly to the server's HTTP MCP endpoint to restrict that connection to the existing Read Only Mode while other clients keep normal access:

text
Normal:     https://example.com/private_your_secret
Read-only:  https://example.com/private_your_secret/readonly

OAuth and OIDC connections use the same login/provider: for example, https://example.com/mcp/readonly. No additional secret or server is required. Read-only connections hide write tools and block write calls, including calls through cached tools or search proxies. The global Read Only Mode setting still restricts both endpoints when enabled. Reconnect the client after changing its URL so it refreshes its tool list.

This is a connection mode for automated agents, not a separate permission on the credential: the same credentials still work at the normal endpoint. Home Assistant webhook URLs also accept the suffix: https://your-ha.example/api/webhook/<webhook-id>/readonly. This requires the updated embedded integration or Webhook Proxy dev app (add-on), together with the updated MCP server.

🧪 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 app.


🤝 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 [...] with eq/in/regex/contains/exists/...) inspired the per-tool approval rule schema (#966).

👥 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. Financial support via GitHub Sponsors. Thank you! ☕
  • @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; 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_transform support for automations and scripts.
  • @gcormier — Windows installer improvements: removed unused variable and fixed terminal closing after install.
  • @ekobres — Feature flags for HAMCP_ENABLE_FILESYSTEM_TOOLS and the (since removed) HAMCP_ENABLE_CUSTOM_COMPONENT_INTEGRATION in the app 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 app (add-on) API calls to route through HA Core ingress proxy instead of direct container connections, fixing ha_manage_addon (now ha_manage_app) proxy mode on app 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_event tool (#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 Context in long-running tools (#1124); tool-discovery / categorized-search docs (#1123).
  • @fnordpig — Config subentry support (#1393) and Assist pipeline management tool (#1392).
  • @paul43210 — array_patch mode in ha_manage_app for 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! ☕
  • @pkkr — ha_knx_get_project tool exposing KNX group addresses from an uploaded ETS project file.
  • @cbowns — Fixed inconsistent hyphen in setup.astro Codex CLI docs.
  • @Shaan-alpha — Extended ha_restart known-good error patterns to cover 502/503 responses from reverse proxies.
  • @rebelancap — Fixed UTC-to-local timezone conversion in add_timezone_metadata.
  • @saevras — Fixed blueprint import E2E test to use local URL instead of host-to-container networking.
  • @jasonjhofmann — Recurring calendar events via rrule support in ha_config_set_calendar_event.
  • @vpciii — Coerce JSON-encoded strings on dict/list tool params.
  • @pburtchaell — Financial support via GitHub Sponsors. Thank you! ☕
  • @norpol — Built the OpenAI Tunnel for HA-MCP companion integration, connecting ChatGPT to a firewalled Home Assistant MCP server (#1811).

💬 Community

  • GitHub Discussions — Ask questions, share ideas
  • Issue Tracker — Report bugs, request features, or suggest tool behavior improvements. Bug reports need the report the ha_report_issue tool generates, or a reason why there is none; without either they are closed after 24 hours.

Star History

将 Ha MCP Integration MCP 与多个 AI 模型配合使用

TypingMind 在工作区级别连接 MCP 工具,因此连接 Ha MCP Integration 后,您就可以在 TypingMind 中搭配不同的 AI 模型使用,无需为每个模型单独设置。 此 MCP 通过您设备上的 TypingMind MCP 连接器在本地运行。

本地连接器设置指南

如果 MCP 服务器需要访问您电脑上的本地文件、应用或私有资源,请选择此方式。

1

打开 MCP 设置

在 TypingMind 中,依次前往“设置”、“高级设置”和“模型上下文协议”,然后选择“设置连接器”。

  1. 在您的浏览器中打开 TypingMind。
  2. 点击“设置”图标。
  3. 进入“高级设置”。
  4. 打开“模型上下文协议”部分。
  5. 点击“设置连接器”,然后选择“此设备”。
TypingMind MCP 连接器设置界面,已选择“此设备”
2

运行连接器命令

选择“此设备”,从 TypingMind 复制命令并在终端中运行。使用 MCP 时,请保持该进程运行。

  1. 复制 TypingMind 显示的设置命令。
  2. 在 macOS 上打开“终端”,或在 Windows 上打开 Windows Terminal。
  3. 粘贴并运行命令。
  4. 如果终端询问您是否继续,请确认安装软件包。
  5. 使用 MCP 工具时,请勿关闭终端窗口或停止其中的连接器进程。
3

将 Ha MCP Integration 添加为服务器

当连接器状态为“就绪”时,点击“编辑服务器”,然后粘贴 MCP 服务器配置。

  1. 等待连接器状态显示为“就绪”。
  2. 点击“编辑服务器”。
  3. 粘贴 Ha MCP Integration MCP 服务器配置。
  4. 保存服务器列表。
  5. 如需确认连接器是否仍处于就绪状态,请刷新。
TypingMind MCP 设置界面,显示正在运行的服务器和“编辑服务器”按钮
{
  "mcpServers": {
    "ha-mcp-integration": {
      "command": "npx",
      "args": [
        "-y",
        "<mcp-server-package>"
      ]
    }
  }
}
4

在不同模型中使用同一连接

保存服务器列表,打开“插件”,启用 Ha MCP Integration MCP 工具,然后在 TypingMind 中选择任意受支持的 AI 模型,即可在聊天中使用这些工具,或将其分配给智能体。

  1. 在 TypingMind 中打开“插件”页面。
  2. 启用 Ha MCP Integration MCP 工具。
  3. 开始聊天并选择您想使用的 AI 模型。
  4. 在聊天中使用 MCP 工具,或将其分配给 AI 智能体。
  5. 根据需要随时切换到其他 AI 模型,无需重新连接 MCP。
在 TypingMind 聊天中使用已启用的 MCP 工具和选定的 AI 模型
您能使用 Ha MCP Integration 帮我完成这项任务吗?
Ha MCP Integration
当然,我看过了。
以下是我使用 Ha MCP Integration 得到的结果。

常见问题

Ha MCP Integration MCP 服务器有什么用途?

Ha MCP Integration 是一个 MCP 服务器,可让兼容的 AI 客户端连接外部工具并获取上下文。在 TypingMind 中,只需添加一次此 MCP 服务器,即可在您的 AI 工作区中使用其工具。

可以在 TypingMind 中让多个 AI 模型使用 Ha MCP Integration MCP 吗?

可以。TypingMind 在工作区层面连接 MCP 工具,因此您无需为每个模型单独配置 MCP 服务器,就能在 Claude、ChatGPT、Gemini 或您在 TypingMind 中配置的其他 AI 模型中使用 Ha MCP Integration。

为什么在 TypingMind 中使用 Ha MCP Integration MCP?

TypingMind 将多个 AI 模型、提示词、插件、AI 智能体、API 密钥和 MCP 工具整合到同一个工作区中,是最出色的大语言模型聊天前端之一。连接 Ha MCP Integration 后,您可以在偏好的不同模型中使用其 MCP 工具,同时在 TypingMind 中井然有序地管理聊天工作流程。

如何将 Ha MCP Integration MCP 连接到 TypingMind?

Ha MCP Integration 通过 TypingMind 本地 MCP 连接器运行。当 MCP 服务器需要访问您计算机上的本地文件、桌面应用、命令行工具或私有资源时,这种方式最合适。

Ha MCP Integration MCP 在 TypingMind 中提供哪些工具?

Ha MCP Integration 提供 MCP 功能,您可以在 TypingMind 的插件页面启用这些功能,然后在聊天中使用,或将其分配给 AI 智能体。

使用 Ha MCP Integration MCP 需要向 TypingMind 提供我的 API 密钥吗?

不需要。TypingMind 采用本地优先的设计,让您自行选择模型提供商,并自行管理 API 密钥、提示词和 MCP 配置。如果 Ha MCP Integration 需要身份验证,请在创建连接时,为该 MCP 服务器添加所需的请求头、OAuth 设置或本地配置。

相关 MCP 服务器

查看全部

立即创建您自己的 AI 工作区

订阅我们的电子简报,获取新功能和后续赠奖活动的通知 👇