xiaozhi-mcp-music
Server Configuration
Describes the environment variables required to run the server.
| Name | Required | Description | Default |
|---|---|---|---|
| LOCAL_PLAYER | No | 本地播放器(小智硬件播放不需要;仅电脑本地调试用),可选 mpv 或 vlc | none |
| MCP_ENDPOINT | Yes | 小智控制台 -> 智能体 -> 配置角色页面,复制的专属 MCP 接入点 | |
| MUSIC_SOURCES | No | 音源开关(逗号分隔,全部可用),例如 kuwo,netease,migu,kugou | |
| AUTO_PLAY_LOCAL | No | 是否自动本地播放,默认 flase | false |
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
| Capability | Details |
|---|---|
| tools | {
"listChanged": false
} |
| resources | {
"subscribe": false,
"listChanged": false
} |
Tools
Functions exposed to the LLM to take actions
| Name | Description |
|---|---|
| search_songA | 在免费音乐源中搜索歌曲。当用户要求找歌、点歌、搜索歌曲或询问某首歌是否存在时使用。支持按歌名、歌手名或“歌名 歌手”搜索,返回歌曲列表(含音源、歌名、歌手、专辑、时长)。 |
| play_songA | 播放歌曲。用户说“播放xxx”“来一首xxx”“放点xxx”时使用。传入歌名/歌手后会自动搜索并解析可播放地址;也可传入 search_song 返回的 song_id 和 source 精确播放。返回内容包含文本信息和 ResourceLink 音频资源(可通过 resource://read_from_http 分页读取后播放)。 |
| get_play_urlA | 解析歌曲的直链播放地址。当其他工具需要具体音频 URL 时使用。参数与 play_song 相同,只返回地址不播放。 |
| list_sourcesA | 列出当前可用的免费音乐源及健康状态。 |
| local_player_controlA | 控制本机媒体播放器(mpv/vlc)播放/停止,仅当 LOCAL_PLAYER 配置启用时有效。用于电脑端本地播放场景;小智硬件播放走 play_song 的音频资源,不需要此工具。 |
Prompts
Interactive templates invoked by user choice
| Name | Description |
|---|---|
No prompts | |
Resources
Contextual data attached and managed by the client
| Name | Description |
|---|---|
| 音频流代理 | 通过 HTTP Range 分页读取远程音频。arguments: {"url": "音频地址", "start": 0, "end": 102400};到达末尾返回 base64 编码的 [DONE]。 |
TDQS
Scored across 5 tools
Each tool has a generally clear role: listing sources, searching, playing, getting a URL, and controlling the local player. The main overlap is between play_song and get_play_url, but their descriptions distinguish playback from URL-only retrieval well.
Most names follow a clear verb_noun pattern: list_sources, search_song, play_song, get_play_url. local_player_control is the outlier because it is a noun phrase rather than a verb-led action, but the overall style is still readable and consistent.
Five tools is a well-scoped size for a music-focused MCP server. Each tool covers a distinct user need without redundancy or unnecessary bloat.
The core music workflow is covered: discover sources, search, play, get direct URL, and control local playback. Minor gaps like pause/resume for the hardware path or playlist management exist, but they are not essential for the stated purpose.