Spotify Playlist MCP
Spotify Playlist MCP
CodexデスクトップのスケジュールタスクからSpotifyプレイリストを安全にキュレーションするためのローカルSTDIO MCPサーバー。所有するプレイリストの閲覧、Spotifyトラックの検索、プレイリストメタデータの更新、制限付きプラン/適用ワークフローによるトラックの追加・削除が可能です。
セーフティモデル
Spotifyの認証情報とセーフティ設定は、このプロジェクトの無視された
.envからのみ読み取り、オプションでプロセスレベルの上書きが可能です。OAuthトークンは
~/.config/spotify-playlist-mcp/token.jsonにファイルモード0600で保存します。プレイリストIDが
SPOTIFY_ALLOWED_PLAYLIST_IDSに含まれていない限り、すべての書き込みを拒否します。認証済みユーザーがプレイリストを所有していることを検証します。
各プランは
SPOTIFY_MAX_CHANGES_PER_PLANで上限を設定し、デフォルトは影響を受けるトラック10件です。プランを現在のSpotify
snapshot_idにバインドし、10分後に失効させ、1アプリケーションのみ許可します。最初の書き込みの前にプランを消費するため、部分的に適用された操作を誤って再試行することはできません。
Spotifyのリフレッシュトークンは、認可から6か月後に現在失効します。spotify_auth_statusは残り時間を報告するため、再認可が必要になる前にスケジュールタスクで警告できます。Spotifyのリフレッシュトークンガイドを参照してください。
Related MCP server: MCP Spotify Server
ツール
ツール | タイプ | 目的 |
| 読み取り | 認証情報を返さずに、認可状態とリフレッシュトークンの残り有効期間を報告します |
| 読み取り | 所有するプレイリスト、可視性、トラック数、スナップショット、リンクを一覧表示します |
| 読み取り | 候補トラックを検索します。リクエストあたり最大10件の結果です |
| 読み取り | 現在のプレイリストメタデータと再生可能なトラック項目を返します |
| 読み取り | 追加、削除、名前、説明、または可視性の変更を検証およびプレビューします |
| 書き込み | 正確で、未失効で、一度きりのプランを適用します |
トラックの追加は末尾に追加されます。URIの削除は一致するすべての出現箇所を削除し、影響数はその動作を反映します。このサーバーは、一括置換、任意のリクエスト、プレイリストの削除、または計画外の書き込みを意図的に公開しません。
インストールと検証
source ~/.nvm/nvm.sh
nvm use 24.14.0
npm install
npm test
npm run typecheck
npm run build
npm audit一度きりのSpotify認可
.env内のリダイレクトURIは、Spotifyダッシュボードの設定と正確に一致する必要があります。現在のループバックコールバックはhttp://127.0.0.1:3000/auth/callbackです。
npm run auth表示されたSpotifyのURLを開き、スコープを承認してください。コマンドはループバックコールバックを受け取り、トークンを非公開で保存します。認証情報を明かさずにステータスを確認するには:
node dist/auth-cli.js --statusSpotifyは現在、アクセストークンの更新ではリフレッシュトークンの有効期間が延長されないため、6か月ごとの再認可が必要です。
Codexデスクトップ設定
デスクトップアプリ、CLI、IDE拡張機能は~/.codex/config.tomlを共有します。スケジュールされたデスクトップタスクは、このSTDIOサーバーを直接起動できます:
[mcp_servers.spotify-playlists]
command = "/absolute/path/to/node"
args = ["/absolute/path/to/spotify-playlist-mcp/dist/index.js"]
cwd = "/absolute/path/to/spotify-playlist-mcp"
enabled = true
required = true
default_tools_approval_mode = "auto"
tool_timeout_sec = 60
[mcp_servers.spotify-playlists.env]
SPOTIFY_ALLOWED_PLAYLIST_IDS = "replace-with-owned-playlist-id"
SPOTIFY_MAX_CHANGES_PER_PLAN = "10"
[mcp_servers.spotify-playlists.tools.spotify_apply_playlist_plan]
approval_mode = "approve"MCP設定を変更した後は、ChatGPTデスクトップアプリを再起動してください。スケジュールタスクがローカルサーバーを必要とする場合は、コンピューターの電源を入れ、アプリを実行したままにしてください。公式のCodex MCP設定およびスケジュールタスクのドキュメントを参照してください。
意図した公開プレイリストが存在し、そのIDが確認されるまで、SPOTIFY_ALLOWED_PLAYLIST_IDSは空のままにしてください。複数のIDはカンマ区切りにできます。
推奨スケジュールタスクのプロンプト
Use the Spotify playlist MCP to curate only the configured allowlisted playlist.
First check spotify_auth_status and stop with a warning when authorization is missing or due within 14 days.
Inspect the current playlist before searching for candidates.
Follow the playlist's stated audience and description.
Do not remove protected anchor tracks unless the task prompt explicitly names them.
Make no more than the configured change cap.
Create a playlist change plan, report its additions, removals, metadata updates, and warnings, then apply that exact plan only when it matches these rules.
Report the final snapshot ID and Spotify link.このプロンプトをスケジュールする前に手動でテストしてください。スケジュール実行は無人であるため、ミューテーションツールは承認を求めるように設定してはなりません。
開発
npm test
npm run typecheck
npm run buildテストはインメモリのSpotifyフェイクとインメモリのMCPトランスポートを使用します。テストが実際のSpotifyを呼び出したり、実際のトークンファイルを読み取ったりすることはありません。
ライセンス
This server cannot be installed
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
- AlicenseAqualityCmaintenanceAn MCP server for bulk Spotify operations enabling batch playlist creation, library exports, and large-scale library management with confidence scoring and human-in-the-loop for uncertain matches.332MIT
- FlicenseAqualityDmaintenanceA lightweight MCP server that enables AI assistants like Cursor and Claude to control Spotify playback, playlists, and manage tokens via OAuth.152
- AlicenseAqualityBmaintenanceMCP server to control Spotify conversationally from Claude, Cursor, and other AI clients.1160MIT
- FlicenseNot gradedqualityCmaintenanceA lightweight MCP server that enables AI assistants to control Spotify playback and manage playlists.
Related MCP Connectors
MCP server for interacting with the Supabase platform
MCP server for managing Prisma Postgres.
MCP server for Producer/Riffusion AI music generation
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/suhajdab/spotify-playlist-mcp'
If you have feedback or need assistance with the MCP directory API, please join our Discord server