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.2
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.2.tar.gz | 23.5 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| ma_http_client-0.1.2-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 42.5 kB
Release files / ma_http_client-0.1.2.tar.gz
| Download URL | ma_http_client-0.1.2.tar.gz |
|---|---|
| Size | 23.5 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
bf9f9f40d3e56c010ce180691493a51b21369d595f4e2410a53169759de74036
|
|
BLAKE2b-256 checksum How to use checksums |
d8592b51436a88e9005612c155109fd7833c05cb14f4b074a2d126f7bb56599a
|
| 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.2-py3-none-any.whl
| Download URL | ma_http_client-0.1.2-py3-none-any.whl |
|---|---|
| Size | 18.9 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
0eda2fd803c4ffb481755936af021e317d0f650464e80162645a1b50abb539cf
|
|
BLAKE2b-256 checksum How to use checksums |
3ebd874e2fb398459776193aac9ec8cd2217eb3512e1cbf15075fb974deac294
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|