foo_ai
AI MCP control for foobar2000.Control your music player with an AI assistant!
Overview
This component starts a local Model Context Protocolserver. You can connect to it with any MCP clientthat supports SSE (tested with GitHub Copilot and Cursor).
The AI assistant can send requests to get information from the running music playeror invoke actions like play, create playlists, change volume, etc.
Compatible with foobar v2.0+, x86 and x64.
Example tasks
- "Make a new 80s rock playlist and play it."
- "What's the name of the currently playing track?"
- "Add this track to my 'Favorites' playlist."
- "What's the oldest song in my library?"
- "Turn up the volume a bit."

Installation
- Download the latest release from the Releases page.
- Double-click the downloaded
.fb2k-componentfile to install the component. - Restart foobar2000 if it's running.
- By default, the server will be listening on
http://localhost:9910/sse.You can change the host and port in settings (Preferences > Tools > AI). - Add the URL from the previous step to your MCP client and voilà!
Available features
Tools
The server provides the following tools:
list_library: List all tracks in the library. Can specify a query string.list_playlists: List all playlists.list_playlist: List tracks in a specific playlist. Can specify a query string.list_current_track: Get information about the currently playing track.add_tracks: Add tracks to a playlist.remove_tracks: Remove tracks from a playlist.remove_all_tracks: Remove all tracks from a playlist.move_tracks: Move tracks within a playlist.set_active_playlist: Set the active playlist (the one shown in the UI).set_playing_playlist: Set the playing playlist (the one the fb2k picks tracks from).set_playback_state: Play or pause music.play_at_index: Play a track at a specific index in the active playlist.set_focus: Set the focus to a specific track in the active playlist (without playing it).create_playlist: Create a new playlist.rename_playlist: Rename a playlist.delete_playlist: Delete a playlist.set_volume: Set volume.toggle_mute: Toggle mute state.get_volume: Get current volume and mute state.
Resources
The server provides a few resources.They are provided to support subscriptions. When a client subscribes to a resource,it will receive updates whenever it is updated in the player.
This isn't a crucial feature as clients can always call the tools to get the latest info,but it can be useful for real-time updates, if your MCP client supports it.
The following resources are available:
current_track://.: Contains info about the current track: when it was last changed and it's playing/paused state.playlists://.: Contains the same info as thelist_playliststool - playlist names, track counts,last modification times, active/playing states, etc.volume://.: Contains the same info as theget_volumetool.