﻿---
title: Configuring Music Player Daemon (MPD) and Clients on macOS
date: 2025-10-18
excerpt: This article introduces Music Player Daemon (MPD) and its clients MPC and RMPC for a lightweight, customizable music playback experience on UNIX.
tags:
  - Music
  - FOSS
  - Rust
  - UNIX
  - Catppuccin
  - Ricing
  - Dotfiles
cover: https://assets.vluv.space/cover/rmpc_cover.avif
updated: 2026-07-08 21:21:02
lang: en
i18n:
  cn: /music-rmpc
  translation: 2
---

<script type="module" src="/js/components/tab.js"></script>
<script type="module" src="/js/components/sidenote.js"></script>

## Music Player Daemon

### Setup MPD

After installing, you can create the config directory and start/stop the mpd service with the commands below. Following the XDG Base Directory Specification, I keep my mpd config under `~/.config/mpd/`.

<side-note>

MPD is an audio player that has a server-client architecture. **[MPD](https://www.musicpd.org/)** plays audio files, organizes playlists and maintains a music database, all while using very few resources. In order to interface with it, a separate [client](https://wiki.archlinux.org/title/Music_Player_Daemon#Clients) is needed.

</side-note>

```shell
# The default config dir is ~/.mpd
# I prefer use $XDG_CONFIG_PATH to store mpd config;
mkdir ~/.config/mpd
mkdir ~/.config/mpd/playlists

# Start/Kill Mpd
mpd ~/.config/mpd/mpd.conf
pkill mpd
```

The MPD config[^1] allows multiple `audio_output` entries. Adding a `fifo` output lets you pair it with `cava` for music visualization.

```conf ~/.config/mpd/mpd.conf
music_directory    "~/Music/CloudMusic"

bind_to_address    "127.0.0.1"
port               "6600"

audio_output {
 type "osx"
 name "CoreAudio"
 mixer_type "software"
}

audio_output {
 type "fifo"
 name "my_fifo"
 path "/tmp/mpd.fifo"
 format "44100:16:2"
 auto_resample "no"
 use_mmap "yes"
}
```

## MPC

MPC[^2] provides a minimalist CLI to MPD that covers basic playback needs. For example, the commands below switch tracks, show what's currently playing, and search songs by ID3Tags[^3].

```shell MPC Examples
# Skip to the next track
$ mpc next
Radiohead - Pyramid Song
[playing] #7/50   0:00/4:49 (0%)
volume: 96%   repeat: off   random: off   single: off   consume: off
# Show the currently playing track
$ mpc current
Radiohead - Pyramid Song
# Search music files by ID3Tags
$ mpc search artist radiohead
摇滚/Radiohead - Pyramid Song.mp3
摇滚/Radiohead - How Can You Be Sure？.mp3
...
摇滚/Radiohead - Fake Plastic Trees.mp3
摇滚/Radiohead - Black Star.mp3
```

You can build scripts on top of mpc's interface, or integrate it into status bars like SketchyBar or i3status.

After mpd starts, the play queue is empty by default. Run the following to add all music files to the queue:

```shell
mpc clear
mpc listall | mpc add
```

## RMPC

If you want a richer TUI experience, try RMPC, an MPD client written in Rust that is feature-rich and highly configurable.

> [!INFO]- Rmpc Features
>
> - Album cover art display if your terminal supports either of Kitty, Sixel, Iterm2 protocols, or via ueberzuggpp
> - Cava integration for music visualisation
> - Support for [synchronized lyrics](<https://en.wikipedia.org/wiki/LRC_(file_format)>)
> - Ability to play music from YouTube
> - Configurable (T) UI
>   - Configure what information (if any!) is displayed in the header
>   - Configure what columns are displayed on the queue pane
>   - Completely customize what tabs are rendered and mix and match their content
>   - Create any color theme you want
>   - Every keybind can be changed, vim-like by default
> - Ranger/LF-like three-column browser through your music library
> - Basic playlist management
> - Support scripting through basic CLI mode and script hooks
> - **Remote control** - Send commands to running rmpc instances (useful for window manager integration).

Here is a preview of my configured RMPC interface:

![rmpc_preview](https://assets.vluv.space/rmpc_preview.avif)

Two features worth calling out are RMPC's lyrics and visualization support.

<x-tabs>

<x-tab title="Lyric" active>

According to [Lyrics fetching from the song file · Issue #287](https://github.com/mierak/rmpc/issues/287), RMPC does not yet support reading lyrics tags embedded in mp3/flac files. To display lyrics, you need separate `lrc` files.

The tooling for this is mature. Software like [MusicTag for Android](https://www.cnblogs.com/vinlxc/p/11932130.html) makes batch processing easy.

</x-tab>

<x-tab title="Cava">

To add visualization to rmpc:

1. Install cava, and add a fifo output to the mpd config (see the mpd config section above)
2. Enable the cava feature in the rmpc config
3. Enable the cava display in the Queue tab (or any other tab you prefer)
4. Configure the cava theme

</x-tab>

</x-tabs>

rmpc uses RON (Rusty Object Notation) as its configuration language, which takes some learning. I won't go into my configuration details here; see my config repo[^4] for reference.

## Tweaks

### Now Playing for MPD on macOS

On macOS, mpd is not a now-playable app[^5]: while playing music, the macOS now-playing widget shows no information about the current track, and the media keys don't work either.

The fix:

-. Install [mpd-now-playable](https://github.com/00dani/mpd-now-playable)

  ```shell
  brew install pipx
  pipx install mpd-now-playable
  ```

-. Once installed, just run `mpd-now-playable`. The executable lives in `~/.local/bin`.

<x-tabs>

<x-tab title="Before" active>

![1029_mpd_nowplaying](https://assets.vluv.space/1029_mpd_nowplaying.avif)

</x-tab>

<x-tab title="After">

![1029_mpd_fixed](https://assets.vluv.space/1029_mpd_fixed.avif)

</x-tab>

</x-tabs>

[^1]: Check [mpd.conf — Music Player Daemon 0.25~git documentation](https://mpd.readthedocs.io/en/latest/mpd.conf.5.html) for detailed documentation.
[^2]: Music Player Client, [mpc - Music Player Daemon](https://www.musicpd.org/clients/mpc/)
[^3]: [ID3 - Wikipedia](https://en.wikipedia.org/wiki/ID3)
[^4]: Visit GitHub for my [Mpd Configs](https://github.com/Efterklang/dotfiles/tree/main/tui_cli/mpd) & [Rmpc Configs](https://github.com/Efterklang/dotfiles/tree/main/tui_cli/rmpc)
[^5]:  [Becoming a now playable app | Apple Developer Documentation](https://developer.apple.com/documentation/mediaplayer/becoming-a-now-playable-app)
