QQ Music MCP server

Provides a bridge to QQ Music API for searching, playing, and managing music playlists through natural language interactions without dealing with underlying API complexities.
Back to servers
Provider
Samge0
Release date
Mar 24, 2025
Language
Python
Stats
3 stars

The MCP QQ Music Test Server provides music search functionality through the Modular Control Protocol (MCP). This server allows you to search for music tracks using keywords and retrieve relevant song information, leveraging the qqmusic-api-python library for music retrieval.

Requirements

  • uv package manager
  • Python 3.13

Installation

To set up the MCP QQ Music Test Server:

  1. Clone the repository:

    git clone https://github.com/Samge0/mcp-qqmusic-test-server.git
    
  2. Install dependencies:

    uv sync
    

Configuration and Usage

Setting Up MCP Configuration

Configure the MCP server by adding the following JSON configuration:

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

Make sure to replace {put your local dir here} with the actual path to your cloned repository.

Searching for Music

You can search for music tracks using the search_music function.

Parameters:

  • keyword (string, required): Search keyword or phrase
  • page (integer, optional): Page number for pagination (default: 1)
  • num (integer, optional): Maximum number of results to return (default: 20)

Return Value:

The function returns an array of objects with the following properties:

  • id: Song ID
  • mid: Music ID
  • name: Song name
  • pmid: Play music ID
  • subtitle: Song subtitle
  • time_public: Release date
  • title: Song title

Example Response:

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

How to add this MCP server to Cursor

There are two ways to add an MCP server to Cursor. The most common way is to add the server globally in the ~/.cursor/mcp.json file so that it is available in all of your projects.

If you only need the server in a single project, you can add it to the project instead by creating or adding it to the .cursor/mcp.json file.

Adding an MCP server to Cursor globally

To add a global MCP server go to Cursor Settings > MCP and click "Add new global MCP server".

When you click that button the ~/.cursor/mcp.json file will be opened and you can add your server like this:

{
    "mcpServers": {
        "cursor-rules-mcp": {
            "command": "npx",
            "args": [
                "-y",
                "cursor-rules-mcp"
            ]
        }
    }
}

Adding an MCP server to a project

To add an MCP server to a project you can create a new .cursor/mcp.json file or add it to the existing one. This will look exactly the same as the global MCP server example above.

How to use the MCP server

Once the server is installed, you might need to head back to Settings > MCP and click the refresh button.

The Cursor agent will then be able to see the available tools the added MCP server has available and will call them when it needs to.

You can also explictly ask the agent to use the tool by mentioning the tool name and describing what the function does.

Want to 10x your AI skills?

Get a free account and learn to code + market your apps using AI (with or without vibes!).

Nah, maybe later