Home Assistant MCP

v1.0.0Cloud Servicesstable

Homeassistant MCP server for 小智AI

home-assistantmcpmcp-serverxiaozhi-esp32
Share:
236
Stars
0
Downloads
0
Weekly
0/5

What is Home Assistant MCP?

Home Assistant MCP is a Model Context Protocol (MCP) server that allows AI assistants like Claude, Cursor, and VS Code to homeassistant mcp server for 小智ai

Homeassistant MCP server for 小智AI

This server falls under the Cloud Services category on MCPgee, the world's largest MCP server directory with 33,000+ servers.

Features

  • Homeassistant MCP server for 小智AI

Use Cases

Control home automation devices via Home Assistant API.
c1pher-cn

Maintainer

LicenseMIT
Languagepython
Versionv1.0.0
UpdatedMay 20, 2026
Statushealthy
Maintenanceactive

Works with

ClaudeOpenAIwindowsmacoslinux

Installation

Manual Installation

npx ha-mcp-for-xiaozhi

Configuration

Configuration Details

Config File

claude_desktop_config.json

Performance

Response Metrics

Response Time< 200ms
ThroughputMedium

Resource Usage

Memory UsageLow
CPU UsageLow

How to Set Up and Use Home Assistant MCP

ha-mcp-for-xiaozhi is a Home Assistant custom integration that turns your Home Assistant instance into an MCP server for the XiaoZhi AI voice assistant (小智AI). It connects directly to the XiaoZhi official server over WebSocket without requiring an additional proxy, and can proxy multiple MCP API groups — including Home Assistant's built-in Assist function calls and any other MCP servers you have configured — to XiaoZhi in a single entity. Users with XiaoZhi ESP32 hardware gain voice control over all their Home Assistant devices and automations through natural language.

Prerequisites

  • A running Home Assistant instance (recent version recommended — May 2026+ for best tool coverage)
  • HACS (Home Assistant Community Store) installed
  • A XiaoZhi AI device or account with an MCP endpoint URL
  • Entities you want to control must be exposed to the Home Assistant voice assistant (Settings > Voice Assistants > Expose)
1

Install via HACS

Open HACS in your Home Assistant sidebar, click the search icon, and search for 'xiaozhi' or 'ha-mcp-for-xiaozhi'. Click Download to install the integration.

2

Restart Home Assistant

After HACS downloads the integration, restart Home Assistant to load the new integration files.

3

Add the integration

Go to Settings > Devices & Services > Add Integration and search for 'MCP'. Select 'MCP Server for Xiaozhi' from the results.

4

Configure the XiaoZhi endpoint and API groups

In the configuration dialog, enter your XiaoZhi MCP endpoint URL. In the llm_hass_api checkbox list, select 'Assist' to enable Home Assistant's built-in function calls. You can also select any other MCP servers you have configured in Home Assistant to proxy them to XiaoZhi.

5

Expose entities to the voice assistant

Navigate to Settings > Voice Assistants > Expose and mark which entities (lights, switches, sensors, etc.) should be visible to the assistant. The tools XiaoZhi can control depend on which entity types are exposed.

6

Verify the connection in XiaoZhi

Wait approximately one minute after saving the configuration, then go to the XiaoZhi endpoint page and click Refresh to confirm the status shows as connected.

Home Assistant MCP Examples

HACS repository reference

HACS custom repository details for manual addition if search does not find the integration automatically.

{
  "owner": "c1pher-cn",
  "repository": "ha-mcp-for-xiaozhi",
  "category": "integration"
}

Prompts to try with XiaoZhi

Example voice commands to send to your XiaoZhi device once the integration is configured and entities are exposed.

- "Turn off all the lights in the living room"
- "Set the bedroom thermostat to 22 degrees"
- "Is the front door locked?"
- "Turn on the kitchen fan for 30 minutes"
- "What is the current temperature sensor reading in the garage?"

Troubleshooting Home Assistant MCP

XiaoZhi shows the integration as disconnected after configuration

Wait at least one minute, then click Refresh on the XiaoZhi endpoint page. Ensure your Home Assistant instance is reachable from the XiaoZhi server (not behind a firewall without external access). Check the integration's debug log (Settings > System > Logs, filter by 'mcp') for connection errors.

XiaoZhi calls Home Assistant tools but nothing happens

Verify that the relevant entities are exposed to the voice assistant under Settings > Voice Assistants > Expose. Only exposed entities appear as available tools. Also confirm the 'Assist' API group is selected in the integration's checkbox list.

Light control or music control conflicts with XiaoZhi's built-in controls

This is a known limitation where XiaoZhi's built-in screen and music controls conflict with Home Assistant tool calls for the same domains. Wait for a future XiaoZhi server update that adds built-in tool selection, or use custom scripts in Home Assistant to work around the conflict.

Frequently Asked Questions about Home Assistant MCP

What is Home Assistant MCP?

Home Assistant MCP is a Model Context Protocol (MCP) server that homeassistant mcp server for 小智ai It connects AI assistants to external tools and data sources through a standardized interface.

How do I install Home Assistant MCP?

Follow the installation instructions on the Home Assistant MCP GitHub repository. Clone the repo, install dependencies, and add the server config to your AI client.

Which AI clients work with Home Assistant MCP?

Home Assistant MCP works with all major MCP-compatible AI clients including Claude Desktop, Claude Code, Cursor, VS Code (GitHub Copilot), Windsurf, and Cline.

Is Home Assistant MCP free to use?

Yes, Home Assistant MCP is open source and available under the MIT license. You can use it freely in both personal and commercial projects.

Browse More Cloud Services MCP Servers

Explore all cloud services servers available in the MCPgee directory. Each server includes setup guides for Claude, Cursor, and VS Code.

Quick Config Preview

{ "mcpServers": { "ha-mcp-for-xiaozhi": { "command": "npx", "args": ["-y", "ha-mcp-for-xiaozhi"] } } }

Add this to your claude_desktop_config.json or .cursor/mcp.json

Read the full setup guide →

Ready to use Home Assistant MCP?

Browse our complete directory of 33,000+ MCP servers, read setup guides for your editor, and start building with the Model Context Protocol.

33,000+ ServersFree & Open SourceStep-by-Step Guides