flacli
This MCP server drives flacli, a tool that finds music on Soulseek through your own Nicotine+ client, files it into a library, and fills in artist/album metadata.
Health check (
doctor): verify Nicotine+ is reachable, the music dir exists, and what's configured.Fetch music (
get_music): name songs or albums, resolve them on MusicBrainz, skip what you already own, and start background Soulseek matching.Sync playlists (
sync_playlist): import from a file (Spotify export, CSV, M3U, JSPF, XSPF), a TIDAL/Deezer/YouTube Music URL, or an existing playlist id.Track progress (
status): per-playlist counts, running job, download progress; finished downloads get filed asArtist/Album/NN - Title.Review matches (
review_candidates): see candidates with confidence, quality, and scoring reasons; filter to doubtful ones or those not found.Curate (
approve_tracks,skip_tracks,cancel_job): approve or exclude tracks, or stop a running matching job.Download (
queue_downloads): show totals first, then queue transfers in Nicotine+ on confirmation.Export (
write_m3u): write the playlist as M3U8 in original order, listing anything still missing.Clean up (
tidy_library): dry-run or apply normalisation of tags, duplicate lossy files, and file layout.Enrich metadata (
wiki_todo,wiki_fill,wiki_sources,wiki_write): find missing bios/wikis, pull Wikipedia text or MusicBrainz facts, and store written text beside the music and in the player's cache.
Canonicalises track and album metadata, checks the existing library, and provides artist image relations for filling artist pictures.
Imports playlists from Spotify using the user's data export or an Exportify CSV.
Connects to TIDAL's official API via browser login to access the user's TIDAL account and playlists.
Retrieves Wikidata portraits for artists to fill missing artist pictures.
Provides artist images from Wikimedia Commons, recording author and licence information.
Fetches Wikipedia lead paragraphs for artists and albums that have linked articles, filling bios and wikis with attribution.
Integrates with YouTube Music through ytmusicapi, using logged-in request headers to access playlists.
Click on "Deploy Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@flacli get Lorde - Royals and the album Geogaddi by Boards of Canada"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
flacli
Site: https://flacli.vercel.app · Repo: https://github.com/h-3303/flacli
Get music onto disk from any agent, or from a shell: name songs and albums, or hand over a playlist; flacli
canonicalises the tracks on MusicBrainz, skips what your library already holds, fetches the rest on Soulseek
through your own running Nicotine+ client (one identity, your shares intact), files every track as
Artist/Album/NN - Title as it lands, and writes an M3U in the original order.
It is a fork of claude-music with the Claude Code plugin layer removed. The same engine now has three front doors, so the tool works with whatever drives it:
Front door | Run | For |
CLI |
| any agent with a shell, including small local models; humans |
Simple MCP |
| MCP clients with a modest model: fifteen coarse tools, one step each |
Full MCP |
| capable models: every fine-grained tool (55) |
Every CLI command prints one JSON object and returns within seconds; Soulseek matching runs in a detached worker
and flacli status follows it. flacli guide prints the workflow for an agent to read.
agent ──shell──▶ flacli ─┬─▶ MusicBrainz (1 req/s, cached)
or MCP └─▶ Unix socket ──▶ MCP Bridge plugin ──▶ Nicotine+ core ──▶ SoulseekNo telemetry, no hosted services. The only network traffic is MusicBrainz lookups and Soulseek through Nicotine+.
Install
Needs Nicotine+ 3.3 or newer and uv. Two halves: the flacli command, and a small
bridge plugin that runs inside Nicotine+.
git clone https://github.com/h-3303/flacli ~/src/flacli && cd ~/src/flacli
./install.shThe installer copies nicotine-plugin/mcp_bridge into Nicotine+'s plugin folder (native or Flatpak) and runs
uv tool install . so flacli lands on your PATH. Then: Nicotine+ → Preferences → Plugins → enable plugins →
tick MCP Bridge (re-tick it after upgrading). Check with:
flacli doctor
flacli config set music_dir ~/Music
flacli config set contact you@example.com # sent in the MusicBrainz User-Agent, as their terms askSettings live in ~/.config/flacli/config.toml; environment variables (FLACLI_MUSIC_DIR, FLACLI_DATA,
FLACLI_CONTACT, NICOTINE_MCP_SOCKET, FLACLI_TIDAL_CLIENT_ID, FLACLI_AUTO_TIDY, FLACLI_WIKI_TARGETS,
FLACLI_MPD, FLACLI_STALL_MINUTES) override them.
Related MCP server: music-mcp-agent
Use from a shell
flacli get "Lorde - Royals" "Boards of Canada - Geogaddi (album)"
flacli get '{"kind": "track", "artist": "Lorde", "title": "Royals"}' # JSON when a name holds a dash
flacli status 1 # a minute later: job progress, downloads, where files went
flacli sync ~/Downloads/Playlist1.json
flacli status 2 # until the job is finished
flacli queue 2 # totals: tracks, MB, users
flacli queue 2 --yes # queue them
flacli review 2 --doubtful # the matches below 0.85, with reasons
flacli approve 2 --tracks 14,15 && flacli skip 2 --tracks 16
flacli m3u 2
flacli tidy && flacli tidy --apply # library clean-up: plan, then apply
flacli mpd # is the player's MPD reachable, and does it serve the same library?
flacli avatar fill # a picture for every artist: Wikidata portrait, MusicBrainz, Deezer
flacli cover fill # a cover for every album: Cover Art Archive, Deezer, iTunes; embedded too
flacli wiki missing # artists and albums whose bio / wiki in the player is empty
flacli wiki fill # Wikipedia's lead paragraph where an article exists, attributed
flacli wiki set "Artist" "Album" --text-file t.txt --attribution "Written by ... from MusicBrainz"flacli --help and flacli <command> --help document every flag.
The player
flacli files music; Flaclify (or any MPD client) plays it. The two meet through MPD and through files beside the music, nothing else:
New files. Each tidy ends with a scoped
updateof the folders that received files, so a finished download is in the player's library as soon as it is filed. A fulltidy --applyupdates the whole library once.Playlists.
flacli m3uwrites the M3U8 and also stores the playlist in MPD under its own name (playlistclear+playlistadd), so it appears in the player's Playlists view; tracks MPD does not know yet get their folders updated first.flacli mpd playlist <id>does the MPD half on its own.Bios, wikis, pictures, covers.
flacli wiki,flacli avatarandflacli coverwriteArtist/artist.md,Artist/Album/wiki.md,Artist/artist.jpgandArtist/Album/cover.jpgbeside the music. Flaclify reads the text and the artist pictures from those files itself, before any online provider, and re-reads one whenever it is newer than its cached copy; album art it takes only from its cache. The direct write into a player's cache (wiki_targets, defaultflaclify) is still there for Euphonica; set it to nothing once the files alone are enough. Covers are the exception: they go into Flaclify's cache whenever it exists, whateverwiki_targetssays, because a failed lookup remembered there would otherwise hide the file for good.
MPD is found through $MPD_HOST / $MPD_PORT, then the usual local sockets, then localhost:6600;
flacli config set mpd <socket path | host:port | off> pins or disables it. Over a local socket flacli reads MPD's
music_directory and skips updates and playlists when it is not the library it files into; over TCP it assumes
they match. flacli doctor and flacli mpd report all of this. An unreachable MPD is a skipped field in the
result, never a failure.
Artist pictures
The player shows a picture for each artist and finds almost none on its own. flacli avatar fill gives every
artist one: a picture a tagger left in the artist folder, else the Wikidata portrait (Wikimedia Commons, author
and licence recorded), else a MusicBrainz image relation, else Deezer's public artist picture for an exact name
match. It is saved beside the music as Artist/artist.jpg, where Navidrome and Jellyfin look too, its origin in
.wiki/avatars.json, and written into the player's image cache the way the player would have, so it shows at
once. An artist none of the sources has is remembered in the same file and not asked for again until
--retry, a new MusicBrainz id in the tags, or a picture dropped into the folder. flacli avatar set "Artist" photo.jpg uses a picture of your own.
Album covers
An album with no cover.jpg and no picture in its tracks shows as a grey square, and once the player's lookup
has failed it never asks again. flacli cover fill gives every album one: a picture a tagger left in the folder
or embedded in a track, else the Cover Art Archive front (the tagged release, then the release group MusicBrainz
finds), else Deezer's album search, else the iTunes Search API, the last two for an exact artist and title
match. It is saved as Artist/Album/cover.jpg, where MPD's albumart, Navidrome and Jellyfin look, embedded in
every track that has no picture (never replacing one; --no-embed leaves the tags alone), its origin kept in
.wiki/covers.json, and written into the player's cache under the album's folder as MPD names it, clearing the
failed-lookup memo. An album that already has its cover file only gets it embedded. An album none of the sources
has is remembered in the same file and not asked for again until --retry, a new MusicBrainz id in the tags, or
a picture dropped into the folder. flacli cover set "Artist" "Album" front.png uses a scan of your own.
Bios and wikis
Flaclify and Euphonica show a bio under each artist and a wiki under each album, and for most libraries
they are empty. flacli wiki fills them: the text lives as Artist/artist.md and Artist/Album/wiki.md
beside the music (front matter with the source and licence, plain text below) and is pushed into the
player's metadata.sqlite, where it appears in the wiki panel and can be backed up to MPD from there.
fill takes Wikipedia verbatim where MusicBrainz links an article; for the rest, sources hands an agent
the MusicBrainz facts and links to write from, and set stores what it wrote with an attribution that
names the sources and the model. wiki_targets chooses the players (flaclify, euphonica, or a path).
Use from an agent
Point the agent at the guide once (flacli guide, or paste src/flacli/GUIDE.md into its instructions) and give
it a shell. The guide is written for small models: a quick reference, two short workflows, and the rules that
matter (never queue downloads without the user's yes, never delete by hand, do not fight the Soulseek rate limit).
For MCP clients, register flacli mcp (simple) or flacli mcp --full. docs/integrations.md
has the configuration for Claude Code, Codex CLI, Gemini CLI, opencode, Goose, Claude Desktop, and local
models through Ollama or llama.cpp.
Claude Code plugin
install.sh also registers the repository as a plugin marketplace and installs the flacli plugin when
claude is on PATH; from inside Claude Code the equivalent is /plugin marketplace add h-3303/flacli then
/plugin install flacli@flacli (and install.sh for the bridge and the command). The plugin is a thin
wrapper: the two skills (/playlist-sync, /music-tidy), the matcher agent, a session health check and
a download monitor, over flacli mcp --full and flacli mcp --soulseek from PATH. It has no settings
of its own; flacli config is the one place. Coming from claude-music: /plugin uninstall claude-music@claude-music, then the steps above; the Nicotine+ bridge plugin is the same and needs no
change.
Services
TIDAL: official API, browser login. Register your own app at developer.tidal.com with the redirect URI
http://127.0.0.1:43117/callback, thenflacli config set tidal_client_id <id>andflacli service connect tidal.Deezer: public playlists only, no login.
flacli service playlists deezer --user <id or profile URL>.YouTube Music: unofficial (ytmusicapi). Copy the request headers from a logged-in music.youtube.com tab into a file and
flacli service connect youtube-music --headers-file headers.txt.Spotify: the data export or an Exportify CSV (Spotify's developer terms forbid feeding API data to a model).
Tokens are stored 0600 under the flacli data dir and never leave the machine.
Optional extras
The full MCP server also exposes beets import and the ListenBrainz content resolver
(troi) when they are installed. See flacli mcp --full.
Development
uv sync # dev environment
uv run pytest # unit tests; bridge tests fetch Nicotine+ source into $XDG_CACHE_HOME/flacli
tests/run_matrix.sh # against every supported Nicotine+ versionTested against Nicotine+ 3.3.10, 3.3.11 and master with MCP Python SDK 2.x. GPL-3.0-or-later.
Built by Moirai Digital.
Available Tools
15 toolsapprove_tracksA
Approve candidates: give track_ids (candidate picks which one, 0 = best), or min_confidence to approve every track in the playlist at or above it. Approving queues nothing; queue_downloads does.
Inputs: playlist_id (required), candidate, track_ids, min_confidence.
cancel_jobB
Stop the running matching job of a playlist.
Inputs: playlist_id (required).
doctorARead-only
Health check: is Nicotine+ reachable, does the music dir exist, what is configured. Call this first when something fails; the result says how to fix it.
Inputs: no named parameters.
get_musicA
Fetch named songs and albums in one call. Items: "Artist - Title" for a song, "Artist - Album (album)" for a whole album. Resolves them on MusicBrainz, skips what the library already has, and starts a background job that searches Soulseek and queues every match at or above min_confidence; the request itself is the go-ahead, no extra confirmation. Report what was understood, then call status(playlist_id) in a minute or two.
Inputs: items (required), lossy, min_confidence.
queue_downloadsB
Without yes: the totals (tracks, size, users) of what would be downloaded; show them to the user. With yes=True: queue the transfers in Nicotine+. min_confidence first approves every candidate at or above it.
Inputs: playlist_id (required), yes, min_confidence.
review_candidatesCRead-only
Tracks that need a decision with their best candidates: confidence, quality, why they scored, user queue. doubtful_only hides everything at or above 0.85. status="not_found" lists what Soulseek did not have.
Inputs: playlist_id (required), limit, offset, status, +1 more.
skip_tracksB
Leave these tracks out of matching and the M3U.
Inputs: track_ids (required), reason.
statusA
All playlists, or one playlist: counts by state, the running or last job, download progress. Finished downloads are filed into the library (tags normalised, Artist/Album/NN - Title) as a side effect. The 'next' field says what to do next.
Inputs: playlist_id.
sync_playlistA
Import a playlist (file path: Spotify export, CSV, M3U, JSPF, XSPF; or a TIDAL / Deezer / YouTube Music share URL; or an existing playlist id), resolve it on MusicBrainz, diff it against the library, and match the missing tracks on Soulseek in the background. Nothing is downloaded unless yes=True, which the user must have asked for. Follow with status(playlist_id) until the job is finished, then queue_downloads.
Inputs: target (required), yes, lossy, min_confidence.
tidy_libraryADestructive
Library clean-up: normalise tags, drop lossy duplicates of FLACs, file everything as Artist/Album/NN - Title. apply=False is a dry run that writes a report; apply=True changes files and must only follow the user's yes to the listed deletions.
Inputs: apply, force.
wiki_fillA
Give every entry without text its English Wikipedia lead paragraph when MusicBrainz links one (attributed,
CC BY-SA), limit entries per call. The rest come back in to_write with MusicBrainz facts and links: write
those yourself, from the facts only, and store each with wiki_write. Call again while remaining > 0.
Inputs: limit.
wiki_sourcesB
Facts and links for one artist (album=None) or album: MusicBrainz type, dates, area, labels, tags, annotation, outbound links (Wikidata, Discogs, Bandcamp, homepage), and the Wikipedia lead when there is an article.
Inputs: artist (required), album.
wiki_todoB
Artists and albums in the library that have no bio / wiki text yet, with what a writer needs (tracks, year, MusicBrainz ids). Start here, then wiki_fill; write the rest yourself with wiki_sources + wiki_write.
Inputs: include_all.
wiki_writeC
Store the text for an artist (album=None) or an album: written to a sidecar file beside the music and pushed into the player's cache. Plain text, no markup; one paragraph for an album, two for an artist; only what the sources support. attribution is shown under the text: name the sources and, if you wrote it, yourself (e.g. "Written by Claude from MusicBrainz and Discogs, 2026-09-17"). force replaces existing text.
Inputs: artist (required), content (required), attribution (required), url, +2 more.
write_m3uB
Write the playlist as M3U8 in its original order from the local files; lists the tracks still missing.
Inputs: playlist_id (required), path.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 15 tools
Two clear clusters exist (download/playlist workflow and wiki authoring), and most tools like approve_tracks vs queue_downloads vs cancel_job are cleanly separated. The wiki_* set (todo/fill/sources/write) has subtle boundary overlaps—both wiki_fill and wiki_sources return Wikipedia lead text—but descriptions disambiguate them adequately. Overall distinct purposes with only minor friction.
Mostly a consistent snake_case verb_noun pattern (get_music, sync_playlist, review_candidates, queue_downloads, write_m3u, tidy_library, cancel_job) plus a wiki_* prefix group. Minor deviations are bare nouns 'doctor' and 'status', which break the verb style but remain readable.
15 tools is within a reasonable range and each earns its place across the download pipeline and the wiki authoring flow. It sits at the top of the comfortable band given the server covers two distinct feature areas, so slightly heavy but justified.
The domain (library management, Soulseek matching/download, wiki metadata) is well covered end-to-end: health check, fetch, sync, status, review/approve/skip, queue, cancel, M3U export, and tidy. Minor gaps like no explicit library browse/search or playlist deletion are workable around, but not full lifecycle CRUD.
Maintenance
Related MCP Connectors
Search MusicBrainz artists, releases, works, labels; resolve ISRC/ISWC/barcode; fetch cover art.
Music industry tools for AI agents: artist research, catalogs, release plans and content.
CWI Discovery Engine is the sync-licensing discovery layer for AI agents: natural-language brief in, licensable tracks with verified ISRCs and one-signature clearance out. 29 MCP tools (find_tracks_for_brief leads). For general ISRC metadata lookup, we defer to MusicBrainz — we are the licensable-track discovery layer, not a general database.
The media memory layer for AI agents and their humans. Your AI client can search your collection, add and log what you've finished, update ratings and lists, and find patterns across everything you've read, watched, played, and listened to.
Related MCP Servers
- FlicenseBqualityNot gradedmaintenanceEnables Claude to search and download music files from the Soulseek peer-to-peer network using a Soulseek account.3-
- FlicenseNot gradedqualityDmaintenanceEnables music search, metadata retrieval, local audio analysis (tempo, key, energy), recommendations, song recognition, and classical work resolution via Spotify, Last.fm, AudD, MusicBrainz, and Songkick APIs.-
- FlicenseNot gradedqualityAmaintenanceEnables AI assistants to search and download music from the Soulseek peer-to-peer network via Nicotine+, with smart ranking of results by audio quality and peer speed, bulk automation, and real-time transfer monitoring.-
- AlicenseAqualityBmaintenanceProvides AI agents with structured access to the Soulseek network via slskd, including label and format filtering and standing wishlist searches.13MIT