How does Mopidy work as a music server?
Updated
Mopidy is a music server written in Python that runs in a terminal or in the background on Linux computers or Macs with network connectivity and audio output. It plays music from local disk, Internet radio, and — through extensions — cloud services such as Spotify and SoundCloud. You control it from any phone, tablet, or computer using MPD or web clients, and multiple people can connect to the same server at once to search for music and manage the playlist together.
The server/client split
Mopidy itself has no graphical interface. It is a background process that owns the audio output and the music sources; everything you see and tap lives in a separate client. That separation is what lets one server feed many controllers at the same time.
- The server runs on the machine wired to speakers or a DAC. It needs network connectivity and audio output, nothing more.
- The clients run anywhere on the network — a browser on a laptop, an MPD app on a phone, a tablet on the couch.
- The playlist is shared state. Because clients talk to the same server, changes one person makes are visible to everyone else.
What protocols does it speak?
Out of the box, Mopidy is an HTTP server. That alone is enough for web-based frontends. Install the Mopidy-MPD extension and it also becomes an MPD server, which opens it up to the large ecosystem of existing MPD clients.
| Setup | Protocol available | Typical client |
|---|---|---|
| Base install | HTTP | Web frontends served by Mopidy |
| Base + Mopidy-MPD | HTTP and MPD | MPD clients on any popular OS |
| Base + other frontend extensions | Depends on extension | Additional web or MPD interfaces |
MPD clients exist for all popular operating systems, so you are not locked into one app or one platform. The same server can be driven by a desktop MPD client, a phone app, and a browser tab simultaneously.
Where the music comes from
Mopidy plays files and Internet radio without any extra components. Everything else arrives as an extension:
- Cloud services — Spotify, SoundCloud, and other services are added through backend extensions.
- Radio networks — additional radio sources beyond the built-in Internet radio support.
- New sources — because backends are pluggable, a new music source can be added as an extension rather than a fork.
This is the meaning of "extensible": the core stays a server, and capability is added around it.
A concrete example: the cassette player build
The Mopidy site describes a project in which a Raspberry Pi was embedded inside an old cassette player. The physical buttons and volume control were wired to the Pi's GPIO pins and used to control playback through a custom Mopidy extension. The cassettes carried NFC tags that selected playlists from Spotify.
That build shows the three layers working together: a backend (Spotify), a custom extension translating hardware events into playback commands, and the server coordinating it all. It also shows why the Raspberry Pi comes up repeatedly — it is an approachable single-board computer for running Mopidy, using Raspberry Pi OS, Ubuntu, or Arch Linux, and Pimoroni recommends Mopidy for use with their Pirate Audio gear.
Why run it this way
- One audio output, many controllers. The machine with the good speakers does the playing; everyone else just sends commands.
- No vendor lock-in on the interface. If you dislike your current client, switch to another MPD or web client without touching the server.
- A base for projects. Python, JSON-RPC, and JavaScript APIs make Mopidy a starting point for custom hardware and software, as the cassette player demonstrates.
Getting started
Install Mopidy on a Linux machine, Mac, or Raspberry Pi with network connectivity and audio output, then browse the extension list for the backends and frontends you need. If you want MPD clients to work, add Mopidy-MPD. If you want a web interface, pick a web frontend extension. After that, point any MPD or web client at the server and start building a playlist — from as many devices as you like.