This MCP server enables interaction with the Suno API for generating music through a Model Context Protocol interface. It supports custom mode with lyrics, style, and title, as well as inspiration mode with descriptions, and even continues existing song fragments.
Clone the repository:
git clone <your-repository-url>
cd <repository-directory>
Install dependencies:
npm install
# or
yarn install
Create a configuration file:
config.env
in the project root directorySunoKey=sk_YOUR_SUNO_API_KEY_HERE
Start the MCP server by running:
npm start
The server communicates with compatible MCP clients through standard input/output.
To use this server with an MCP client, add a server entry in your client's configuration. Here's an example configuration:
{
"YOUR_UNIQUE_SERVER_ID": {
"name": "Suno-MCP",
"type": "stdio",
"description": "AI Music Generation",
"isActive": true,
"command": "node",
"args": [
"<path-to-your-project>/MCP-Suno/build/index.js"
],
"cwd": "<path-to-your-project>/MCP-Suno"
}
}
Important settings:
YOUR_UNIQUE_SERVER_ID
with your client's identifierargs
to point to the compiled index.js
filecwd
to your project's root directoryThe server provides the generate_music_suno
tool with several options:
Generate a song with your own lyrics, style, and title:
{
"type": "call_tool",
"params": {
"name": "generate_music_suno",
"arguments": {
"prompt": "[Verse 1]\nUnder the starry sky...\n[Chorus]\nMoonlight dancing...",
"tags": "acoustic, folk, pop",
"title": "Starry Night Serenade",
"mv": "chirp-v4"
}
}
}
Generate a song based on a description:
{
"type": "call_tool",
"params": {
"name": "generate_music_suno",
"arguments": {
"gpt_description_prompt": "A lofi chill beat for late night coding sessions",
"mv": "chirp-v3-5"
}
}
}
Continue generating from an existing song fragment:
{
"type": "call_tool",
"params": {
"name": "generate_music_suno",
"arguments": {
"task_id": "your_previous_task_id_here",
"continue_at": 60,
"continue_clip_id": "your_previous_clip_id_here",
"mv": "chirp-v4"
}
}
}
The generate_music_suno
tool accepts these parameters:
prompt
(string): Lyrics content (required for custom mode)tags
(string): Comma-separated music style tags (required for custom mode)title
(string): Song title (required for custom mode)mv
(string, optional): Model version - "chirp-v3-0"
, "chirp-v3-5"
, or "chirp-v4"
(default: "chirp-v4"
)make_instrumental
(boolean, optional): Generate instrumental music only (default: false
)gpt_description_prompt
(string, optional): Description for inspiration modetask_id
(string, optional): Previous song's task ID for continuationcontinue_at
(number, optional): Time point (seconds) to continue fromcontinue_clip_id
(string, optional): Clip ID to continueThe server will return an audio URL when processing is complete, which may take a few minutes as it polls for task completion.
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.