Spotify モデルコンテキストプロトコル (MCP)
説明に基づいてプレイリストを作成するための Spotify MCP。
前提条件
Python 3.6以上
Spotify 開発者資格情報 (クライアント ID とクライアント シークレット)
設定
このリポジトリをクローンします:
git clone https://github.com/yourusername/spotify-mcp.git cd spotify-mcp必要な依存関係をインストールします。
pip install -r requirements.txtSpotify 開発者の資格情報を設定します。
新しいアプリケーションを作成する
環境変数を設定します。
echo SPOTIFY_CLIENT_ID='your_client_id' >> .env echo SPOTIFY_CLIENT_SECRET='your_client_secret' >> .env
使用法
認証サーバーの起動
Spotify 開発者ダッシュボードでリダイレクト URI を設定します。
Spotify開発者ダッシュボードでアプリにアクセスします
「設定を編集」をクリックします
リダイレクトURIに
http://localhost:5000/callback
を追加します。変更を保存する
認証サーバーを起動します。
python main.pyこれにより、Spotify OAuth 認証を処理するポート 5000 上のローカル サーバーが起動します。
ブラウザで
http://localhost:5000
にアクセスし、Spotify で認証してください。認証に成功すると、MCP で使用するためのアクセストークンが保存されます。
カーソルとの統合
カーソルを開いて設定へ移動します
「モデルコンテキストプロトコル」セクションに移動します
「MCPを追加」をクリックします
mcp.json に次の詳細を入力し、PATH-TO-BASE-DIR を置き換えます。
カーソル内の Spotify MCP コマンドを使用して、エディターから直接プレイリストを作成および管理できるようになりました。
hybrid server
The server is able to function both locally and remotely, depending on the configuration or use case.
OAuth 認証を介してカーソル エディターを Spotify の API に接続することで、テキストの説明に基づいて Spotify プレイリストを作成できるようになります。
Related Resources
Related MCP Servers
- AsecurityAlicenseAqualityEnables interaction with Spotify's music catalog via the Spotify Web API, supporting searches, artist information retrieval, playlist management, and automatic token handling.Last updated -54714MIT License
- AsecurityFlicenseAqualityA FastMCP tool that enables control of Spotify through natural language commands in Cursor Composer, allowing users to manage playback, search for content, and interact with playlists.Last updated -5
- AsecurityFlicenseAqualityA lightweight Model Context Protocol server that enables AI assistants like Cursor & Claude to control Spotify playback and manage playlists.Last updated -18146
- AsecurityFlicenseAqualityA tool that connects to the Spotify API and enables Claude to access artist information for enhanced music discovery through natural language queries.Last updated -1