Connecting to Claude Code
You can use the same tools in your own Claude Code in the terminal:
- “what's on in the bedroom?”
- “add a new leak sensor to the bathroom”
- “why is the Zigbee bridge silent?”
- “set a 20-minute timer”
With one button
Settings → Speaker → Homer brains → Connect to Claude Code.
The speaker sets up the connection itself, on its own computer and as its own Windows user. So the server lands in exactly the Claude Code you are signed in to on that computer.
What happens:
- The server is registered at user level, so it is available in all projects:
claude mcp add homer -s user -e PYTHONIOENCODING=utf-8 -- python tools\speaker\homer_mcp.py - Skills are placed in
~/.claude/skills/:homer-house: general rules for working with the home — look first, then act; how to add a Zigbee device; where the docs are;homer-<name>: one for each of your skills.
- The log gets an entry “connected MCP homer to Claude Code”.
Buttons in the card:
| Button | What it does |
|---|---|
| Connect to Claude Code | Registers the server and places the skills |
| Update skills | Rewrites the skills after edits |
| Disconnect | Removes the server and all homer-* skills |
Check in the terminal:
claude mcp get homerIt should say Status: ✔ Connected.
By hand, on another computer
- Copy the
tools/speakerfolder and thesecrets/ha-credentials.txtfile with the Home Assistant token (thetoken=…line). - Install the packages:
pip install mcp paho-mqtt websocket-client yandex-music - Register the server with your home's addresses:
claude mcp add homer -s user ^ -e HOMER_HA=http://<home>:8123 ^ -e HOMER_MQTT=<home> ^ -e HOMER_SIDECAR=http://<home>:8730 ^ -e HOMER_SPEAKER_URL=http://<speaker computer>:8790 ^ -- python C:\path\tools\speaker\homer_mcp.py - Check:
claude mcp get homer.
| Variable | Default | What it is |
|---|---|---|
HOMER_HA | http://127.0.0.1:8123 | Home Assistant |
HOMER_MQTT | 127.0.0.1 | MQTT broker of the Zigbee bridge (port HOMER_MQTT_PORT, 1883) |
HOMER_SIDECAR | http://127.0.0.1:8730 | Homer server: settings, log |
HOMER_SPEAKER_URL | http://127.0.0.1:8790 | Speaker: music, timers, say |
HOMER_MCP_LEVEL | full | Level: full (Claude Code), opus, voice |
Without the speaker key
If there is no secrets/alice-skill-key.txt file next to it, the server works with all the default “Claude Code” level tools, but doesn't write the log and doesn't know your settings and skills.
What the log shows
Every call of a dangerous tool from Claude Code goes to Telegram, marked with who called it:
🔧 Claude Code (varyen@VARYEN-PC): zigbee_pair(seconds=120, wait=True)
→ 0xa4c138…: done: Tuya TS0505BA home from scratch
Claude Code with the homer server sets up a new home from start to finish. Just ask: “set up the home at http://192.168.1.10:8123, HA was just installed”.
ha_onboardgoes through the “Welcome” screen of a fresh Home Assistant: creates the owner admin, location, language and time zone, and issues a long-lived token. The login, password and token go tosecrets/ha-credentials.txt(or thecredentials_filefile). The tool doesn't touch an HA that is already set up. If HA is already running, a person puts the token as atoken=…line in the same file, andha_connectchecks it.ha_flowadds integrations:mqtt, Zigbee,yandex_stationand any others, step by step through the HA wizard fields.ha_integrationsshows what HA found on the network by itself.ha_areacreates rooms and floors,ha_device_updateputs devices into them.homer_connectconnects the server to the Homer server as owner. For this, a separate admin “Homer MCP” is created in HA, and the owner key is issued to it. So your own owner key is not reissued. The home's owners get a notification. For a new home that has no HA token yet,homer_connectissues one right away. If “Homer MCP” became the first owner, make yourself owner in the app: Settings → Access → Homer server → Become owner.plan_addplaces items on the plan,homer_inviteissues invites to phones and tablets. The code goes tosecrets/homer-invite.txt.
The server's access to Homer is stored in secrets/homer-sidecar.txt. To revoke it, delete the “Homer MCP” access in Settings → Access and the “Homer MCP” user in HA.