Home Assistant MCP
Provides tools for interacting with a Home Assistant instance, enabling AI agents to read entity states, call services, run scripts and automations, and send commands to phones via the Home Assistant companion app.
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 MCPturn off all lights and lock the front door"
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.
Home Assistant MCP
An MCP server that exposes a Home Assistant instance as a tool set, running as a stateful agent on Cloudflare Workers. Point an MCP client (Claude, etc.) at the deployed endpoint and it can read entity states, call services, run scripts and automations, and send commands to phones via the HA companion app — all against your own Home Assistant instance.
How it works
MCP client ──HTTP/SSE──► Worker (/mcp) ──► HomeAssistantMCP (Durable Object)
│
HomeAssistantClient
│
Home Assistant REST API (Bearer auth)HomeAssistantMCP is a McpAgent
hosted on a Durable Object; each tool call goes through HomeAssistantClient,
a thin wrapper around the HA REST API that handles auth, path-safe entity
IDs, and error normalization. Areas have no dedicated REST endpoint in HA, so
listAreas / getEntitiesByArea go through /api/template with a small
Jinja template instead.
Related MCP server: hass-mcp
Tools
Tool | Description |
| List entity states, optionally filtered by domain |
| Full state and attributes for one entity |
| Call any HA service ( |
| List configured areas (rooms) |
| Entity IDs belonging to an area |
| Automations with state and last-triggered time |
| Trigger an automation, bypassing conditions |
| Scripts with their running state |
| Run a script |
| Recent state history for an entity |
| List commands sendable to the HA mobile app |
| Send a command (e.g. DND toggle) to a phone |
Setup
npm install
wrangler secret put HA_TOKEN # long-lived access token from HAHA_URL is set in wrangler.jsonc under vars — point it at your own Home
Assistant instance before deploying.
Development
npm run dev # wrangler dev
npm test # vitest run
npm run test:watch # vitest watch modeTests cover HomeAssistantClient by mocking fetch — no live Home
Assistant instance is required to run them.
Deploy
npm run deployOr connect this repository to a Cloudflare Worker for git-based deploys.
Either way, HA_TOKEN must be set as a Wrangler secret in the target
environment — it is never stored in the repo.
Stack
Cloudflare Workers + Durable Objects (SQLite-backed)
Cloudflare Agents SDK (
agents/mcp)
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.
Related MCP Servers
- Alicense-qualityDmaintenanceEnables AI agents to control and monitor Home Assistant smart home devices through natural language interactions. Supports device control, entity state monitoring, history access, and automation generation with both MCP protocol and standalone HTTP REST API modes.Last updated1MIT
- AlicenseAqualityDmaintenanceMCP server for controlling and querying Home Assistant via its REST API, exposing tools to get entity states, list all states, and call services.Last updated16245MIT
- Alicense-qualityCmaintenanceEnables AI agents to control Home Assistant smart home devices via MCP, with zero external dependencies. Supports calling services, getting states, and looking up service parameters.Last updated30MIT
- AlicenseAqualityCmaintenanceMCP server for full Home Assistant control, enabling AI agents to manage dashboards, automations, files, apps, entities, and more via REST API, WebSocket, and SSH.Last updated6690MIT
Related MCP Connectors
MCP server for AI agents to plan, verify, and deploy Cloudflare-native apps.
A TypeScript MCP server for Home Assistant, enabling programmatic management of entities, automati…
Self-hosted MCP gateway: turn any API, database or MCP server into AI connectors — no code.
Latest Blog Posts
- Who's Calling? MCP Hosts Are an Identity Blind Spot (And the Spec Knows It)By Om-Shree-0709 on .mcpAgent IdentityOAuth 2.1
- 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/crunchypancake1/home-assistant-mcp'
If you have feedback or need assistance with the MCP directory API, please join our Discord server