
为 AI 代理打开 Suno API & MCP
概览
开源Suno AI API 有Chrome扩展桥-0-config auth & Automatic Captcha绕道. 由克洛德代码和派恩AI所建. 两种操作方式:(Chrome扩展——建议)和(服务器侧)。 : Suno的API依赖Clerk会话进行认证,但Clerk经常会返回空会话(会话:[]),造成401个未经授权的错误. : Suno's API 需要 hCaptcha 用于音乐生成 当一个账户的消费低于~200个入计量时. 服务器侧式方法在"Token验证失败"(422)下失败,因为它们不能提供有效的captcha符. : OpenSuno提供两种方法:- (推荐)- A Chrome扩展运行于suno.com,使API从浏览器上下文调用. 认证和封口由本地处理。 一个本地桥服务器会曝光REST API + MCP接口,通过WebSocket将请求转发到扩展.
概述(AI 翻译)
开源Suno AI API 有 Chrome 扩展桥- 0-config auth & 自动cabtcha 绕行. 由Claude Code & Paean AI所建。
两种操作模式:** Bridge Mode**(Chrome扩展-建议)和** Cookie Mode**(服务器-侧).
□为什么是开放的苏诺?
** problem 1**:Suno的API依赖办事员会话进行认证,但办事员经常会返回空会话([[T0]),造成401个未经授权的错误.
** problem 2 **:当一个账户的消费低于~200个入分时,Suno的API需要hCaptcha用于音乐生成. 服务器侧式方法在"Token验证失败"(422)下失败,因为它们不能提供有效的captcha符.
** 解决**:OpenSuno提供两种办法:
- ** Bridge Mode** (推荐)——一款Chrome扩展在suno.com上运行,使API从浏览器上下文调用. 认证和封口由本地处理。 一个本地桥服务器会曝光REST API + MCP接口,通过WebSocket将请求转发到扩展.
- ** Cookie mode ** — 从浏览器中取出 JWT 令牌(工作但需要手动令牌刷新并可能击中 Captcha 块)
□ 特性
本页由 AI 翻译,技术细节请以原文为准。
README
以下为原文 README 节选,完整内容请查看原文。
OpenSuno
Open-source Suno AI API with Chrome Extension bridge — zero-config auth & automatic captcha bypass. Built with Claude Code & Paean AI.
Two modes of operation: Bridge Mode (Chrome Extension — recommended) and Cookie Mode (server-side).
Why OpenSuno?
Problem 1: Suno’s API relies on Clerk sessions for authentication, but Clerk frequently returns empty sessions (sessions: []), causing 401 Unauthorized errors.
Problem 2: Suno’s API requires hCaptcha for music generation when an account has consumed fewer than ~200 credits. Server-side approaches fail with “Token validation failed” (422) because they can’t provide a valid captcha token.
Solution: OpenSuno offers two approaches:
- Bridge Mode (Recommended) — A Chrome extension runs on suno.com, making API calls FROM the browser context. Authentication and captcha are handled natively. A local bridge server exposes REST API + MCP interfaces, forwarding requests to the extension via WebSocket.
- Cookie Mode — Extract JWT tokens from the browser (works but requires manual token refresh and may hit captcha blocks)
Features
- Chrome Extension + Bridge Server — zero-config auth, automatic captcha bypass, no token expiry
- MCP server — use as a tool provider for Claude Desktop, Cursor, or any MCP-compatible AI agent
- Direct JWT Token authentication (Cookie Mode) — extract from browser Network tab
- All Suno model versions supported (V4 / V4.5+ / V4.5 Pro / V5)
- OpenAI-compatible
/v1/chat/completionsendpoint - Web-based cookie management UI at
/cookie - One-click Vercel deployment (Cookie Mode)
Bridge Mode (Recommended)
Bridge Mode uses a Chrome extension + local bridge server. The extension runs on your open suno.com tab, handling authentication and captcha natively. External clients (curl, AI agents) talk to the bridge server, which forwards requests to the extension via WebSocket.
Architecture
External Clients (curl, AI agents, etc.)
│
▼
┌─────────────────────────┐
│ Bridge Server (Bun) │
│ Port 3001 │
│ ┌───────────────────┐ │
│ │ REST API endpoints │ │ ← curl / HTTP clients
│ │ /api/generate etc │ │
│ ├───────────────────┤ │
│ │ MCP Server │ │ ← AI agents (Claude, Cursor)
│ │ /mcp (Streamable) │ │
│ ├───────────────────┤ │
│ │ WebSocket /ws │──│──┐
│ └───────────────────┘ │ │
└─────────────────────────┘ │ WebSocket
│
┌─────────────────────────┐ │
│ Chrome Extension │ │
│ (on suno.com tab) │◄─┘
│ ┌───────────────────┐ │
│ │ Content Script │ │ → Orchestrates messaging
│ ├───────────────────┤ │
│ │ Page Script │ │ → Accesses Clerk (JWT)
│ │ (MAIN world) │ │ + hCaptcha tokens
│ ├───────────────────┤ │
│ │ Background Worker │ │ → Makes API calls to Suno
│ │ │ │ (bypasses CORS)
│ ├───────────────────┤ │
│ │ Popup (status UI) │ │
安装
docker run -d -p 3000:3000 \配置
{
"mcpServers": {
"suno": {
"type": "url",
"url": "http://localhost:3001/mcp"
}
}
}