Skip to content

Music Assistant

brAIn does anything Music Assistant’s own interface can, and you ask for it in a sentence from the chat or the terminal. There is no Music Assistant screen in brAIn’s panel — Music Assistant has one, and a second copy inside brAIn was clutter (the tab was removed in 2.10). Everything it did is still there, as the tools Claude uses.

What you can ask for

Group the kitchen and the lounge and play my Discover Weekly.
What's playing everywhere right now?
Why is the Sonos provider erroring?
Remove every AirCast player.
Turn on crossfade for the office.
Make a playlist of what we played on Saturday.

Claude has an overview (every player with what it’s playing, every provider with the last error it reported), a search, a player tool (play/pause, next, volume, power, stop, clear the queue, rename, enable or disable), a play tool, the clean-up, and a tool that runs any command in Music Assistant’s API — players, queues, groups, the library, playlists, providers and server settings.

Clearing out stale players

This is the part Home Assistant can’t do on its own. A player Music Assistant remembers but hasn’t seen since — every speaker a removed provider or an AirCast bridge left behind — comes back as a Home Assistant entity however many times you delete it, because its config lives in Music Assistant.

Ask brAIn to clear them out (“remove the stale players”) and it:

  • lists them first, with why each one is stale — the clean-up is a dry run unless you tell it to go ahead;
  • has Music Assistant forget them once you say so, after which Home Assistant drops the entities by itself;
  • reports a player still held by a provider that can’t remove players as held, and can disable it instead.

A working player is never swept up by “remove every player from that provider” — only the stale ones go.

Who may use these tools

Who’s asking What they get
The chat and the terminal Everything above.
Scheduled, unattended runs (cards, the Resident) The overview, the search and read-only queries. Nothing that changes a player, the library or a setting.
Voice None of these tools. Voice plays music through Home Assistant’s own music_assistant.play_media on the media players you’ve exposed to voice, so the exposure check can see what it’s playing on.

Setup

There isn’t any, usually. brAIn connects where Home Assistant’s Music Assistant integration connects, with the sign-in Music Assistant gave Home Assistant. That sign-in can control, group, configure and remove players and edit the library.

Two options cover the rest:

Option When you need it
music_assistant_token Adding, changing or removing providers, or changing server settings, needs a Music Assistant admin. Create a long-lived token in Music Assistant → Settings → your profile → Tokens. Without it, brAIn says so when it’s refused rather than just failing. The token is in Home Assistant backups like every option, so use one you can revoke.
music_assistant_url A Music Assistant server Home Assistant isn’t connected to, e.g. http://192.168.1.20:8095. Set a token with it.

Protected entities apply: a player that’s a Home Assistant entity on your protected_entities list isn’t played, changed or removed, and the refusal names it.