music-assistant-client
Music Assistant Client
What it is and what it does
Music Assistant Client is an async Python library that acts as a remote control for Music Assistant Server, a music management and playback system. It provides authenticated connections to the server's REST API, allowing you to browse music libraries, search for tracks and artists, control playback on multiple players, manage queues, and subscribe to real-time server events. The library handles authentication via long-lived tokens (recommended for production) or temporary access tokens, with automatic schema version detection for backward compatibility with older servers that don't require authentication.
The client is built on aiohttp for async HTTP communication and uses orjson for efficient JSON parsing. It exposes controllers for authentication management, music library operations, player control, queue management, and server configuration. It supports both HTTP and HTTPS connections, including custom SSL contexts for self-signed certificates. The library is actively maintained and targets modern Python versions (3.12+), making it suitable for building music control applications, home automation integrations, or remote management tools.
Use it for:
- Build a custom web dashboard or mobile app to browse and control music playback on your Music Assistant Server instance.
- Integrate Music Assistant into home automation workflows to play specific playlists or artists on demand.
- Create a command-line tool to remotely manage music libraries, search for tracks, and queue songs across multiple players.
- Subscribe to server events to trigger actions when playback starts, stops, or changes (e.g., logging, notifications).
- Develop a multi-room audio controller that manages playback synchronization across several players in different zones.
Worth the install?
AI-flagged interpretation of the facts on this page — verify before relying
Python async client library for connecting to and controlling Music Assistant Server instances via their REST API, with support for authentication, music library browsing, player control, and event subscriptions.
Yes. The package is actively maintained, has low install friction, carries no known vulnerabilities, and uses a permissive license. Install it if you need to programmatically control a Music Assistant Server instance from Python—particularly for automation, dashboards, or multi-player coordination. Ensure your Music Assistant Server is running and you have a valid authentication token before connecting.
Install
music-assistant-client on PyPI
pip
pip install music-assistant-clientuv
uv add music-assistant-clientpoetry
poetry add music-assistant-clientInstalling music-assistant-client
Before you install
Low install friction with only three runtime dependencies (aiohttp, music_assistant_models, orjson). Actively maintained with a recent release; requires Python 3.12 or later.
License in practice
Licensed under Apache-2.0 (permissive), allowing use in commercial and private projects with minimal restrictions beyond attribution and liability disclaimers.
Quickstart
pip install music-assistant-client
from music_assistant_client import login_with_token, MusicAssistantClient
import asyncio
async def main():
user, token = await login_with_token(
"http://localhost:8095",
"username",
"password"
)
async with MusicAssistantClient("http://localhost:8095", None, token=token) as client:
await client.start_listening()
asyncio.run(main())
Requires Python 3.12+; Music Assistant Server instance must be running and accessible at the specified URL; authentication token required for server schema version 28 and above.
Verify before relying
- Whether the client supports all Music Assistant Server versions or only recent ones beyond schema 28.
- Performance characteristics when handling large music libraries or high-frequency event subscriptions.
- Whether SSL context customization works with all certificate types mentioned in the documentation.
Package facts
| License | Apache-2.0 (permissive) |
| Python support | supports the current Python release (>=3.12) |
| Install friction | low — pure-Python wheel |
| Runtime dependencies | 3 — aiohttp, music_assistant_models, orjson |
| Maintenance | actively maintained — 2 days since the last release |
| First released | |
| Downloads | 207,526/month — #9,548 on PyPI (30-day window, as of 2026-08-14) |
| Known vulnerabilities | none known (OSV.dev, checked 2026-08-14) |
Evidence: music_assistant_client-1.5.0-py3-none-any.whl
Tags
More Internet packages
Botocore provides low-level, data-driven access…
permissive · top 100 on PyPI
aiobotocoreProvides an async client for AWS services using…
permissive · top 100 on PyPI
pydanticPydantic validates Python data structures…
permissive · top 100 on PyPI
filelockProvides a platform-independent file locking…
permissive · top 100 on PyPI
fastapiFastAPI is a Python web framework for building…
permissive · top 100 on PyPI
googleapis-common-protosProvides common Protocol Buffer message…
permissive · top 100 on PyPI
jellyfin-apiclient-pythonPython client library for interacting with…
copyleft · top 15,000 on PyPI
music-assistant-modelsProvides shared data models for Music…
permissive · top 15,000 on PyPI
pyforked-daapdA Python client library for communicating with…
permissive · top 15,000 on PyPI
python-mpd2Provides a Python client library to communicate…
copyleft · top 15,000 on PyPI
ytmusicapiytmusicapi lets you programmatically interact…
permissive · top 15,000 on PyPI
pylastpylast provides a Python interface to Last.fm…
permissive · top 15,000 on PyPI
music-assistant-frontendProvides a Vue-based progressive web app (PWA)…
permissive · top 15,000 on PyPI
aioslimprotoAsync Python implementation of the SLIMProto…
permissive · top 15,000 on PyPI
spotifywebapipythonA Python library that wraps the Spotify Web…
permissive · top 15,000 on PyPI
musicbrainzngsProvides Python bindings to query the…
permissive · top 15,000 on PyPI