Back to MCP directory
publicPublicdnsLocal runtime

QQ Music

一个基于MCP协议的QQ音乐搜索测试服务器

article

README

🚀 MCP QQ音乐测试服务器

这是一个借助MCP(模块化控制协议)实现QQ音乐搜索功能的测试服务器。您可以使用关键词进行音乐曲目搜索,服务器会返回相关歌曲信息。此示例仅用于测试和学习,音乐检索采用的是qqmusic-api-python

✨ 主要特性

  • 支持MCP使用关键词搜索音乐曲目

📦 安装指南

环境要求

  • 已安装uv
  • Python 3.13

安装步骤

  1. 克隆此仓库
    git clone https://github.com/Samge0/mcp-qqmusic-test-server.git
    
  2. 安装依赖:
    uv sync
    

💻 使用示例

配置mcp

{
  "mcpServers": {
    "mcp-qqmusic-test-server": {
        "command": "uv",
        "args": [
            "--directory",
            "{put your local dir here}/mcp-qqmusic-test-server",
            "run",
            "main.py"
        ]
    }
  }
}

image

image

测试搜索音乐

使用关键词搜索音乐曲目>>

函数: search_music

参数:

  • keyword (字符串,必需):搜索关键词或短语
  • page (整数,可选):分页页码(默认值:1)
  • num (整数,可选):返回结果的最大数量(默认值:20)

返回值: 返回包含以下属性的对象数组:

  • id:歌曲ID
  • mid:音乐ID
  • name:歌曲名称
  • pmid:播放音乐ID
  • subtitle:歌曲副标题
  • time_public:发布时间
  • title:歌曲标题

示例响应:

[
  {
    "id": "123456",
    "mid": "001Qu4I30eVFYb",
    "name": "七里香",
    "pmid": "",
    "subtitle": "",
    "time_public": "2004-08-03",
    "title": "七里香"
  }
]
help

Runtime guide

cloud

Hosted runtime

Hosted servers run from a provider-managed environment. You usually connect the MCP client to the hosted endpoint or follow the provider's authorization flow, without keeping a local process alive

  1. Open provider connection page
  2. Authorize or copy endpoint
  3. Connect from your MCP client
terminal

Local runtime / other methods

Local servers run on your own machine or infrastructure. You normally copy the server_config into your MCP client, install the required package, and provide env variables from env_schema when needed

  1. Copy server_config
  2. Install required package
  3. Fill env variables and restart client