Suno Music Generator MCP server

Enables AI assistants to generate custom music compositions with specified lyrics, style tags, and titles through the Suno API, delivering completed audio URLs without leaving the conversation context.
Back to servers
Provider
Roo
Release date
May 09, 2025
Stats
6 stars

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.

Installation

Prerequisites

  • Node.js (LTS version recommended)
  • npm (included with Node.js) or yarn

Setup

  1. Clone the repository:

    git clone <your-repository-url>
    cd <repository-directory>
    
  2. Install dependencies:

    npm install
    # or
    yarn install
    
  3. Create a configuration file:

    • Create a file named config.env in the project root directory
    • Add your Suno API Key:
      SunoKey=sk_YOUR_SUNO_API_KEY_HERE
      

Running the Server

Start the MCP server by running:

npm start

The server communicates with compatible MCP clients through standard input/output.

Client Integration

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:

  • Replace YOUR_UNIQUE_SERVER_ID with your client's identifier
  • Update the path in args to point to the compiled index.js file
  • Set cwd to your project's root directory

Using the Music Generation Tool

The server provides the generate_music_suno tool with several options:

Custom Mode

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"
    }
  }
}

Inspiration Mode

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 Mode

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"
    }
  }
}

Tool Parameters

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 mode
  • task_id (string, optional): Previous song's task ID for continuation
  • continue_at (number, optional): Time point (seconds) to continue from
  • continue_clip_id (string, optional): Clip ID to continue

The server will return an audio URL when processing is complete, which may take a few minutes as it polls for task completion.

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