Build a provider
A provider adds a music service, a kind of speaker, a source of metadata or a feature to Music Assistant. This section helps you pick the type and the place for yours, and build it.
What you can work on
Section titled “What you can work on”Each type has a base class in music_assistant/models/ and a type value in its manifest.
| Type | Base class | What it adds |
|---|---|---|
music |
MusicProvider |
A source of music: a streaming service, a radio directory, your own files. |
player |
PlayerProvider |
A kind of player, such as Sonos, Chromecast or AirPlay. |
metadata |
MetadataProvider |
Metadata the music sources leave out, such as artwork, biographies and lyrics, from an online source or local files. It does not change the original item. |
plugin |
PluginProvider |
A feature that works with the core, such as scrobbling, the AirPlay Receiver, AI and speech engines, or the Home Assistant connection. |
audio_analysis |
AudioAnalysisProvider |
Analysis of the audio of a track, such as beats, key or loudness. |
You can also improve an existing provider: its manifest.json lists its maintainers in codeowners, where @music-assistant stands for the core maintainers.
Where a provider lives
Section titled “Where a provider lives”- In the server: it ships with every Music Assistant server, and the project supports it. That asks for demand, documentation, tests and a maintainer.
- In your own repository: administrators install it from the community catalog in the Marketplace. You release when you want, and the project does not support it.
Building a provider compares the two and covers the template, testing and joining the community catalog.
Start here
Section titled “Start here”- Choose the place. For your own repository, start from the community provider template (you need Docker and VS Code with Dev Containers). For the server, set it up first: see Server.
- Read the page of your type: music provider, player provider, or metadata, plugin and audio analysis providers. Each names the provider to start from: a demo provider, or for metadata an existing provider.
- Give your provider a folder with at least
__init__.pyand a manifest. Options come fromget_config_entries()in code, a login or a pairing from a setup flow.
The rules
Section titled “The rules”These are not negotiable. Read them before you start:
- the usage policy, for every provider, and the rules for providers that stream that follow from it;
- the community catalog rules, for a provider in the community catalog.
Where the details live
Section titled “Where the details live”- The manifest: every field of
manifest.json. - Setup flows: login, pairing and options.
- Cache and throttle your requests:
use_cacheand the throttler, for a provider that talks to an online service. - Menu actions, tools for AI assistants and provider pages: what a provider can add to the app and to AI assistants.
- The contract for player providers: What a Provider Has to Do in the players README.
Providers and Players explain how they fit into the server.
Who to talk to
Section titled “Who to talk to”- Ask questions on Discord.
- To show demand for a provider in the server, link a discussion in Feature requests and ideas.
- For the community catalog, the registry takes submissions as an issue.
Music Assistant is a project of the Open Home Foundation.