Skip to content
← All guides

Is the Home Assistant MCP server safe? What it can reach

Home Assistant has a built-in MCP server. See the two URLs, what Device control exposes, the read-only option and how to limit it.

4 min read

Home Assistant is itself an MCP server through its built-in Model Context Protocol integration. The main URL is /api/mcp, it authenticates with OAuth 2.0 and PKCE, and it exposes the sets of AI tools you select. The Device control set reaches only entities you expose to voice assistants. The Home Assistant set can read all entities, logs and history and perform any action, and it requires an administrator account. A read-only option removes tools that change something, but it applies to the main URL only.

The two kinds of URL

URLWhat it exposes
/api/mcpthe sets chosen in the integration’s options
/api/mcp/assistonly Device control

The documentation says individual URLs ignore the main URL options and are never read-only. All of them except the Device control URL require an administrator account. The main URL has these options.

OptionDefaultEffect
Expose all AI toolsonturn off to select individual sets
Require an administrator accountonlimits the main URL to administrators
Read-onlyoffremoves tools that change something, such as Call action

Device control “only accesses the entities you expose to voice assistants”. You manage that list on the exposed entities page. When it is available, a read-only resource, homeassistant://assist/context-snapshot, returns a plain-text snapshot of your exposed entities.

How it signs in

Home Assistant uses OAuth 2.0 with PKCE and no client secret. It supports OAuth Client ID Metadata Documents, so a client can set up its client ID and callback automatically. Because the sign-in belongs to a Home Assistant user, the AI app has that user’s reach. Sign in with a non-administrator account for Device control, and keep the administrator account for the Home Assistant set only when you truly need logs and history.

The risks

Device control still acts on your house. Locks, garage doors, heating and alarms count as devices if you exposed them to voice assistants. Entity names and states are text, and some come from outside, such as a calendar event title or a device name. That text can carry instructions to the agent. Cloud AI apps need your instance reachable from the internet, through Home Assistant Cloud or another remote access method, and that adds exposure of its own.

The documentation says Claude asks permission before using an AI tool unless you choose to always allow it. Don’t choose always allow for the action tool.

Limit it in Claude Code

Add it as a remote HTTP server, scoped to just you.

claude mcp add --transport http home-assistant https://<your-home-assistant>/api/mcp/assist

Sign-in uses the OAuth flow described above. Tool names come from Home Assistant, so look them up before writing narrower rules.

{
  "permissions": {
    "ask": ["mcp__home-assistant__*"]
  }
}

An ask pattern with mcp__<server>__* matches every tool from that server. Add specific allow rules for the reads you trust.

Limit it in Codex

[mcp_servers.home_assistant]
url = "https://<your-home-assistant>/api/mcp/assist"

Then run codex mcp login home_assistant for OAuth servers. The Codex docs document enabled_tools and disabled_tools in the same table, which work once you know the tool names.

Checklist

  • Start with /api/mcp/assist.
  • Expose only the entities the agent needs, and leave locks and alarms out.
  • Keep Require an administrator account on for the main URL.
  • Turn on Read-only if you use the main URL.
  • Don’t forward your instance to the internet for a test.

Checked against the vendor documentation on November 25, 2026. Home Assistant MCP Server · Claude Code MCP · Claude Code permissions · Codex MCP

What Excellent covers

Excellent doesn’t inspect MCP servers themselves, so it can’t tell you what a server exposes. Its free scan reads supported logs on the Mac and reports findings for review. It reads the session logs of Claude Code, Codex, Grok Build, GitHub Copilot CLI, Gemini CLI and Qwen Code, which shows what an agent did after it used a server. For a local report without installing an app, run the free scan. Its script uses Python 3.9 or later when your Mac has it and the shell when it doesn’t, reads the logs locally and makes no network requests. See a sample report.

Excellent Pro adds checks before supported actions. Claude Code can display an ask prompt. With Codex, an Excellent “ask” refuses the action and tells the agent to ask you. Commands sent into an already running Codex shell fall outside that check. Agent coverage · Pricing. Pro is US-only for now.

Related guides

View all