Skip to main content
Glama
soundcloud-mcp

soundcloud-mcp

by auxa-m45

soundcloud-mcp

SoundCloud 公式 API (API Guide) を Model Context Protocol サーバとして提供します。 Claude Code などの MCP クライアントから、SoundCloud の検索・トラック/プレイリスト/ユーザー情報の取得、 ログインユーザーのライブラリ操作 (いいね / リポスト / フォロー / コメント / プレイリスト編集 / アップロード) が行えます。

付属の Claude Code スキル .claude/skills/soundcloud/ が、ツールの使い分け・認証・ページング・ 書き込み操作の安全確認をモデルに指示します。

構成

パス

内容

src/auth.ts

OAuth 2.1 (認可コード + PKCE / クライアントクレデンシャル / リフレッシュ)。複数アカウントのトークンをファイルに永続化

src/client.ts

HTTP クライアント。401 時の自動リフレッシュ、5xx リトライ、linked_partitioning ページング、/resolve の 302 追跡

src/tools/*.ts

MCP ツール定義 (auth / discovery / tracks / playlists / users / me / social / generic)

src/format.ts

API レスポンスをトークン効率の良い要約に整形

src/login.ts

端末から実行するログイン CLI (npm run login)

.claude/skills/soundcloud/

スキル本体 (SKILL.md) と参照資料 (references/tools.md, references/api-reference.md)

.mcp.json

Claude Code のプロジェクトスコープ MCP 設定

Related MCP server: SoundCloud MCP Server

セットアップ

  1. SoundCloud のアプリを登録し、Client ID / Client Secret を取得します: https://soundcloud.com/you/apps Redirect URI に http://localhost:8976/callback を登録してください (変更する場合は SOUNDCLOUD_REDIRECT_URI も合わせる)。

  2. 依存関係をインストールします (prepare スクリプトにより dist/ が自動でビルドされます)。

    git clone https://github.com/auxa-m45/soundcloud-mcp.git
    cd soundcloud-mcp
    npm install
  3. 認証情報を設定します。.env (このディレクトリ、git 管理外) か環境変数のどちらでも構いません。

    cp .env.example .env
    # SOUNDCLOUD_CLIENT_ID / SOUNDCLOUD_CLIENT_SECRET を記入

Claude Code から使う

A. このリポジトリ内で使う (プロジェクトスコープ)

.mcp.json が同梱されているので、このディレクトリで claude を起動すると soundcloud サーバの承認を求められます。 承認すると soundcloud_* ツールと .claude/skills/soundcloud/ のスキルが自動で有効になります。

cd soundcloud-mcp
claude            # 初回に "soundcloud" サーバの使用を承認する
/mcp              # 接続状態を確認

.mcp.json は ${SOUNDCLOUD_CLIENT_ID:-} のように環境変数を展開し、未設定なら空のままサーバに渡します。 空の場合はサーバが .env を読むので、.env に書いておけば環境変数は不要です。

B. どのプロジェクトからも使う (ユーザースコープ)

claude mcp add --scope user soundcloud \
  -e SOUNDCLOUD_CLIENT_ID=xxx -e SOUNDCLOUD_CLIENT_SECRET=yyy \
  -- node /absolute/path/to/soundcloud-mcp/dist/index.js

-e を省略した場合も、サーバは自分のパッケージディレクトリにある .env を読みます。 スキルも全プロジェクトで使うには次のようにコピー (またはシンボリックリンク) します。

mkdir -p ~/.claude/skills
cp -r /absolute/path/to/soundcloud-mcp/.claude/skills/soundcloud ~/.claude/skills/soundcloud

C. クローンせずに使う

npm が GitHub から取得してビルドします (初回は数十秒かかります)。

claude mcp add --scope user soundcloud \
  -e SOUNDCLOUD_CLIENT_ID=xxx -e SOUNDCLOUD_CLIENT_SECRET=yyy \
  -- npx -y github:auxa-m45/soundcloud-mcp

動作確認

/mcp                                   # Claude Code 内: soundcloud が connected か

Claude に「SoundCloud で lofi を検索して」と頼むと soundcloud_search_tracks が呼ばれます。 いいねやアップロードなどユーザー権限が必要な操作は、Claude が soundcloud_auth_login を実行して 表示する URL をブラウザで承認してください。

他の MCP クライアント

stdio で起動します。

{
  "mcpServers": {
    "soundcloud": {
      "command": "node",
      "args": ["/absolute/path/to/soundcloud-mcp/dist/index.js"],
      "env": { "SOUNDCLOUD_CLIENT_ID": "xxx", "SOUNDCLOUD_CLIENT_SECRET": "yyy" }
    }
  }
}

認証モード

モード

取得方法

できること

app (クライアントクレデンシャル)

Client ID / Secret があれば自動

検索、resolve、公開トラック / プレイリスト / ユーザーの取得、ストリーム URL

user (認可コード + PKCE)

下記ログイン

上記に加え /me 系、いいね、リポスト、フォロー、コメント、アップロード、プレイリスト編集

ログインは 2 通りあります。

  • MCP ツールから: soundcloud_auth_login を呼ぶと authorize_url が返るので、ブラウザで開いて承認します。 サーバ内のローカルリスナーがコールバックを受け取り、soundcloud_auth_status でログイン済みになります。

  • 端末から: npm run login を実行するとブラウザが開き、承認後にトークンが保存されます。

トークンは ~/.config/soundcloud-mcp/tokens.json (mode 600) に保存されます。SOUNDCLOUD_TOKEN_FILE で変更できます。 リフレッシュトークンは単回使用のため、更新のたびに保存し直しています。 クライアントクレデンシャルのトークンは発行上限 (12 時間に 50 回 / アプリ) があるため、期限までキャッシュして再利用します。

マルチアカウント

複数の SoundCloud アカウントを同時にログインさせておき、使い分けられます。

  • 各アカウントは alias (既定はログイン後に /me から取得した SoundCloud のハンドル = プロフィール URL の末尾) で識別します。 soundcloud_auth_login の alias (例: label) で任意の名前を付けられます。

  • ログイン済みアカウントのうち 1 つが 既定 (active) アカウント です。account を指定しないツール呼び出しと、 公開情報の読み取りはこのアカウントのトークンを使います。新しくログインしたアカウントは既定になります (make_default: false で変更しない)。

  • ユーザー権限が必要なツール (soundcloud_me, soundcloud_list_my_content, いいね / リポスト / フォロー / コメント、アップロード、トラック / プレイリストの編集と削除、soundcloud_api_request) は account (alias / ユーザー名 / user URN) で呼び出しごとにアカウントを切り替えられます。

  • soundcloud_auth_switch_account で既定アカウントを変更、soundcloud_auth_logout で 1 つ (既定) または all: true で全アカウントを削除します。

  • 別アカウントを追加するときは、ブラウザ側で soundcloud.com からサインアウトしてから (またはプライベート ウィンドウで) 承認 URL を開いてください。同じ SoundCloud ユーザーで再ログインすると既存エントリを更新します。

端末からは次のように追加します。

npm run login -- --alias label            # alias を指定して追加 (既定になる)
npm run login -- --alias sub --no-default # 既定は変えずに追加

旧バージョンの単一ユーザー形式のトークンファイルは、初回読み込み時に alias default として自動移行されます。

ツール一覧

分類

ツール

認証

soundcloud_auth_status, soundcloud_auth_login, soundcloud_auth_complete, soundcloud_auth_switch_account, soundcloud_auth_logout

検索 / 解決

soundcloud_resolve, soundcloud_search_tracks, soundcloud_search_playlists, soundcloud_search_users, soundcloud_next_page

トラック

soundcloud_get_track, soundcloud_get_track_streams, soundcloud_get_track_comments, soundcloud_get_related_tracks, soundcloud_get_track_engagement, soundcloud_upload_track, soundcloud_update_track, soundcloud_delete_track, soundcloud_set_track_storefront

プレイリスト

soundcloud_get_playlist, soundcloud_get_playlist_tracks, soundcloud_get_playlist_reposters, soundcloud_create_playlist, soundcloud_update_playlist, soundcloud_add_playlist_tracks, soundcloud_remove_playlist_tracks, soundcloud_delete_playlist

ユーザー

soundcloud_get_user, soundcloud_list_user_content

自分

soundcloud_me, soundcloud_list_my_content

ソーシャル

soundcloud_set_like, soundcloud_set_repost, soundcloud_set_follow, soundcloud_comment_on_track

汎用

soundcloud_api_request (未ラップのエンドポイント用)

識別子 (track / playlist / user / target) には URN (soundcloud:tracks:123)、数値 ID、 soundcloud.com の URL のいずれも渡せます。URL は内部で /resolve を呼んで URN に変換します。 一覧系のツールは next_href を返すので、soundcloud_next_page で続きを取得します。

各ツールの引数と戻り値は .claude/skills/soundcloud/references/tools.md を参照してください。

開発

npm run typecheck   # 型チェック
npm test            # ユニットテスト (fetch をモックした認証 / クライアントのテストを含む)
npm run dev         # tsx で stdio サーバを起動
npm run smoke       # ビルド済みサーバを MCP クライアントから起動し、ツール一覧と auth_status を表示
npm run smoke -- "lofi"   # 認証情報があれば検索まで実行

制限とレート制限

  • ストリーム URL の取得: 24 時間あたり 15,000 リクエスト / client_id

  • クライアントクレデンシャルのトークン発行: 12 時間あたり 50 回 / アプリ、1 時間あたり 30 回 / IP

  • アップロード: 4 GB、24 時間まで。対応形式 AIFF, WAVE, FLAC, OGG, MP2, MP3, AAC, AMR, WMA。アートワークは PRO アカウントのみ

  • 429 応答には rate_limit.reset_time が含まれ、ツールのエラーメッセージにも表示されます

ライセンス

MIT

Available Tools

36 tools
soundcloud_add_playlist_tracksAdd tracks to playlistA

Append (or prepend) tracks to a playlist owned by the logged-in user. Reads the current track list first, skips tracks already present, then writes the merged list back.

Inputs: playlist (required), track_urns (required), account, position.

soundcloud_api_requestRaw SoundCloud API requestA

Escape hatch: call any https://api.soundcloud.com endpoint directly with the stored credentials. Use only when no dedicated tool covers the need (see the soundcloud skill's api-reference). Returns the raw JSON; set paginate=true to add linked_partitioning and get a compact page.

Inputs: path (required), auth, body, query, +3 more.

soundcloud_auth_completeComplete SoundCloud login manuallyA

Finish a login started with soundcloud_auth_login when the browser callback could not reach the local listener. Accepts the full URL the browser was redirected to, or just the ?code= value.

Inputs: code_or_url (required).

soundcloud_auth_loginStart SoundCloud login (add account)A

Start the OAuth 2.1 (PKCE) login for a SoundCloud account. Returns an authorize_url the user must open in a browser; the account approved there is stored under alias (default: its SoundCloud username) and, unless make_default is false, becomes the active account. Call it again to add more accounts (the user must be signed in to soundcloud.com as the other account in the browser). A local listener on the redirect URI captures the callback; check soundcloud_auth_status afterwards. If the listener could not start, pass the redirected URL to soundcloud_auth_complete.

Inputs: alias, make_default.

soundcloud_auth_logoutSoundCloud logout (remove account)A

Invalidate a stored user session (POST /sign-out) and delete its tokens. Without account the active account is removed; all=true removes every account. Public reads keep working with the app token.

Inputs: all, account.

soundcloud_auth_statusSoundCloud auth statusA
Read-onlyIdempotent

Show whether app credentials are configured, which SoundCloud accounts are logged in (alias, username, expiry), which one is active (default), and any login in progress. Call this first when a user-level action fails, before uploads / likes / playlist edits, or when the user talks about a specific account.

Inputs: no named parameters.

soundcloud_auth_switch_accountSwitch active SoundCloud accountA
Idempotent

Make one of the logged-in accounts the active (default) one. Tools that take no account parameter, and public reads, then use it. The choice is persisted across sessions. Returns the account list.

Inputs: account (required).

soundcloud_comment_on_trackComment on a trackA

Post a comment on a track as the logged-in user, optionally anchored at a position in the track (timestamp_ms).

Inputs: body (required), track (required), account, timestamp_ms.

soundcloud_create_playlistCreate playlistB

Create a playlist (or album via set_type) for the logged-in user, optionally with an initial ordered list of tracks.

Inputs: title (required), ean, genre, account, +12 more.

soundcloud_delete_playlistDelete playlistA
DestructiveIdempotent

Permanently delete a playlist owned by the logged-in user (tracks themselves are not deleted). Get explicit confirmation first.

Inputs: playlist (required), account.

soundcloud_delete_trackDelete trackA
DestructiveIdempotent

Permanently delete a track owned by the logged-in user. Irreversible: get explicit confirmation from the user first.

Inputs: track (required), account.

soundcloud_get_playlistGet playlistA
Read-onlyIdempotent

Fetch a playlist / album with its metadata and (by default) its tracks. Pass secret_token for private playlists.

Inputs: playlist (required), raw, access, show_tracks, +1 more.

soundcloud_get_playlist_repostersGet playlist repostersB
Read-onlyIdempotent

List users who reposted a playlist.

Inputs: playlist (required), limit.

soundcloud_get_playlist_tracksGet playlist tracks (paginated)A
Read-onlyIdempotent

List the tracks of a playlist page by page. Prefer this over soundcloud_get_playlist for long playlists.

Inputs: playlist (required), access, secret_token.

soundcloud_get_trackGet trackA
Read-onlyIdempotent

Fetch a track's metadata (title, artist, duration, counts, access level, permalink…). Pass secret_token for private tracks.

Inputs: track (required), raw, secret_token.

soundcloud_get_track_commentsGet track commentsA
Read-onlyIdempotent

List comments on a track (newest first), including the timestamp in the track each comment refers to.

Inputs: track (required), limit.

soundcloud_get_track_engagementGet users who liked / reposted a trackB
Read-onlyIdempotent

List the users who liked (favoriters) or reposted (reposters) a track.

Inputs: kind (required), track (required), limit.

soundcloud_get_track_streamsGet track stream URLsA
Read-onlyIdempotent

Return the transcoded stream URLs of a track (HLS AAC 160k, HLS MP3 128k, MP3 preview). URLs are signed and short-lived; fetch them right before playback. Only tracks with access playable/preview have streams. Stream requests count toward the 15,000 per 24h play limit per app.

Inputs: track (required), secret_token.

soundcloud_get_userGet user / artistA
Read-onlyIdempotent

Fetch a user's public profile: name, location, follower / track / playlist counts, plan, links.

Inputs: user (required), raw.

soundcloud_list_my_contentList my tracks / playlists / likes / feed…A
Read-onlyIdempotent

List the logged-in user's library and social data. kind selects what: tracks (my uploaded tracks); playlists (my playlists / albums); liked_tracks (tracks I liked); liked_playlists (playlists I liked); reposted_tracks (tracks I reposted); reposted_playlists (playlists I reposted); followers (users following me); followings (users I follow); followings_tracks (recent tracks from users I follow); feed (my activity feed (tracks, playlists, reposts)); feed_tracks (track-only activity feed); recently_played (my last 25 played tracks). Requires login. Paginated via next_href.

Inputs: kind (required), sort, limit, access, +2 more.

soundcloud_list_user_contentList a user's tracks / playlists / likes / followers…A
Read-onlyIdempotent

List content related to a user. kind selects what: tracks (tracks uploaded by the user); playlists (playlists / albums created by the user); liked_tracks (tracks the user liked); liked_playlists (playlists the user liked); reposted_tracks (tracks the user reposted); reposted_playlists (playlists the user reposted); followers (users following this user); followings (users this user follows); related_artists (artists related to this user (recommendations)); web_profiles (external links on the profile (website, Instagram…)). Paginated via next_href.

Inputs: kind (required), user (required), sort, limit, +2 more.

soundcloud_meGet my profileA
Read-onlyIdempotent

Profile of the logged-in SoundCloud user, including upload quota and private counts. Requires login.

Inputs: raw, account.

soundcloud_next_pageFetch next pageA
Read-onlyIdempotent

Fetch the next page of any paginated result using the next_href returned by a previous tool call. Only api.soundcloud.com URLs are accepted.

Inputs: next_href (required).

soundcloud_remove_playlist_tracksRemove tracks from playlistA

Remove the given tracks from a playlist owned by the logged-in user, keeping the order of the rest.

Inputs: playlist (required), track_urns (required), account.

soundcloud_resolveResolve SoundCloud URLA
Read-onlyIdempotent

Turn a soundcloud.com / on.soundcloud.com URL into its API resource. Returns the kind (track, playlist or user), the URN to use with other tools, and a compact summary. Use this first whenever the user pastes a SoundCloud link.

Inputs: url (required).

soundcloud_search_playlistsSearch playlistsA
Read-onlyIdempotent

Full-text search for playlists / albums. Tracks are omitted by default to keep results small; set show_tracks to include them.

Inputs: q (required), limit, access, show_tracks.

soundcloud_search_tracksSearch tracksA
Read-onlyIdempotent

Full-text search for tracks with optional filters (genres, tags, BPM, duration, creation date, access level). Also does batch lookup when urns is given. Results are paginated; follow next_href with soundcloud_next_page.

Inputs: q, tags, urns, limit, +8 more.

soundcloud_search_usersSearch users / artistsA
Read-onlyIdempotent

Search SoundCloud users (artists, labels, listeners) by name. Also does batch lookup when urns is given.

Inputs: q, urns, limit.

soundcloud_set_followFollow / unfollow a userA
Idempotent

Follow (following=true) or unfollow (following=false) a user as the logged-in user.

Inputs: user (required), following (required), account.

soundcloud_set_likeLike / unlike a track or playlistA
Idempotent

Like (liked=true) or remove the like (liked=false) on a track or playlist as the logged-in user.

Inputs: liked (required), target (required), kind, account.

soundcloud_set_repostRepost / un-repost a track or playlistA
Idempotent

Repost (reposted=true) or remove the repost (reposted=false) of a track or playlist as the logged-in user.

Inputs: target (required), reposted (required), kind, account.

soundcloud_set_track_storefrontSet track storefrontA
Idempotent

Create or replace the storefront (buy / link module) shown on a track owned by the logged-in user. The whole storefront is replaced: omitted optional fields are cleared, so send every value that should remain.

Inputs: link (required), type (required), title (required), track (required), +4 more.

soundcloud_update_playlistUpdate playlistA
Idempotent

Update metadata of a playlist owned by the logged-in user. If track_urns is given it REPLACES the whole track list (use soundcloud_add_playlist_tracks / soundcloud_remove_playlist_tracks for incremental edits).

Inputs: playlist (required), ean, genre, title, +13 more.

soundcloud_update_trackUpdate track metadataA
Idempotent

Update metadata of a track owned by the logged-in user (PUT /tracks/{urn}). Only the provided fields change.

Inputs: track (required), isrc, genre, title, +17 more.

soundcloud_upload_trackUpload trackA

Upload an audio file from the local filesystem as a new track for the logged-in user (multipart POST /tracks). Limits: 4 GB, 24 hours of audio; formats AIFF, WAVE, FLAC, OGG, MP2, MP3, AAC, AMR, WMA. Artwork upload requires a PRO account. Confirm title, sharing and file with the user before calling.

Inputs: title (required), file_path (required), isrc, genre, +18 more.

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections.

Loading tool schema changelog…

    TDQS

    A3.9/5.0

    Scored across 36 tools

    Disambiguation5/5

    Every tool targets a distinct resource and action: search vs. get, tracks vs. playlists vs. users, and auth vs. content operations are clearly separated. Even similar tools like get_playlist, get_playlist_tracks, and get_playlist_reposters have unique, well-defined purposes.

    Naming Consistency5/5

    All tools follow the soundcloud_ prefix with consistent verb_noun naming: search_*, get_*, create_*, update_*, delete_*, set_*, and list_*. The small variation between get_ and list_ is meaningful, with get_ for single resources and list_ for collections, so the pattern is predictable.

    Tool Count2/5

    At 36 tools, the server exceeds the recommended range and becomes a heavy selection surface for an agent. While each tool is individually specific, the overall count is more than is typically appropriate and could be consolidated or trimmed.

    Completeness5/5

    The tool surface covers the full SoundCloud lifecycle: auth, search, track and playlist CRUD, engagement, user library exploration, and social actions. The api_request escape hatch also fills any edge-case gaps, making the set effectively complete for its domain.

    Maintenance

    ActivityStale
    ResponsivenessNo recent community issues

    Related MCP Connectors

    Related MCP Servers