/install music-assistant
\r \r
Music Assistant\r
\r Control your Music Assistant server for music playback, queue management, and library browsing.\r \r
Setup\r
\r Before using this skill, you need to configure your Music Assistant connection:\r \r
# Required\r
export MA_URL="http://YOUR_SERVER_IP:8095/api"\r
export MA_TOKEN="YOUR_BEARER_TOKEN"\r
\r
# Optional - auto-detected if not set\r
export MA_PLAYER="your_player_id"\r
```\r
\r
**Finding your token:**\r
1. Open Music Assistant web UI\r
2. Go to Settings → Security\r
3. Create or copy your Long-Lived Access Token\r
\r
**Finding your player ID:**\r
```bash\r
./scripts/mactl.py players\r
```\r
\r
## Quick Start\r
\r
```bash\r
# Basic controls\r
./scripts/mactl.py play # Play/pause toggle\r
./scripts/mactl.py next # Skip track\r
./scripts/mactl.py volume 75 # Set volume to 75%\r
\r
# Search and play\r
./scripts/mactl.py search "nirvana"\r
./scripts/mactl.py play-search "pink floyd" # Search and play first result\r
\r
# Check what's playing\r
./scripts/mactl.py status\r
./scripts/mactl.py queue\r
```\r
\r
## Playback Controls\r
\r
```bash\r
./scripts/mactl.py play # Play/pause toggle\r
./scripts/mactl.py pause # Pause\r
./scripts/mactl.py stop # Stop playback\r
./scripts/mactl.py next # Next track\r
./scripts/mactl.py prev # Previous track\r
```\r
\r
## Volume\r
\r
```bash\r
./scripts/mactl.py volume 75 # Set volume 0-100\r
./scripts/mactl.py mute # Mute\r
./scripts/mactl.py unmute # Unmute\r
```\r
\r
## Queue Management\r
\r
```bash\r
./scripts/mactl.py shuffle true # Enable shuffle\r
./scripts/mactl.py shuffle false # Disable shuffle\r
./scripts/mactl.py repeat all # Repeat mode (off|all|one)\r
./scripts/mactl.py clear # Clear queue\r
./scripts/mactl.py queue-items # List queue contents\r
```\r
\r
## Search & Play\r
\r
```bash\r
# Search library\r
./scripts/mactl.py search "pink floyd"\r
./scripts/mactl.py search "nirvana" --type track album\r
./scripts/mactl.py search "metallica" --limit 5\r
\r
# Search and immediately play first result\r
./scripts/mactl.py play-search "smells like teen spirit"\r
./scripts/mactl.py ps "comfortably numb" # shorthand\r
\r
# Play by URI (for scripts/advanced use)\r
./scripts/mactl.py play-uri "spotify://track/4gHnSNHs8RyVukKoWdS99f"\r
```\r
\r
## Status & Info\r
\r
```bash\r
./scripts/mactl.py status # Show player status + now playing\r
./scripts/mactl.py queue # Queue status\r
./scripts/mactl.py recent # Recently played items\r
./scripts/mactl.py players # List all available players\r
```\r
\r
## Library\r
\r
```bash\r
./scripts/mactl.py sync # Trigger library sync\r
```\r
\r
## Examples\r
\r
**"Play some Nirvana"**\r
```bash\r
./scripts/mactl.py play-search "nirvana"\r
```\r
\r
**"What's playing?"**\r
```bash\r
./scripts/mactl.py status\r
```\r
\r
**"Skip this track"**\r
```bash\r
./scripts/mactl.py next\r
```\r
\r
**"Set volume to 50%"**\r
```bash\r
./scripts/mactl.py volume 50\r
```\r
\r
**"Turn on shuffle"**\r
```bash\r
./scripts/mactl.py shuffle true\r
```\r
\r
## Direct API Access\r
\r
For operations not covered by the CLI, use the JSON-RPC API directly:\r
\r
```bash\r
curl -s "http://YOUR_SERVER:8095/api" \\r
-H "Content-Type: application/json" \\r
-H "Authorization: Bearer $MA_TOKEN" \\r
-d '{"message_id":"1","command":"player_queues/all"}'\r
```\r
\r
API documentation is available at: `http://YOUR_SERVER:8095/api-docs`\r
\r
### Key API Commands\r
\r
| Command | Args | Description |\r
|---------|------|-------------|\r
| `players/all` | - | List all players |\r
| `player_queues/all` | - | List all queues |\r
| `player_queues/play_pause` | `queue_id` | Toggle play/pause |\r
| `player_queues/next` | `queue_id` | Next track |\r
| `player_queues/previous` | `queue_id` | Previous track |\r
| `player_queues/stop` | `queue_id` | Stop playback |\r
| `player_queues/shuffle` | `queue_id`, `shuffle_enabled` | Set shuffle |\r
| `player_queues/repeat` | `queue_id`, `repeat_mode` | Set repeat (off/all/one) |\r
| `player_queues/clear` | `queue_id` | Clear queue |\r
| `player_queues/items` | `queue_id`, `limit`, `offset` | Get queue items |\r
| `player_queues/play_media` | `queue_id`, `uri` | Play by URI |\r
| `music/search` | `search`, `media_types`, `limit` | Search library |\r
| `music/recently_played_items` | `limit` | Recent items |\r
| `music/sync` | `media_types`, `providers` | Sync library |\r
| `config/players/get` | `player_id` | Get player settings |
- Make sure OpenClaw is installed (local or Docker)
- Run the install command in chat:
/install music-assistant - After installation, invoke the skill by name or use
/music-assistant - Provide required inputs per the skill's parameter spec and get structured output
What is Music Assistant?
Control Music Assistant (Home Assistant music server) - playback, volume, queue management, and library search. Use when user wants to play/pause music, skip... It is an AI Agent Skill for Claude Code / OpenClaw, with 382 downloads so far.
How do I install Music Assistant?
Run "/install music-assistant" in the OpenClaw or Claude Code chat to install it in one step — no extra setup required.
Is Music Assistant free?
Yes, Music Assistant is completely free (open-source). You can download, install and use it at no cost.
Which platforms does Music Assistant support?
Music Assistant is cross-platform and runs anywhere OpenClaw / Claude Code is available (cross-platform).
Who created Music Assistant?
It is built and maintained by Rodrigo (@rodrigosiviero); the current version is v1.0.3.