| name | music-assistant |
| description | Control Music Assistant (Home Assistant music server) - playback, volume, queue management, and library search. Use when user wants to play/pause music, skip tracks, adjust volume, search their music library, check what's playing, manage the queue, or control any Music Assistant player. Works with Spotify, Plex, local files, and other music providers integrated with Music Assistant. |
| metadata | {"openclaw":{"requires":{"env":"[Truncated]","env_optional":"[Truncated]"}}} |
Music Assistant
Control your Music Assistant server for music playback, queue management, and library browsing.
Setup
Before using this skill, you need to configure your Music Assistant connection:
export MA_URL="http://YOUR_SERVER_IP:8095/api"
export MA_TOKEN="YOUR_BEARER_TOKEN"
export MA_PLAYER="your_player_id"
Finding your token:
- Open Music Assistant web UI
- Go to Settings → Security
- Create or copy your Long-Lived Access Token
Finding your player ID:
./scripts/mactl.py players
Quick Start
./scripts/mactl.py play
./scripts/mactl.py next
./scripts/mactl.py volume 75
./scripts/mactl.py search "nirvana"
./scripts/mactl.py play-search "pink floyd"
./scripts/mactl.py status
./scripts/mactl.py queue
Playback Controls
./scripts/mactl.py play
./scripts/mactl.py pause
./scripts/mactl.py stop
./scripts/mactl.py next
./scripts/mactl.py prev
Volume
./scripts/mactl.py volume 75
./scripts/mactl.py mute
./scripts/mactl.py unmute
Queue Management
./scripts/mactl.py shuffle true
./scripts/mactl.py shuffle false
./scripts/mactl.py repeat all
./scripts/mactl.py clear
./scripts/mactl.py queue-items
Search & Play
./scripts/mactl.py search "pink floyd"
./scripts/mactl.py search "nirvana" --type track album
./scripts/mactl.py search "metallica" --limit 5
./scripts/mactl.py play-search "smells like teen spirit"
./scripts/mactl.py ps "comfortably numb"
./scripts/mactl.py play-uri "spotify://track/4gHnSNHs8RyVukKoWdS99f"
Status & Info
./scripts/mactl.py status
./scripts/mactl.py queue
./scripts/mactl.py recent
./scripts/mactl.py players
Library
./scripts/mactl.py sync
Examples
"Play some Nirvana"
./scripts/mactl.py play-search "nirvana"
"What's playing?"
./scripts/mactl.py status
"Skip this track"
./scripts/mactl.py next
"Set volume to 50%"
./scripts/mactl.py volume 50
"Turn on shuffle"
./scripts/mactl.py shuffle true
Direct API Access
For operations not covered by the CLI, use the JSON-RPC API directly:
curl -s "http://YOUR_SERVER:8095/api" \
-H "Content-Type: application/json" \
-H "Authorization: Bearer $MA_TOKEN" \
-d '{"message_id":"1","command":"player_queues/all"}'
API documentation is available at: http://YOUR_SERVER:8095/api-docs
Key API Commands
| Command | Args | Description |
|---|
players/all | - | List all players |
player_queues/all | - | List all queues |
player_queues/play_pause | queue_id | Toggle play/pause |
player_queues/next | queue_id | Next track |
player_queues/previous | queue_id | Previous track |
player_queues/stop | queue_id | Stop playback |
player_queues/shuffle | queue_id, shuffle_enabled | Set shuffle |
player_queues/repeat | queue_id, repeat_mode | Set repeat (off/all/one) |
player_queues/clear | queue_id | Clear queue |
player_queues/items | queue_id, limit, offset | Get queue items |
player_queues/play_media | queue_id, uri | Play by URI |
music/search | search, media_types, limit | Search library |
music/recently_played_items | limit | Recent items |
music/sync | media_types, providers | Sync library |
config/players/get | player_id | Get player settings |