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.
To set up the MCP QQ Music Test Server:
Clone the repository:
git clone https://github.com/Samge0/mcp-qqmusic-test-server.git
Install dependencies:
uv sync
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.
You can search for music tracks using the search_music
function.
keyword
(string, required): Search keyword or phrasepage
(integer, optional): Page number for pagination (default: 1)num
(integer, optional): Maximum number of results to return (default: 20)The function returns an array of objects with the following properties:
id
: Song IDmid
: Music IDname
: Song namepmid
: Play music IDsubtitle
: Song subtitletime_public
: Release datetitle
: Song title[
{
"id": "123456",
"mid": "001Qu4I30eVFYb",
"name": "七里香",
"pmid": "",
"subtitle": "",
"time_public": "2004-08-03",
"title": "七里香"
}
]
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.
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"
]
}
}
}
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.
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.