Suno MCP
Suno MCP
Sunoで音楽を生成するためのMCP(Model Context Protocol)サーバーです。
機能
楽曲生成: カスタム歌詞とスタイルタグを指定して生成
説明文から生成: Suno AIに歌詞を作成させる
完了待機: 完了を待機し、Markdown埋め込み付きのオーディオURLを取得
MP3ダウンロード: ローカルフォルダへMP3をダウンロード
トークン自動更新: 有効期限切れ時の自動更新
Related MCP server: Suno-MCP
要件
Node.js 18以上
http://localhost:9100でSunoにログイン済みの BrowserOS(または--remote-debugging-portを有効にしたChromium)。CDP_URLで上書き可能。Sunoアカウント(無料または有料)
インストール
npm installClaude Codeでの使用方法
.mcp.json に以下を追加します:
{
"suno": {
"command": "node",
"args": ["/path/to/suno-mcp/src/index.js"]
}
}ツール
ツール | 説明 |
| カスタム歌詞とスタイルで生成 |
| 説明文からAIが歌詞を作成 |
| 完了を待機し、URLとMarkdownを返す |
| 生成ステータスを確認 |
| アカウントのクレジット情報を取得 |
| 最近の楽曲リストを取得 |
| MP3をフォルダにダウンロード |
仕組み
認証
Sunoは認証にClerkを使用しており、短期間有効なJWTトークンを利用します。クライアントはCDP経由でアクティブなSunoタブ内の window.Clerk.session.getToken() を呼び出します。Clerkが内部で更新を処理するため、ページのリロードは不要です。トークンは exp クレームの5分前までキャッシュされます。
楽曲生成
直接のAPI呼び出しはhCaptchaにより失敗します。フォームセレクタをスクレイピングするのではなく、クライアントはSuno自身のReactアプリを操作します:
CDP経由でSunoタブに接続し、必要に応じて
/createに移動します。作成ボタンからReactファイバーツリーを辿り、
onCreateClick/lyrics/styles/modeをプロップスとして公開しているコンポーネント(セマンティックな生成ハンドラー)を見つけます。React互換のネイティブセッターを使用して歌詞とスタイルのテキストエリアに入力し、内部状態を更新します。
ファイバーのプロップスに新しい値が反映される(つまりReactが再レンダリングされる)まで待機します。
ボタンの座標に対してCDPの
Input.dispatchMouseEventを使用して信頼されたマウスクリックを送信します。hCaptchaはCDPで合成されたイベントを実際のユーザー操作として受け入れます(JSからonCreateClick()を呼び出すとキャプチャに拒否されます)。CDPの
Networkイベント経由で/api/generate/v2のレスポンスをキャプチャし、新しいクリップIDを返します。ネットワークイベントを見逃した場合は、/api/project/defaultをポーリングしてフォールバックします。
このアプローチはUIの再設計に対して堅牢です。クラス名やtextContentの一致、DOMレイアウトではなく、セマンティックなReactプロップス(onCreateClick, lyrics, styles)と aria-label="Create song" ボタン(どちらも変更される可能性が低い重要な要素)に依存しているためです。
例
// Generate a song
const result = await suno_generate_song({
lyrics: "[Verse]\nHello world\n\n[Chorus]\nThis is a test",
style: "indie folk, acoustic, male vocals"
});
// Wait for it to complete
const songs = await suno_wait_for_songs({
ids: result.songIds
});
// Download it
await suno_download_song({
songId: songs[0].id,
folder: "./downloads"
});既知の制限
タイトルフィールドは正常に機能しません(Suno UIの制限であり、新しい生成パスには現在組み込まれていません)。
generate_from_description(シンプルモード)は、UIモードの切り替えが見つからない場合、現在カスタムモードにフォールバックします。決定論的な動作が必要な場合はgenerate_songで歌詞とスタイルを渡してください。アクティブで表示されているSunoセッションを持つBrowserOSが必要です。信頼されたクリックを成功させるため、作成ボタンは画面上でゼロ以外のサイズである必要があります。
トークンは約1時間ごとに期限切れになります(Clerk経由で自動更新されます)。
ライセンス
MIT
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 Servers
- AlicenseAqualityDmaintenanceEnables AI-powered music generation through natural language commands, supporting both inspiration mode (AI-generated lyrics and style) and custom mode (user-provided lyrics and parameters) to create songs with direct download links.43MIT
- AlicenseAqualityDmaintenanceEnables music generation through Suno AI, providing tools for account authentication, prompt-based track creation, and automatic downloading of audio files. It facilitates seamless AI music production workflows within Claude Desktop via Playwright-driven browser automation.101MIT
- AlicenseNot gradedqualityDmaintenanceEnables AI music generation via Suno AI, allowing users to generate tracks with prompts and styles, and download them as MP3.MIT
- AlicenseAqualityDmaintenanceEnables AI-powered music generation through natural language commands, supporting both inspiration and custom modes with automatic polling for async generation.4MIT
Related MCP Connectors
Generate Suno AI music (v5.5) from any MCP client. Async; billed only on success.
MCP server for Suno AI music generation, lyrics, and covers
Generate AI music via the Lacuna Music API from MCP clients like Claude Desktop & Code.
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/unforced/suno-mcp'
If you have feedback or need assistance with the MCP directory API, please join our Discord server