PA

paean-ai/opensuno

Developer tools

このページは AI により自動翻訳されています。技術的な詳細は原文をご確認ください。 原文を見る

11 stars 4 forks 品質 74 トレンド 0LGPL-3.0

Suno API と MCP を AI エージェントで開く

概要

オープンソース Suno AI API と Chrome エクステンションブリッジ — ゼロコンフィグ auth & 自動キャプチャ バイパス。 ClaudeコードとPaean AIで構築 2つの操作モード:(Chromeの延長–推薦される)および(サーバー側)。 : Suno の API は認証用の Clerk セッションに依存していますが、Clrk は 401 不正なエラーを引き起こし、空のセッション (sessions: []) を頻繁に返します。 : Suno の API は、アカウントが ~200 クレジットを消費したときに音楽の生成に hCaptcha が必要です。 サーバー側のアプローチは、有効なカプチャトークンを提供できないため、「トークン検証失敗」(422)で失敗します。 : OpenSuno は 2 つのアプローチを提供しています: - (推奨) — Chrome 拡張は suno.com で実行され、ブラウザーのコンテキストから API 呼び出しを行います。 認証とカプチャは、ネイティブで処理されます。 ローカルブリッジサーバーは、REST API + MCP インターフェイスを公開し、WebSocket 経由で拡張へのリクエストを転送します.

概要(AI 翻訳)

オープンソース Suno AI API と Chrome エクステンションブリッジ — ゼロコンフィグ auth & 自動 captcha バイパス。 クロードコードとペイアンAIで構築

2つの動作モード:Bridge Mode(Chrome Extension — recommend)およびCookie Mode(server-side)。

なぜSun Openo?

Problem 1: Suno の API は、認証の Clerk セッションに依存していますが、Clrk は頻繁に空のセッション (sessions: []]) を返します。

Problem 2: Suno の API は、アカウントが ~200 クレジットよりも少ない消費したときに音楽生成の hCaptcha が必要です。 サーバー側のアプローチは、有効なカプチャトークンを提供できないため、「トークン検証失敗」(422)で失敗します。

ソリューション: OpenSunoは2つのアプローチを提供しています。

  • Bridge Mode(Recommended) — Chrome拡張はsuno.comで実行され、ブラウザのコンテキストからAPI呼び出しを行います。 認証とカプチャは、ネイティブで処理されます。 ローカルブリッジサーバーは、REST API + MCP インターフェイスを公開し、WebSocket 経由で拡張へのリクエストを転送します。
  • クッキーモード — ブラウザからJWTトークンを抽出する(ワークが、手動トークンのリフレッシュを必要とし、カプチャブロックを打つ可能性があります)

##特徴

このページは 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/completions endpoint
  • Web-based cookie management UI at /cookie
  • One-click Vercel deployment (Cookie Mode)

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)  │  │
GitHub で README 全文を見る

インストール

docker run -d -p 3000:3000 \
MCP 初心者?mcpskill.org のガイドから始めましょう →

設定

{ "mcpServers": { "suno": { "type": "url", "url": "http://localhost:3001/mcp" } } }