Providers · chapters · 24 of 25
MCP server
A local MCP server that lets AI apps see what is playing and control the player.
facts
- status
- stable
- kind
- control
- on by default
- yes
- needs
- An MCP client on the same computer
- platforms
- Linux, FreeBSD, Windows
Description
The MCP server lets an AI app control Yafmp through the Model Context Protocol. It exists in the desktop edition only.
An MCP client on the same computer can see what is playing, search and browse the library, play, manage the queue and run any command from the command palette, such as picking an AirPlay speaker or an equalizer preset. It can also ask the DJ for a playlist.
The server offers these tools:
| Tool | What it does |
|---|---|
get_status | What is playing: state, track, position, output, volume, shuffle, repeat and the queue’s length. |
play, pause, stop | Resume (or start the queue from the top), pause, or stop. Stop keeps the queue. |
next, previous | Skip to the next or previous track. |
seek | Jump to a position in the current track, in seconds. |
set_volume | Set the volume, 0 to 100, of this computer or of the AirPlay or Cast speaker. |
set_shuffle, set_repeat | Shuffle on or off; repeat off, all or one. |
search | Search the library sources for artists, albums, songs and stations. |
browse | Walk the library tree: the sources, a source’s top rows, then their contents. |
play_item | Play a search or browse result. An album, artist, playlist or folder plays whole. |
add_to_queue | Add a result’s tracks to the end of the queue without playing. |
get_queue | The queue, numbered from 1, with the playing track marked. |
play_queue_number | Play the track with that number in the queue. |
remove_from_queue | Remove tracks from the queue by number. |
clear_queue | Stop and empty the queue. |
list_commands | The app’s palette commands, with their ids. |
run_command | Run a palette command by id, with its text when it takes one. |
dj | Ask the DJ for music. It picks tracks from the library and plays them. |
Requirements
- Yafmp for Linux, FreeBSD or Windows, running.
- An MCP client on the same computer that supports the Streamable HTTP transport.
Setup
-
Open Settings → MCP server. The switch Let AI apps control Yafmp is on by default, and the line under it reads “Listening on http://127.0.0.1:43823/mcp”.
-
Add the server to your MCP client with these details:
Transport Streamable HTTP URL http://127.0.0.1:43823/mcpAuthentication none -
For Claude Code, the settings pane shows the command to copy:
claude mcp add --transport http yafmp http://127.0.0.1:43823/mcp
Settings
| Setting | Default | What it does |
|---|---|---|
| Let AI apps control Yafmp | on | Starts or stops the server. |
Under the switch, a status line shows the address the server listens on, Off, or why it could not start. The pane also shows the Claude Code command with the address filled in.
Limits
- Desktop edition only. Not on Android or in the Apple edition.
- The server listens on this computer only (127.0.0.1). It cannot be reached from another machine.
- There is no password or token. Any program running under your user account can use it, as with the media keys.
- Requests from a web page are refused: the request’s
Host, and itsOriginwhen there is one, must be this machine. - The server answers
POSTrequests with plain JSON. It opens no server-to-client stream and keeps no sessions. - The
djtool only starts the DJ. The playlist arrives later; the client has to ask for the status again.
Troubleshooting
| Problem | Why | What to do |
|---|---|---|
| The status line says “Couldn’t listen on port 43823” | Another program, or a second copy of Yafmp, already uses the port | Quit the other program, then switch the server off and on. |
| The client gets “405 Method Not Allowed” | It sent a GET, as the older SSE transport does | Set the client’s transport to Streamable HTTP. |
| The client gets “403 Forbidden” | The request named a host other than this machine | Use 127.0.0.1 or localhost in the URL. |
The dj tool answers “The DJ is switched off” | The DJ plugin is disabled | Switch DJ on in Settings and set its model. |