Skip to main content
Glama
crates-music-mcp

crates-music-mcp

by guohangbk

Server Configuration

Describes the environment variables required to run the server.

NameRequiredDescriptionDefault
MUSIC_DATA_DIRNoOverrides the user-level data directory where both secrets/ and state/ are stored.

Instructions

Guidance the server publishes about itself, which clients place ahead of the tool catalog so the model reads it before choosing anything.

This server publishes no instructions, or was last inspected before Glama recorded them.

Capabilities

Features and capabilities supported by this server

Protocol revision2025-11-25

CapabilityDetails
tools
{
  "listChanged": false
}
prompts
{
  "listChanged": false
}
resources
{
  "subscribe": false,
  "listChanged": false
}
experimental
{}

Tools

Functions exposed to the LLM to take actions

NameDescription
login_methodsA

List every supported login method for a platform.

平台:qq_music | netease | kugou。Call this FIRST and let the user choose. QQ Music / WeChat / mobile QQ are often DIFFERENT accounts — picking the wrong one logs into an empty account. Only log into the platforms the user actually needs.

login_startA

Start a login session. Call login_methods FIRST so the user can pick.

service: qq_music | netease | kugou method: qq_music -> phone_code(默认)| qq_qr | wx_qr | mobile_qr netease -> cookie(不用 login_start)| phone_code | qr kugou -> qr(默认)| phone_code 留空 = 用该平台推荐的方式。 phone: phone_code 必填;手机号由用户在对话里给出。

phone_code 不发二维码:login_start 发短信 -> 用户把验证码贴进对话 -> login_submit(session_id, code)。扫码方式返回 qr_markdown / ImageContent / qr_data_url,用户扫码并在手机上确认后调用 login_poll。

login_pollB

Poll a login session started by login_start.

login_submitC

Submit the SMS / captcha code for a phone_code login session.

credential_statusB

Check every platform's credential status (qq_music / netease / kugou).

除 vault 里的存档信息外,还会让平台自己补全「要问一次上游才知道」的字段 (例如网易云的 uid —— Cookie 导入时没有,不能一直显示成空)。

credential_refreshA

Force-refresh a shared credential (qq_music | netease).

酷狗没有续期接口,会返回 supported=false,不算失败。

credential_set_cookieA

Import a credential blob directly, no login flow needed.

netease: value 是 Cookie 串(MUSIC_U=...; __csrf=...), 从浏览器已登录网易云的请求头里整段复制即可。 kugou: value 是 Cookie 串,必须含 token=。 qq_music: value 是完整 Credential JSON(含 musicid / musickey / refresh_key / access_token 等;带 refresh_token 时才能自动续期)。

credential_logoutB

Delete a shared credential file (requires re-login afterwards).

analyze_music_profileA

Pull every platform's liked songs and return a compact statistical summary, which the model turns into a taste profile and stores with save_profile.

services: 平台列表,如 ["qq_music","netease","kugou"];留空 = 全部平台。

get_profileA

Return the stored taste profile JSON (empty if never saved).

save_profileC

Store the LLM-authored taste profile JSON (favorite_genres, top_artists, mood_tendencies, language_ratio, energy_level, recent_trend, summary).

recent_tracksA

我们最近 14 天推荐过的歌(建单去重用),不是用户的听歌历史。

⚠️ 名字容易误会:想看"用户最近在听什么"要用 recent_played(service=...); 这个工具只回答"我们推过哪些歌",换了名字叫 recent_recommended_tracks。

create_qq_playlistA

Create a real QQ Music playlist.

songs_json: {"playlist_name":"清晨慢摇","songs":[{"name":"歌名","artist":"歌手"}]} count: how many songs to add (default 20) playlist_name: explicit name from the user; leave empty to auto-name date: YYYYMMDD (default today) prompt: original user request, used to decide the name avoid_days: skip songs recommended in the last N days (default 7; 0 = no dedup) Returns {"ok","playlist_name","playlist_id","added","failed","reused_recent", "name_source"}. The name has NO date prefix here (only create_daily_playlist adds one), and it is capped at 20 characters.

If the result has need_login=true, this platform is not logged in yet: show the methods list to the user, let them pick ONE, then retry.

create_ncm_playlistC

Create a real Netease Cloud Music playlist.

Same arguments and same contract as create_qq_playlist; songs are resolved through Netease cloud search, then added to a new playlist.

create_kugou_playlistC

Create a real Kugou Music playlist.

Same arguments and same contract as create_qq_playlist; songs are resolved through Kugou search, then added to a new playlist.

qq_recentA

⚠️ 名字误导:与 QQ 平台无关,返回的也不是听歌历史。

它是 recent_recommended_tracks 的旧名字(我们最近 14 天推荐过的歌,用于去重), 保留只为兼容老提示词。想要"用户最近听过的歌"用 recent_played(service=...)。

daily_recommendationsA

Today's platform recommendations (the raw material for a daily playlist).

service: qq_music | netease | kugou QQ: 雷达推荐 + 猜你喜欢 + 推荐歌单;Netease: 每日推荐 + 推荐歌单; 酷狗: 每日推荐(未登录也能拉)。 Returns {"ok","recommended","sources","songs":[{"name","artist"}],"diagnostics"}.

create_daily_playlistA

生成「今日歌单」:全平台候选池 -> 同一份歌单,多平台各建一份。

候选池 = 所有平台的「今日推荐」+「全部收藏」去重(推荐优先), 自动避开最近 avoid_days 天推过的歌;然后在每一个已登录的平台各建一份同名歌单, 每首歌在目标平台现场搜索,找不到就跳过(记在该平台的 failed 里)。

services: 平台列表,如 ["qq_music","netease","kugou"];留空 = 全部平台。 service: 单平台写法(等价于 services=[xxx])。 count: 要建多少首,随便填(默认 40,想要 100 首就传 100;池子不够时有多少给多少)。 include: 点名想听的歌,逗号/分号/换行分隔,写成「歌名 - 歌手」,例如 "晴天 - 周杰伦, 海阔天空 - Beyond"。点名的歌一定排在最前面。 avoid_days: 避开最近几天推过的歌(默认 7;给 0 = 完全不看去重池)。 playlist_name: 指定歌单名(推荐:先调 suggest_playlist_names 挑一个, 或你自己起 —— 名字是给用户看的,你起得比内置规则好)。 留空则自动 "-<主题>",总长 ≤20 字(主题 ≤11 字)。 prompt: 用户的原始请求。话里带心情/场景(「今天心情不好」)、歌手名或年代 (「邓紫棋2020年以前的歌」)就贴着它起名;什么都没说就随机抽素材 (天气/时段/主题池),不做任何"雨天一定叫雨天窗边"的硬绑定。 with_weather: 天气是否参与命名(默认 true;可选项,取不到不影响生成)。 天气默认按出口 IP 定位,在服务器上会是机房所在地;想让天气贴合本城, 让用户设环境变量 MUSIC_WEATHER_CITY=城市名。 返回 {"ok","playlist_name","theme","name_source","name_budget","recent_names", "avoid_days","count","weather","weather_hint","pool_size","pool_sources", "results":[{platform,...}]}。 name_source 说明名字怎么来的(explicit/mood/artist/year/artist+year/random)。 某个平台没登录会在 results 里标 skipped=not_logged_in,不影响其他平台。 若返回里 weather_hint 非空,把它转述给用户(提醒设置 MUSIC_WEATHER_CITY)。

suggest_playlist_namesA

起名素材 + 候选名字:给歌单起名优先用这个工具,而不是靠内置规则。

你是 AI,起名这件事你比内置规则强,也更懂用户想要的那种"共鸣" (今天天气怎样、他说了心情不好、他点了邓紫棋)。内置规则只负责"没人管时给个 不重复的名字"。

用法:调这个工具 → 从 candidates 里挑一个,或自己起一个 → 传给 create_daily_playlist / create_qq_playlist 等的 playlist_name。 prompt: 用户原话(用来提取心情 / 歌手 / 年代等线索),可以留空。 songs_json: 你手上那份曲目(和 create_*_playlist 同一个格式),建议传—— 名字要带上歌手("邓紫棋2019以前")就得知道有哪些歌手。 不传就只能用日期/天气/心情/时段这些素材。 artists: 只要歌手名时可以用这个,逗号分隔,例如 "邓紫棋,周杰伦"。 count: 要几个候选(默认 3)。 with_weather: 是否把当天天气作为素材(默认 true,取不到不影响)。 Returns {"ok","materials","candidates","name_budget","recent_names","note"}。 name_budget: {"daily": 11, "manual": 20} —— 今日歌单会加 8 位日期前缀, 所以主题只有 11 个字可写;普通建单不带日期,最多 20 个字。 recent_names 是最近生成过的名字,用来避免"连着两天叫一样"。

liked_songsA

某个平台全部收藏(「我喜欢」/收藏的歌单,全量,不是统计摘要)。

service: qq_music | netease | kugou limit: 0 = 全部;>0 只返回前 N 首(大账号如 QQ 700+ 首时可截断) Returns {"ok","service","count","returned","sources", "songs":[{"name","artist"}],"snapshot","diagnostics","need_login"}. 同时把快照写进 state/_liked.json(与建歌单流程同一口径)。

ncm_liked_songsA

网易云收藏(等价于 liked_songs(service='netease'),保留是为了兼容老提示词)。

search_songsA

在某个平台搜歌,返回可直接喂给建单/加歌的候选。

service: qq_music | netease | kugou keyword: 歌名、或「歌名 歌手」 limit: 返回条数(默认 10,最多 50) Returns {"ok","service","count","songs":[{"name","artist","id","album"}]}。 id 是该平台的歌曲标识(QQ songid / 网易云 song id / 酷狗 hash)。 想确认"某首歌在平台上到底有没有、是哪一首"时用它。

playlist_songsA

读某个歌单的曲目(playlist_id 用 my_playlists 返回的 id)。

service: qq_music | netease | kugou limit: 0 = 全部;>0 只返回前 N 首 Returns {"ok","service","playlist_id","count","songs":[{"name","artist"}]}。 用途:把某个歌单当"种子"做推荐(先读出来,再挑歌建新单),或核对歌单内容。

add_songs_to_playlistA

给已有歌单加歌(不会新建歌单)。

service: qq_music | netease | kugou playlist_id: my_playlists 返回的 id songs: 「歌名 - 歌手」,逗号/分号/换行分隔;也接受列表 JSON。 例如 "晴天 - 周杰伦, 海阔天空 - Beyond" count: 最多加几首(0 = 全部) Returns {"ok","service","playlist_id","added","matched","failed"}。 每首歌在目标平台现场搜索,找不到就跳过(记进 failed),不会塞错歌。

recent_playedA

某个平台你自己最近听过的歌(听歌排行),不是我们推荐过的歌。

service: qq_music | netease | kugou(QQ 暂不支持,会返回 supported=false) limit: 取多少首(默认 50) Returns {"ok","service","count","songs":[{"name","artist"}],"details", "diagnostics"};details 里带 play_count(网易云)/ played_at(酷狗)。 用途:拿它当"种子"——先看用户最近在听什么,再据此建一张新歌单。

recent_recommended_tracksA

我们最近 14 天推荐过的歌(去重用),不是用户的听歌历史。

想看"用户最近在听什么"用 recent_played(service=...)。

delete_playlistA

删除一个自建歌单(不可逆)。

playlist_id 用 my_playlists 返回的 id(三平台已统一:QQ 的 dirid、 网易云的 id、酷狗的 listid 都放在这个字段里)。 必须传 confirm=True 才会真的执行;先不带 confirm 调用可查看歌单名做二次确认。

my_playlistsB

List my created playlists on a platform.

service: qq_music | netease | kugou Returns {"ok","service","count","playlists":[{id,name,track_count}],"diagnostics"}.

Prompts

Interactive templates invoked by user choice

NameDescription

No prompts

Resources

Contextual data attached and managed by the client

NameDescription

No resources

TDQS

B3.1/5.0

Scored across 28 tools

Disambiguation2/5

The set contains genuine duplicates and misleading names: ncm_liked_songs aliases liked_songs, while recent_tracks, qq_recent and recent_recommended_tracks all return the same 'recently recommended' data, and qq_recent sounds platform-specific but is not. The three per-platform create_*_playlist tools overlap heavily with create_daily_playlist (and with each other), so an agent must read long descriptions to decide which creator to call, and users can easily pick the wrong 'recent' tool.

Naming Consistency3/5

Everything is snake_case, which is good, but the conventions are mixed: verb_noun (create_qq_playlist, search_songs, delete_playlist), noun_only (liked_songs, my_playlists, credential_status) and inverted verb (login_start, login_poll). Platform prefixes are also inconsistent — create_ncm_playlist uses 'ncm' while every other tool uses 'netease', and 'qq_recent' implies a platform scope it does not have.

Tool Count2/5

28 tools is above the comfortable range, and the bloat is not from domain breadth but from redundancy: at least three deprecated compatibility aliases plus three near-identical playlist creators. Removing the aliases and parameterizing playlist creation by service would cut the surface to a lean ~22.

Completeness3/5

Login, credential lifecycle, taste profile, discovery and playlist create/list/read/add/delete are all covered. However, playlist management is missing obvious operations: there is no way to remove songs from a playlist, rename a playlist, or reorder tracks, so a wrongly added song is a dead end short of deleting the whole playlist.

Maintenance

ActivityMaintained
ResponsivenessNo recent community issues