Real AI agent use cases, with sources and setup prompts

How to connect an AI agent to Home Assistant

Short answer: Home Assistant has a built-in Model Context Protocol (MCP) server, the standard way AI agents connect to outside tools. Add the Model Context Protocol Server integration, copy your MCP server URL from Settings, System, AI, and paste it into your agent: a custom connector in Claude, a custom MCP server in ChatGPT, or one command in Claude Code or Codex. You sign in with your Home Assistant account and the agent can then see device states and control only the devices you expose to it. Cloud agents such as Claude, ChatGPT and Grok Bot need Home Assistant reachable from the internet, which Home Assistant Link ($6.50 a month) or your own secure tunnel provides.

Real setups where people let Grok Bot, Claude and Claude Code run Home Assistant: a cloud bot driving a Roborock through a Pi, automations that need judgement, and a whole house added in a weekend. 13 matching use cases below, each with a public source.

Looking for something else? Search all 1965 use cases or .

Step by step

  1. Run Home Assistant somewhere always on. Install Home Assistant on a Raspberry Pi, a mini PC, a spare computer or a virtual machine. One builder below put Home Assistant OS on an old Raspberry Pi 4 so his cloud bot could reach his Roborock vacuum; another had Claude Code add every device in his house to Home Assistant on a Raspberry Pi 5 over a weekend.
  2. Add the Model Context Protocol Server integration. In Home Assistant go to Settings, Devices and services, Add integration, and choose Model Context Protocol Server (added in Home Assistant 2025.2). Then open Settings, System, AI, turn MCP on if it is off and copy your MCP server URL. By default it exposes all of Home Assistant's AI tools and requires an administrator account; you can narrow both under Configure.
  3. Choose what the agent can see. The agent can only control entities you expose to Home Assistant's assistant. Start with lights, media players, climate and sensors, and leave locks, alarms and cameras for later. Creating a separate user for the agent makes its actions easy to audit and revoke.
  4. Make it reachable for cloud agents. Claude (including Claude Desktop), ChatGPT on the web and cloud bots such as Grok Bot connect from the internet, so Home Assistant must be reachable from outside your home. Home Assistant Link from Nabu Casa does this with no router changes; a reverse proxy or a tunnel such as Cloudflare Tunnel also works if its address matches the External URL set in Settings, System, Network. Codex and OpenCode running on your own computer can use the local address, for example homeassistant.local:8123/api/mcp.
  5. Connect your agent. In Claude, add a custom connector named Home Assistant with your MCP server URL, choose Sign in now and log in to Home Assistant. In ChatGPT, add a custom MCP server with OAuth. In Claude Code, run claude mcp add with the http transport and your URL, then claude mcp login. In Codex, run codex mcp add with your URL. One Grok Bot user below connected Home Assistant alongside a separate MCP server for his Sonos speakers.
  6. Start with one useful job. Ask for something small and checkable: turn off every light downstairs, tell me which windows are open, or write an automation that dims the lights when a movie starts. One builder routes only the automations that need judgement to his agent and talks to it through an ESP32 voice device. Claude asks before each tool call, so approve actions until you trust them.

Related guides: How to build a smart home and voice assistant with AI agents · How to take your robot vacuum off the cloud with AI · How to self-host AI agents on a Raspberry Pi, Mac mini or homelab · How to build an MCP server for AI agents

What it costs

The Daily 5

Get five new use cases like these tomorrow morning

Five new real AI use cases every morning. Free. Unsubscribe any time.

Personal & lifeX · @Lumesssss

Make your PS5 less annoying with Claude Code and a home DNS blocker

The PS5 has no developer mode, so instead of touching the console he had Claude Code build everything around it: a DNS blocker on an always-on Raspberry Pi or mini PC that blocks promo and tracking domains for the whole house, wake-from-phone, streaming to a laptop, and Home Assistant showing the console status and putting it to sleep at 1am.

$17/mo1 eveningIntermediate

Common questions

How do you connect an AI agent to Home Assistant?
Home Assistant has a built-in Model Context Protocol (MCP) server, the standard way AI agents connect to outside tools. Add the Model Context Protocol Server integration, copy your MCP server URL from Settings, System, AI, and paste it into your agent: a custom connector in Claude, a custom MCP server in ChatGPT, or one command in Claude Code or Codex. You sign in with your Home Assistant account and the agent can then see device states and control only the devices you expose to it. Cloud agents such as Claude, ChatGPT and Grok Bot need Home Assistant reachable from the internet, which Home Assistant Link ($6.50 a month) or your own secure tunnel provides.
Does Home Assistant have an MCP server?
Yes. The Model Context Protocol Server integration has been built in since Home Assistant 2025.2. It lets agents such as Claude, ChatGPT, Claude Code and Codex see the state of your home and control the devices you expose, and it signs agents in with your Home Assistant account.
Can ChatGPT or Claude control my smart home?
Yes, through Home Assistant's MCP server. Add it as a custom connector in Claude or a custom MCP server in ChatGPT, log in to Home Assistant, and they can turn devices on and off, read sensors and answer questions about your home. Both connect from the cloud, so Home Assistant must be reachable from the internet.
Do I need Home Assistant Link (Nabu Casa)?
Not always. Cloud agents need a way in from the internet, and Home Assistant Link is the easiest, at $6.50 a month. A reverse proxy or tunnel you run yourself also works. Agents on your own computer, such as Codex, can use your local address with no remote access at all.
Is it safe to let an AI agent control Home Assistant?
Limit what it can reach. Expose only the devices you are comfortable with, give the agent its own user, keep locks and alarms off at first and approve actions until it behaves. You can remove the integration or the user at any time to cut access.
Why can't my cloud bot reach my devices?
A bot running in the cloud cannot see your home network directly. One builder below hit exactly this with his Roborock vacuum and solved it by running Home Assistant on a Raspberry Pi as a local hub: the bot sends the request and Home Assistant talks to the device inside the house.
Which AI tools do people use to connect an AI agent to Home Assistant?
Across the 13 sourced use cases in this guide, the most used tools are Home Assistant, Grok Bot, Claude Code, macOS, Claude.
How much does it cost to get started?
3 of the 13 use cases can start on a free plan. The most common paid starting price is $30/mo (5 use cases). Prices come from each tool's official pricing page.
How long does setup take?
5 of the 13 use cases list a setup time of an hour or less. Each card shows the setup time the builder reported.
Are these real examples?
Yes. Every use case links to its public source (an X post, a Hacker News thread or a GitHub repo) with the author and date, so you can check it yourself.

The Daily 5

Liked this guide? Get five new use cases tomorrow morning

Five new real AI use cases every morning. Free. Unsubscribe any time.

More how-to guides

How to make faceless YouTube videos with AI · How to automate work with n8n and AI · How to vibe code an app with Claude Code · How to build AI agents for SEO and ads · How to run multiple coding agents together · How to build an MCP server for AI agents · How to add memory to coding agents · How to secure vibe-coded apps and agents · How to observe and debug AI agents · How to build agent memory and context layers · How to control coding agents from your phone · How to add payments to vibe-coded apps · How to run local LLMs with AI agents · How to set up Grok Bot agents for real work · How to build with Gemini 4 Argon and Gemini agents · How to use AI agents for taxes, bills and budgets · How to make AI video ads and Reels with agents · How to set up Hermes Agent workflows · How to vibe code a game with AI · How to replace SaaS subscriptions with vibe-coded tools · How to use AI agents for errands, calls and shopping · How to use Cursor agents and automations · How to make 3D scenes and models with AI and Blender · How to use Claude Code skills and plugins · How to cut AI coding agent costs and token use · How to automate a small business with AI agents · How to compare AI models on the same prompt · How to build hardware projects with AI agents · How to make AI music videos and songs · How to use AI agents with Obsidian and your notes · How to build apps and games for your kids with AI · How to use ChatGPT for real projects and everyday tasks · How to make AI agents ask for approval before they act · How to build AI trading and investing agents · How to build AI agents that make and answer phone calls · How to plan meals and groceries with AI agents · How to use AI agents for fitness and health · How to undo, checkpoint and stop runaway coding agents · How to use AI agents for job hunting · How to automate social media posts with AI agents · How to build a smart home and voice assistant with AI agents · How to make money with AI agents · How to build a website with AI agents · How to use AI agents for research and science · How to build an iPhone or Android app with AI · How to automate email and your inbox with AI agents · How to use AI agents for Linux, servers and homelabs · How to build Telegram, Discord and WhatsApp bots with AI · How to research memecoins and crypto with AI agents · How to remove ads and bloatware from your smart TV with AI · How to self-host AI agents on a Raspberry Pi, Mac mini or homelab · How to learn anything with an AI tutor · How to build an AI second brain and personal wiki · How to reverse-engineer and revive old devices with AI · How to edit videos with Claude Code and Codex · How to set up an AI family assistant · How to make a Godot, Unity or 3D game with AI agents · How to build a custom Android TV or Google TV launcher with AI · How to use Claude Code and Codex together · How to build your own invoicing and bookkeeping app with AI · How to make a browser arcade game with AI · How to make a product demo or launch video with AI · How to fix Wi-Fi and secure your home network with AI · How to control Claude Code and Codex by voice · How to design a PCB and electronics with AI · How to save, share and resume coding agent sessions · How to run AI coding agents in a sandbox · How to make a multiplayer game with AI · How to let AI control your computer (computer use) · How to build a Mac menu bar app with AI · How to port code to another language with AI · How to make an AI animated short film or anime · How to build your own coding agent or harness · How to get notified when Claude Code or Codex needs you · How to build a Chrome extension with AI · How to use AI agents with Excel and Google Sheets · How to run Claude Code and Codex in a desktop app (T3 Code, Codex app, Claude Desktop) · How to make a song or album with AI · How to vibe code classroom apps and quizzes as a teacher · How to plan and book a trip with an AI agent · How to make motion graphics and animated videos with Claude Code · How to mod and reverse engineer games with AI · How to run AI agents overnight while you sleep · How to negotiate bills and get refunds with an AI agent · How to let an AI agent use your phone (iPhone and Android) · How to build a Polymarket bot with AI (and Kalshi) · How to use Claude Duet: real examples and tips · How to build private apps just for yourself with AI · How to design and 3D print things with AI agents · How to automate customer support with AI agents: real setups · How to find leads and automate sales outreach with AI agents · How to run a Shopify or online store with AI agents · How to launch an app and get your first users with AI · How to build a team of AI agents with a chief of staff · How to make a hand-tracking or gesture-controlled game with AI · How to test your app with AI agents before you ship · How to give an AI agent a budget or a card safely · How to share passwords and logins with an AI agent safely · How to get AI code review on your pull requests · How to review contracts, leases and fine print with AI · How to make slides and presentations with AI · How to take meeting notes and track follow-ups with AI · How to scrape websites and extract data with AI agents · How to make a podcast with AI · How to use AI agents for security scans and threat intel · How to build a dashboard with AI agents · How to clone your voice and make AI voiceovers · How to make AI images, thumbnails and product photos · How to write a CLAUDE.md or AGENTS.md rules file · How to build an AI chatbot for your own documents · How to port or remake a classic game with AI · How to build a VST plugin or synth with AI · How to trigger AI agents with webhooks and events · How to find a home or rental with AI agents · How to track Claude Code and Codex usage limits · How to build a daily AI briefing or news digest · How to check if your devices are spying on you with AI · How to track smart-money wallets and copy trade with AI · How to translate and localize your app or content with AI · How to write and publish a book with AI · How to control your TV with an AI agent · How to take your robot vacuum off the cloud with AI