music-assistant-client
A simple synchronous HTTP client for the Music Assistant API.
Installation
pip install ma-http-client
Usage
from ma_http_client import SimpleHTTPMusicAssistantClient
client = SimpleHTTPMusicAssistantClient(
server_url="http://localhost:8095",
token="YOUR_TOKEN", # required for MA >= 2.7.2
)
# Get all players
players = client.get_players()
# Search for media
results = client.search_media("Radiohead", limit=5)
# Play media on a player
client.play_media(queue_id=players[0].player_id, media="library://artist/204")
# Queue controls
client.queue_command_pause(players[0].player_id)
client.queue_command_next(players[0].player_id)
# Volume
client.player_command_volume_set(players[0].player_id, 50)
Claude Code Skill
Control Music Assistant with natural language from Claude Code. See CLAUDE.md for full setup.
pip install ma-http-client
ma-install-skill
Then in any Claude Code session:
/music-assistant play some Radiohead
Or just ask naturally — Claude auto-invokes the skill when it matches.
Standalone Agent
For use outside Claude Code (scripts, OVOS, etc.), install the claude extra:
pip install "ma-http-client[claude]"
from ma_http_client.claude_tools import MusicAssistantAgent
agent = MusicAssistantAgent(
ma_url="http://homeassistant.local:8095",
ma_token="YOUR_MA_TOKEN",
default_player="Living Room",
)
print(agent.run("Play some Radiohead"))
Debug Client
The DebugMusicAssistantClient extends the base client with fixture capture for troubleshooting:
from ma_http_client.debug import DebugMusicAssistantClient
client = DebugMusicAssistantClient(
"http://localhost:8095",
fixture_capture=True,
fixture_dir="./debug_fixtures",
)
players = client.get_players()
# API responses are automatically saved to ./debug_fixtures/
Metadata
Release files for ma-http-client 0.1.3
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| ma_http_client-0.1.3.tar.gz | 23.5 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| ma_http_client-0.1.3-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 42.4 kB
Release files / ma_http_client-0.1.3.tar.gz
| Download URL | ma_http_client-0.1.3.tar.gz |
|---|---|
| Size | 23.5 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
9d7f38ebe8b92ebaf659851b43646ef30af056c3b54839f3f086bb05c108fb3b
|
|
BLAKE2b-256 checksum How to use checksums |
453ac848f054f78af8c65a590492a2ef7fd1f0b3ba7c2e4f75e6d43064a27ee9
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
Release files / ma_http_client-0.1.3-py3-none-any.whl
| Download URL | ma_http_client-0.1.3-py3-none-any.whl |
|---|---|
| Size | 18.9 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
0b1b776deefa2350efb8021b5e423c2da932e3f8f6e8c7b4f98db65cdddd0f6c
|
|
BLAKE2b-256 checksum How to use checksums |
4e5c805fc367079e2dca6da7a0b257b64692c4e6b318426ef3ef4e42441e7450
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|