mcp-smart-home-server
Provides tools for controlling smart home devices through Home Assistant, including listing devices, reading device states, setting device states (guarded by an allowlist), and triggering pre-defined automations.
Provides tools for reading the latest values from MQTT sensor topics, enabling local sensor data queries via an MQTT broker.
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., "@mcp-smart-home-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.
MCP Server for Smart Home & IoT Orchestration
An MCP (Model Context Protocol) server that gives any MCP-compatible AI client (Claude, etc.) safe, structured access to control smart devices via Home Assistant and query local sensors over MQTT — turning natural-language instructions into validated device actions.
Architecture
AI client (Claude Desktop, etc.)
│ MCP protocol (stdio/SSE)
▼
FastMCP server ──► Home Assistant REST/WebSocket API (device control)
│
└────────────► MQTT broker (sensor reads, local automation triggers)Related MCP server: Home Assistant MCP Server
Tools exposed
list_devices()— enumerate controllable entities from Home Assistantget_device_state(entity_id)— read current stateset_device_state(entity_id, state, **attrs)— guarded: checks an allowlist before executingread_sensor(topic)— read latest value from an MQTT sensor topicrun_automation(name)— trigger a pre-defined Home Assistant automation (never arbitrary scripts)
Tech stack
FastMCP (Python MCP server framework), Home Assistant REST/WebSocket API, MQTT (paho-mqtt).
Getting started
pip install -r requirements.txt
cp .env.example .env # HA_URL, HA_TOKEN, MQTT_BROKER
python src/server.pyThen point your MCP client's config at this server (stdio transport by default — see docs/CLIENT_SETUP.md).
Safety design
set_device_statechecksALLOWED_ENTITIESinconfig.pybefore sending any command — nothing outside an explicit allowlist can be controlled, by design, to prevent an LLM from accidentally (or via a malicious prompt) unlocking doors, disabling alarms, etc.run_automationonly triggers automations pre-defined in Home Assistant, never arbitrary code.All tool calls are logged to
logs/mcp_actions.logfor auditability.
Status
Server scaffold, tool definitions, and the Home Assistant client wrapper are implemented. You must populate ALLOWED_ENTITIES for your own home before deploying — it ships empty (deny-by-default) on purpose.
License
MIT
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 Connectors
Hosted MCP server connecting AI assistants to 9,000+ apps and 40,000+ actions via Zapier.
Automate 1,000+ services from any MCP-compatible AI agent: build Applets, run actions and queries.
Zero-setup MCP gateway securely connecting AI to your tools with authentication and workflows
Self-hosted MCP gateway: turn any API, database or MCP server into AI connectors — no code.
Related MCP Servers
- AlicenseNot gradedqualityDmaintenanceEnables 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.1MIT
- FlicenseBqualityNot gradedmaintenanceEnables control and monitoring of Home Assistant smart home devices through MCP, allowing users to list entities, check device states, and call services to control lights, switches, sensors, and other connected devices.4
- AlicenseNot gradedqualityDmaintenanceEnables 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.51MIT
- AlicenseNot gradedqualityCmaintenanceAn MCP server that enables AI assistants to control Home Assistant via natural language, including device control, automation management, and system configuration.MIT
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/mahi080808/mcp-smart-home-server'
If you have feedback or need assistance with the MCP directory API, please join our Discord server