OpenCode Integration with Suno MCP

📘 OverviewOpenCode MCP Overview →

You are writing a product release log in the terminal, and suddenly think: it would be even more complete if there were a 30-second BGM accompanying the video version of the release notes. After connecting to the Suno MCP Server, OpenCode can directly write songs on-site based on the emotions, styles, and rhythms you describe, without switching to a browser or needing a separate music generation account.

Suno MCP is suitable for generating release soundtracks, product demo BGMs, demo video background music, or even complete songs with lyrics in OpenCode.

Obtain API Token

Before using the Suno MCP Server, you need to prepare an Ace Data Cloud API Token. OpenCode and Claude Code share a set of Tokens, and the acquisition process is the same:

  1. Open the Ace Data Cloud Console - Application List to obtain your API Token for backup.
  2. If you are not logged in or registered, you will be automatically redirected to the login page; after logging in or registering, you will automatically return to the current page.
  3. The first application will have a free quota available, allowing you to experience the Suno MCP service for free.

One Token can be used with all 11 MCP Servers provided by AceData Cloud, without needing to apply separately for Suno. The documentation and screenshots suggest displaying only in a de-sensitized form, such as 3b78cc40dd3b43db806a4300...., and do not paste the full Token into public repositories, Issues, screenshots, or chat records.

Want to use Claude Desktop / Claude.ai web version for direct OAuth one-click authorization? Please see the Suno MCP Claude.ai / Desktop Tutorial.

Configure OpenCode

OpenCode describes all MCP Servers in a single opencode.json file, which can be placed in two locations; choose one based on the "scope" below. The field structure in both locations is exactly the same, with the only difference being priority.

It is strongly recommended to first write the Token into an environment variable:

export ACEDATACLOUD_API_KEY="replace with your real Token"

Then reference it in opencode.json using the {env:ACEDATACLOUD_API_KEY} placeholder to avoid writing the real Token into the file.

Global: Shared by all projects

File location: ~/.config/opencode/opencode.json, suitable for "my own machine, configured once, usable by all projects."

{
  "$schema": "https://opencode.ai/config.json",
  "mcp": {
    "suno": {
      "type": "remote",
      "url": "https://suno.mcp.acedata.cloud/mcp",
      "enabled": true,
      "oauth": false,
      "headers": { "Authorization": "Bearer {env:ACEDATACLOUD_API_KEY}" }
    }
  }
}

⚠️ "oauth": false cannot be omitted. AceData's MCP Server uses Bearer Token authentication and does not go through the OAuth process; OpenCode will automatically redirect 401 as an OAuth challenge, causing opencode mcp list to show SSE error: Non-200 status code (401). Explicitly declaring "oauth": false allows OpenCode to call directly with Authorization: Bearer ..., and opencode mcp debug suno will also echo OAuth explicitly disabled, indicating it is effective.

Project-level: Effective only for the current project

File location: opencode.json in the current project root directory, which will override the global configuration. Suitable for team sharing, single repository customization, or temporarily enabling a specific MCP in a project.

{
  "$schema": "https://opencode.ai/config.json",
  "mcp": {
    "suno": {
      "type": "remote",
      "url": "https://suno.mcp.acedata.cloud/mcp",
      "enabled": true,
      "oauth": false,
      "headers": { "Authorization": "Bearer {env:ACEDATACLOUD_API_KEY}" }
    }
  }
}

If the project-level opencode.json will be committed to Git, please ensure to use the {env:ACEDATACLOUD_API_KEY} placeholder instead of the real Token to avoid leakage.

💡 If the .env in Shell is not explicitly exported, you need to use set -a && source .env && set +a to pass the variables to the OpenCode process; otherwise, opencode debug config will show "Authorization": "Bearer " (placeholder not resolved).

Actual Running Results

Below is the de-sensitized output after actual execution in an isolated temporary directory in OpenCode 1.15.13. The command used the real AceData Cloud Token, and the Token in the output has been replaced with 357265014ad145fc8ab2...., and the temporary configuration has been deleted.

$ opencode --version
1.15.13

$ opencode mcp list

┌  MCP Servers
│
●  ✓ suno connected
│      https://suno.mcp.acedata.cloud/mcp
│
└  1 server(s)

Seeing ✓ suno connected indicates that the Suno MCP has been successfully integrated. If it shows or unauthorized, please check whether ACEDATACLOUD_API_KEY is set, whether the Token is copied completely, and whether the Authorization prefix is Bearer (pay attention to case and spaces).

To debug the connection details of a specific MCP:

opencode mcp debug suno

After a successful handshake, OpenCode's INFO log will output service=mcp key=suno transport=StreamableHTTP connected and service=mcp key=suno toolCount=35 (tested with 35 tools), indicating that Suno MCP is ready to be called by the model.

🤖 Model Selection Testing Suggestions: To truly allow the model to actively call Suno MCP in OpenCode, please prioritize using OpenAI series models (such as acedatacloud/gpt-5-mini, acedatacloud/gpt-5). When the Claude series models on AceData are exposed through the OpenAI compatible interface, tool calls often return Improperly formed request (tested: acedatacloud/claude-haiku-4-5-20251001, acedatacloud/claude-sonnet-4-6 reported this error when mounting multiple MCPs). Claude models can be used normally when only doing dialogue without calling tools.

Typical Scenarios

After configuration is complete, you can directly call using natural language in the OpenCode session without switching to /mcp:

Write a song in one sentence

Write a cheerful lofi hip-hop song, about 2 minutes long, without lyrics, for use as background music for a programming video.

Custom lyrics + style

Sing these lyrics in indie rock style: (paste lyrics), male voice, 2 minutes 30 seconds.

Cover a generated song

Change the previous song into a jazz style cover.

Continue from the chorus

The chorus is good, continue for another 30 seconds from the chorus.

Tool List

The table below lists the main tools (Suno MCP Server has exposed a total of 35 tools, which can be obtained through curl -X POST https://suno.mcp.acedata.cloud/mcp -H 'Authorization: Bearer <token>' -H 'Accept: application/json' -H 'Content-Type: application/json' --data '{"jsonrpc":"2.0","id":1,"method":"tools/list"}' to get the complete list):

Tool Description
suno_generate_music Generate a complete song with a one-sentence description
suno_generate_custom_music Write your own lyrics, set style and vocals
suno_extend_music Continue an existing song from a certain point in time
suno_cover_music Cover in a different style
suno_mashup_music Mash up two songs into one
suno_stems_music Separate vocals and accompaniment
suno_generate_lyrics AI-generated lyrics
suno_create_persona Save vocal style