Integrations
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.
Suno 音乐生成器 MCP 服务器
这是一个基于 Model Context Protocol (MCP) 的服务器,它允许您通过调用工具来使用 Suno API 生成音乐。
✨ 特性
- 通过 MCP 与 Suno API 交互。
- 支持自定义模式(提供歌词、风格、标题)和灵感模式(提供描述)。
- 支持继续生成已有的歌曲片段。
- 自动轮询任务状态并在完成后返回音频 URL。
- 可配置的 API Key 和模型版本。
🚀 开始使用
📋 先决条件
⚙️ 安装
- 克隆此仓库 (如果您还没有的话):Copy
- 安装项目依赖:Copy
🔑 配置
- 在项目根目录下创建一个名为
config.env
的文件。 - 在该文件中添加您的 Suno API Key:将Copy
sk_YOUR_SUNO_API_KEY_HERE
替换为您真实的 Suno API Key。
▶️ 运行 MCP 服务器
要启动 MCP 服务器,请在项目根目录下运行:
服务器启动后,它将通过标准输入/输出 (stdio) 与兼容的 MCP 客户端进行通信。
🔌 在 MCP 客户端中部署
要在您的 MCP 客户端(例如一个支持 MCP 的 AI 助手或开发工具)中使用此服务器,您通常需要在客户端的配置文件中添加一个服务器条目。以下是一个示例配置,请根据您的客户端具体要求进行调整:
重要提示:
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 生成歌曲。
描述:
使用灵感模式生成歌曲:
继续生成歌曲:
🤝 贡献
欢迎提交 Pull Request 或 Issue 来改进此项目!
📄 许可证
(根据您的项目选择一个许可证,例如 MIT, Apache 2.0 等) 例如: This project is licensed under the MIT License.
You must be authenticated.
Tools
A Model Context Protocol server that allows AI assistants to generate music through the Suno API, supporting custom lyrics and style inputs or inspiration-based creation.
Related MCP Servers
- -securityAlicense-qualityA Model Context Protocol server that allows AI assistants like Claude and Cursor to create music and control Sonic Pi programmatically through OSC messages.Last updated -JavaScriptMIT License
- -securityFlicense-qualityA Model Context Protocol server that enables AI assistants like Claude to interact with Spotify, allowing them to search for tracks, control playback, and manage playlists.Last updated -TypeScript
- AsecurityAlicenseAqualityA Model Context Protocol server that enables real-time interaction with Ableton Live, allowing AI assistants to control song creation, track management, clip operations, and audio recording workflows.Last updated -2309TypeScriptMIT License
- AsecurityAlicenseAqualityA Model Context Protocol server that enables AI assistants to generate images, text, and audio through the Pollinations APIs without requiring authentication.Last updated -73254JavaScriptMIT License