qq-music-mcp
Click on "Install 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., "@qq-music-mcpsearch for 周杰伦 songs"
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.
QQ Music MCP Server
一个基于 MCP (Model Context Protocol) 的 QQ 音乐 API 服务器,让大语言模型能够搜索音乐、获取歌曲信息、歌词和播放链接。
安装
# 使用 pip
pip install qq-music-mcp
# 或使用 uv
uv pip install qq-music-mcp在 Claude Desktop 中使用
编辑 Claude Desktop 配置文件:
macOS:
~/Library/Application Support/Claude/claude_desktop_config.jsonWindows:
%AppData%\Claude\claude_desktop_config.json
添加以下配置:
{
"mcpServers": {
"qq-music": {
"command": "uvx",
"args": ["qq-music-mcp"]
}
}
}或者如果使用 pip 安装:
{
"mcpServers": {
"qq-music": {
"command": "qq-music-mcp"
}
}
}然后重启 Claude Desktop。
功能
提供以下 MCP Tools:
Tool 名称 | 描述 |
| 搜索歌曲、专辑、歌单等 |
| 获取歌曲详情 |
| 获取歌曲可用音质 |
| 获取歌词 |
| 获取单首歌曲播放链接 |
| 批量获取歌曲播放链接 |
| 获取专辑详情 |
| 获取专辑歌曲列表 |
| 获取歌单详情 |
| 获取专辑封面 URL |
VIP 内容访问
如需获取 VIP 歌曲的高品质播放链接,请设置环境变量:
export QQ_MUSIC_COOKIE="your_qq_music_cookie_here"或在 Claude Desktop 配置中添加:
{
"mcpServers": {
"qq-music": {
"command": "uvx",
"args": ["qq-music-mcp"],
"env": {
"QQ_MUSIC_COOKIE": "your_cookie_here"
}
}
}
}获取 Cookie 的步骤:
打开浏览器访问 https://y.qq.com
登录你的 QQ 账号
打开开发者工具 (F12) -> Application -> Cookies
复制完整的 Cookie 字符串
音质类型说明
音质代码 | 说明 |
| AAC 格式 |
| 128kbps MP3 |
| 320kbps MP3 |
| FLAC 无损 |
| APE 无损 |
| 臻品母带 (24bit/192kHz) |
| 臻品全景声 (Dolby Atmos) |
开发
# 克隆项目
git clone https://github.com/yourusername/qq-music-mcp.git
cd qq-music-mcp
# 安装依赖
uv sync
# 运行测试
uv run mcp dev src/qq_music_api/server.py作为 Python 库使用
import asyncio
from qq_music_api import QQMusicClient
async def main():
async with QQMusicClient() as client:
# 搜索歌曲
result = await client.search("周杰伦")
print(result)
# 获取歌词
lyric = await client.get_lyric("000paPeF1SZp2I")
print(lyric)
asyncio.run(main())许可证
MIT
This server cannot be installed
Maintenance
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
Latest Blog Posts
MCP directory API
We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/wangkezun/qq-music-mcp'
If you have feedback or need assistance with the MCP directory API, please join our Discord server