#mpd #discord #rpc #music

app mpd-discord-rpc

Displays your currently playing song / album / artist from MPD in Discord using Rich Presence

9 stable releases

new 1.2.1 May 3, 2021
1.2.0 Oct 14, 2020
1.1.3 Aug 13, 2020
1.1.2 Mar 21, 2020
1.0.2 Feb 14, 2020

#25 in Audio

Download history 3/week @ 2021-01-12 10/week @ 2021-01-19 2/week @ 2021-01-26 3/week @ 2021-02-02 11/week @ 2021-02-09 150/week @ 2021-02-16 7/week @ 2021-02-23 4/week @ 2021-03-02 3/week @ 2021-03-09 3/week @ 2021-03-16 18/week @ 2021-03-23 26/week @ 2021-03-30 12/week @ 2021-04-06 8/week @ 2021-04-13 19/week @ 2021-04-20 9/week @ 2021-04-27

88 downloads per month

MIT license

180 lines

MPD Discord RPC

crates.io aur

Displays your currently playing song / album / artist from MPD in Discord using Rich Presence. It includes support for multiple MPD hosts if, like me, you have more than one server you alternate between.

The program does not require MPD or Discord to be running in order to run.

Once installed just run mpd-discord-rpc.




The cargo package can be found here.

cargo install mpd-discord-rpc

Arch Linux

The AUR package can be found here.

yay -S mpd-discord-rpc-git


I have a derivation on the way. The [replace] tag is causing some issues right now.


Running the program once will generate a default configuration file. On Linux this will be at ~/.config/discord-rpc/config.toml

  • id - The Discord application ID to run through.
  • hosts - An array of MPD server host socket addresses. Each one will be tried in order until a playing server is found.
  • format - Format strings. Tokens are listed below.
    • details - A format string for the top line. This is the song title by default.
    • state - A format string for the second line. This is the artist / album by default.
    • timestamp - The timestamp mode for the third line. This is 'elapsed' by default. Can be one of elapsed, left or off. Falls back to elapsed.

Formatting Tokens

Any part of the format string that does not match one of these tokens will be displayed as is. The following will automatically be replaced with their value from MPD:

  • $title
  • $album
  • $artist
  • $date
  • $track
  • $disc
  • $genre
  • $duration
  • $elapsed

Default Configuration

This configuration file is automatically generated if one does not exist. It is included here for reference.

id = 677226551607033903
hosts = ["localhost:6600"]

details = "$title"
state = "$artist / $album"
timestamp = "elapsed"


~129K SLoC