skillfed

music-assistant-client

Music Assistant Client

music-assistant-client v1.5.0 207.5K downloads/30d#9,548 on PyPI
Permissive license Apache-2.0 Active released

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-client

uv

uv add music-assistant-client

poetry

poetry add music-assistant-client

Installing 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

Environment :: ConsoleProgramming Language :: Python :: 3.12Programming Language :: Python :: 3.13

Tags

music assistant server clientasync music player controlmusic library api clientmusic assistant pythonmusic streaming client libraryrest api music controlasync music management
music-streamingasync-clienthome-automation

More Internet packages