Suno-MCP
The Suno-MCP server allows you to generate music using the Suno API via the Model Context Protocol (MCP) with various customizable inputs:
Custom Mode: Create songs by providing lyrics (
prompt), style (tags), and title (title)Inspiration Mode: Generate music based on a descriptive prompt (
gpt_description_prompt)Continue Songs: Generate continuations of existing song fragments using
task_id,continue_at, andcontinue_clip_idModel Selection: Choose between different model versions (
chirp-v3-0,chirp-v3-5,chirp-v4)Instrumental Option: Generate instrumental music without vocals
Automatic Polling: The server handles task status polling and returns audio URLs upon completion
HTML Formatting: Results are provided in a user-friendly format with an audio player and download links
Used for configuration management, specifically loading the Suno API key from a config.env file.
Used for cloning the repository as part of the installation process.
Required as the runtime environment for the MCP server.
Used for package management and installing dependencies.
Allows interaction with the Suno API to generate music tracks in custom mode (with specified lyrics, style, and title) or inspiration mode (based on a description). Supports continuing from existing song fragments and retrieving completed audio URLs.
Offered as an alternative package manager for installing dependencies.
Click on "Install Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@Suno-MCPcreate a lofi beat for studying late at night"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
Suno 音乐生成器 MCP 服务器
这是一个基于 Model Context Protocol (MCP) 的服务器,它允许您通过调用工具来使用 Suno API 生成音乐。
✨ 特性
通过 MCP 与 Suno API 交互。
支持自定义模式(提供歌词、风格、标题)和灵感模式(提供描述)。
支持继续生成已有的歌曲片段。
自动轮询任务状态并在完成后返回音频 URL。
可配置的 API Key 和模型版本。
Related MCP server: StreamerSongList MCP Server
🚀 开始使用
📋 先决条件
⚙️ 安装
克隆此仓库 (如果您还没有的话):
git clone <your-repository-url> cd <repository-directory>安装项目依赖:
npm install # 或者使用 yarn # yarn install
🔑 配置
在项目根目录下创建一个名为
config.env的文件。在该文件中添加您的 Suno API Key:
SunoKey=sk_YOUR_SUNO_API_KEY_HERE将
sk_YOUR_SUNO_API_KEY_HERE替换为您真实的 Suno API Key。
▶️ 运行 MCP 服务器
要启动 MCP 服务器,请在项目根目录下运行:
npm start
# 或者,如果您在 package.json 中定义了 "dev" 脚本并希望使用 ts-node-dev 进行热重载开发:
# npm run dev
# 或者直接运行编译后的 JavaScript 文件:
# node build/index.js服务器启动后,它将通过标准输入/输出 (stdio) 与兼容的 MCP 客户端进行通信。
🔌 在 MCP 客户端中部署
要在您的 MCP 客户端(例如一个支持 MCP 的 AI 助手或开发工具)中使用此服务器,您通常需要在客户端的配置文件中添加一个服务器条目。以下是一个示例配置,请根据您的客户端具体要求进行调整:
{
"YOUR_UNIQUE_SERVER_ID": { // 替换为您客户端生成的唯一 ID
"name": "Suno-MCP", // 您为此服务器指定的名称
"type": "stdio", // 通信类型,对于此服务器是 "stdio"
"description": "让AI唱歌", // 服务器的简短描述
"isActive": true, // 是否激活此服务器
"command": "node", // 用于启动服务器的命令
"args": [
"<path-to-your-project>/MCP-Suno/build/index.js" // 指向编译后的 index.js 文件的绝对或相对路径
],
"env": {
// 环境变量可以传递给服务器进程
// 如果您在此处设置了 SunoKey,它可能会覆盖 config.env 中的值
// "SunoKey": "sk_YOUR_SUNO_API_KEY_FROM_CLIENT_CONFIG"
},
"cwd": "<path-to-your-project>/MCP-Suno" // 可选:设置服务器的工作目录,通常是项目根目录
}
}重要提示:
YOUR_UNIQUE_SERVER_ID: 这通常由您的 MCP 客户端自动生成或要求您提供一个唯一的标识符。command: 对于 Node.js 项目,通常是node。args: 数组中的第一个参数应该是到编译后的build/index.js文件的路径。请确保将<path-to-your-project>替换为您的实际项目路径。env: 您可以在这里设置环境变量。服务器脚本 (index.ts) 会尝试从项目根目录下的config.env文件加载SunoKey。如果客户端配置中的env也设置了SunoKey,其行为(是否覆盖)可能取决于 Node.js 处理环境变量的优先级和dotenv包的配置。为了确保SunoKey被正确加载,建议主要通过项目根目录下的config.env文件进行配置,如“🔑 配置”部分所述。cwd: 设置工作目录为项目根目录(包含build文件夹和config.env的目录)通常是个好主意,以确保相对路径(如../config.env相对于build/index.js)能正确解析。
请查阅您的 MCP 客户端文档以获取有关如何添加和配置 MCP 服务器的详细说明。
🛠️ 工具说明
此 MCP 服务器提供以下工具:
generate_music_suno
使用 Suno API 生成歌曲。
描述:
Generates a song using the Suno API. Provide lyrics, style, and title for custom mode, or a description for inspiration mode. Returns the audio URL upon completion. Polling for results may take a few minutes.
When returning an audio URL, please use the following HTML format for user convenience:
```html
<audio controls>
<source src="YOUR_AUDIO_URL_HERE" type="audio/mpeg">
</audio>
<br>
<a href="YOUR_AUDIO_URL_HERE" download="SONG_TITLE.mp3">
点击这里下载喵!
</a>
**输入参数 (`inputSchema`):**
* `prompt` (string): 歌词内容。自定义模式下必需。示例: `'[Verse 1]\nUnder the starry sky...'`
* `tags` (string): 音乐风格标签,逗号分隔。自定义模式下必需。示例: `'acoustic, folk, pop'`
* `title` (string): 歌曲标题。自定义模式下必需。示例: `'Starry Night Serenade'`
* `mv` (string, 可选): 模型版本。可选值: `"chirp-v3-0"`, `"chirp-v3-5"`, `"chirp-v4"`。默认为 `'chirp-v4'`。
* `make_instrumental` (boolean, 可选): 是否生成纯音乐。默认为 `false`。
* `gpt_description_prompt` (string, 可选): 灵感模式的描述。如果提供此参数,则 `prompt`, `tags`, 和 `title` 不是用户严格要求的。示例: `'A cheerful upbeat song about a sunny day.'`
* `task_id` (string, 可选): 要继续的先前歌曲的任务 ID。如果提供,则 `continue_at` 和 `continue_clip_id` 也需要。
* `continue_at` (number, 可选): 从歌曲的哪个时间点(秒)开始继续。需要 `task_id` 和 `continue_clip_id`。
* `continue_clip_id` (string, 可选): 要继续的歌曲片段的剪辑 ID。需要 `task_id` 和 `continue_at`。
**验证逻辑:**
* 如果未提供 `gpt_description_prompt`,则 `prompt`, `tags`, 和 `title` 都是必需的。
* 如果提供了 `task_id`,则 `continue_at` 和 `continue_clip_id` 也必须提供。
**输出:**
成功时,返回一个包含音频 URL 的文本内容。如果发生错误,将返回错误信息。
## 💡 示例 MCP 请求
**生成自定义歌曲:**
```json
{
"type": "call_tool",
"params": {
"name": "generate_music_suno",
"arguments": {
"prompt": "[Verse 1]\nIn the digital realm, where code streams flow,\nA kitty coder, with a vibrant glow.\n[Chorus]\nMeow, meow, MCP, oh so grand,\nGenerating tunes across the land!",
"tags": "electronic, upbeat, synthwave",
"title": "MCP Kitty's Anthem",
"mv": "chirp-v4"
}
}
}使用灵感模式生成歌曲:
{
"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"
}
}
}继续生成歌曲:
{
"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"
// prompt, tags, title might be needed by Suno API for continuation,
// or it might infer from the original task.
// Check Suno API documentation for specifics on continuation.
}
}
}🤝 贡献
欢迎提交 Pull Request 或 Issue 来改进此项目!
📄 许可证
(根据您的项目选择一个许可证,例如 MIT, Apache 2.0 等) 例如: This project is licensed under the MIT License.
Available Tools
1 toolgenerate_music_sunoA
Generates a song using the Suno API. Provide lyrics, style, and title for custom mode, or a description for inspiration mode. Returns the audio URL upon completion. Polling for results may take a few minutes.
When returning an audio URL, please use the following HTML format for user convenience:
<audio controls>
<source src="YOUR_AUDIO_URL_HERE" type="audio/mpeg">
</audio>
<br>
<a href="YOUR_AUDIO_URL_HERE" download="SONG_TITLE.mp3">
点击这里下载喵!
</a>| Name | Required | Description | Default |
|---|---|---|---|
| continue_at | No | Optional. Time in seconds from which to continue the song. Requires 'task_id' and 'continue_clip_id'. | |
| continue_clip_id | No | Optional. Clip ID of the song part to continue. Requires 'task_id' and 'continue_at'. | |
| gpt_description_prompt | No | Optional. Description for inspiration mode. If provided, 'prompt', 'tags', and 'title' are not strictly required by the user but might be used by the API. Example: 'A cheerful upbeat song about a sunny day.' | |
| make_instrumental | No | Optional. Whether to generate instrumental music. Defaults to false. | |
| mv | No | Optional. Model version. Defaults to 'chirp-v4'. | |
| prompt | No | Lyrics content. Required for custom mode. Example: '[Verse 1]\nUnder the starry sky...' | |
| tags | No | Music style tags, comma-separated. Required for custom mode. Example: 'acoustic, folk, pop' | |
| task_id | No | Optional. Task ID of a previous song to continue. If provided, 'continue_at' and 'continue_clip_id' are also required. | |
| title | No | Song title. Required for custom mode. Example: 'Starry Night Serenade' |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
With no annotations provided, the description carries the full burden. It discloses key behavioral traits: the tool returns an audio URL, polling may take minutes, and it includes a specific HTML format for user convenience. However, it doesn't cover potential errors, rate limits, or authentication needs, leaving some gaps.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is appropriately sized and front-loaded with the core purpose, followed by usage notes and output details. The HTML format section is lengthy but serves a practical purpose. Some sentences could be more concise, but overall it's efficient with minimal waste.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
Given the complexity (9 parameters, no output schema, no annotations), the description does a good job covering the tool's purpose, modes, and output handling. It lacks details on error cases or advanced usage scenarios, but for a generative tool with rich schema coverage, it's reasonably complete.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema description coverage is 100%, so the schema already documents all 9 parameters thoroughly. The description adds minimal value by mentioning lyrics, style, and title for custom mode and description for inspiration mode, but doesn't provide additional syntax or format details beyond what the schema provides. Baseline 3 is appropriate when schema does the heavy lifting.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description clearly states the tool 'Generates a song using the Suno API' with specific verbs ('generates') and resources ('song'), and mentions two modes (custom and inspiration). However, it doesn't distinguish from any siblings since none exist, so it can't achieve a perfect 5 for sibling differentiation.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The description implies usage by mentioning two modes (custom vs inspiration) and their required inputs, but it doesn't explicitly state when to choose one mode over the other or provide broader contextual guidance. No alternatives are mentioned, but since there are no sibling tools, this is less critical.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
TDQS
With only one tool, there is no possibility of ambiguity or overlap between tools. The tool 'generate_music_suno' has a singular, well-defined purpose of generating music via the Suno API.
The single tool name 'generate_music_suno' follows a clear verb_noun pattern, and there are no other tools to cause inconsistency. The naming is straightforward and descriptive.
A single tool is too few for a server named 'Suno-MCP', which suggests a broader music generation domain. This minimal toolset feels thin and may limit functionality, as agents might expect additional operations like listing generated songs or managing settings.
The tool surface is severely incomplete for a music generation server. While 'generate_music_suno' handles creation, there are obvious gaps such as retrieving, updating, or deleting generated songs, and no tools for managing styles or user preferences, which could hinder agent workflows.
Maintenance
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
Related MCP Connectors
MCP server for Suno AI music generation, lyrics, and covers
A comprehensive Model Context Protocol (MCP) server that enables AI assistants to interact with yo…
Generate Suno AI music (v5.5) from any MCP client. Async; billed only on success.
A Model Context Protocol server for Wix AI tools
Related MCP Servers
- AlicenseNot gradedqualityFmaintenanceA Model Context Protocol server that enables AI assistants like Claude to generate lyrics, songs, and background music through Mureka's APIs.112MIT
- AlicenseAqualityFmaintenanceA Model Context Protocol server that enables AI assistants like Claude to manage song requests, monitor queues, and interact with streaming platforms' song request systems.6192MIT
- AlicenseNot gradedqualityAmaintenanceAn MCP server that enables local AI models to automatically generate lyrics and style prompts, then submit songs to Suno via browser automation.MIT
- AlicenseAqualityBmaintenanceAn MCP server that generates music using your Suno account, enabling credit checking, song generation, and MP3 downloads without third-party APIs.7MIT
Appeared in Searches
Latest Blog Posts
- Who's Calling? MCP Hosts Are an Identity Blind Spot (And the Spec Knows It)By Om-Shree-0709 on .mcpAgent IdentityOAuth 2.1
- Your AI Chatbot Just Exposed Your CEO's Salary to an InternBy Om-Shree-0709 on .Agent IdentityMCP SecurityOAuth Delegation
- Why MCP Servers Need Execution Sandboxing (And Why Your Current Stack Isn't Enough)By Om-Shree-0709 on .Agentic AiPrompt InjectionWebAssembly
MCP directory API
We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/lioensky/MCP-Suno'
If you have feedback or need assistance with the MCP directory API, please join our Discord server