Skip to main content
Glama
belljustin

Spotify Model Context Protocol

by belljustin

Spotify モデルコンテキストプロトコル (MCP)

説明に基づいてプレイリストを作成するための Spotify MCP。

前提条件

  • Python 3.6以上

  • Spotify 開発者資格情報 (クライアント ID とクライアント シークレット)

Related MCP server: Spotify MCP

設定

  1. このリポジトリをクローンします:

    git clone https://github.com/yourusername/spotify-mcp.git
    cd spotify-mcp
  2. 必要な依存関係をインストールします。

    pip install -r requirements.txt
  3. Spotify 開発者の資格情報を設定します。

    • Spotify開発者ダッシュボード

    • 新しいアプリケーションを作成する

    • 環境変数を設定します。

      echo SPOTIFY_CLIENT_ID='your_client_id' >> .env
      echo SPOTIFY_CLIENT_SECRET='your_client_secret' >> .env

使用法

認証サーバーの起動

  1. Spotify 開発者ダッシュボードでリダイレクト URI を設定します。

    • Spotify開発者ダッシュボードでアプリにアクセスします

    • 「設定を編集」をクリックします

    • リダイレクトURIにhttp://localhost:5000/callbackを追加します。

    • 変更を保存する

  2. 認証サーバーを起動します。

    python main.py

    これにより、Spotify OAuth 認証を処理するポート 5000 上のローカル サーバーが起動します。

  3. ブラウザでhttp://localhost:5000にアクセスし、Spotify で認証してください。認証に成功すると、MCP で使用するためのアクセストークンが保存されます。

カーソルとの統合

  1. カーソルを開いて設定へ移動します

  2. 「モデルコンテキストプロトコル」セクションに移動します

  3. 「MCPを追加」をクリックします

  4. mcp.json に次の詳細を入力し、PATH-TO-BASE-DIR を置き換えます。

{
  "mcpServers": {
    "spotify": {
        "command": "uv",
        "args": [
          "--directory",
          "PATH-TO-BASE-DIR/spotify-mcp",
          "run",
          "spotify.py"
        ]
    }
  }
}

カーソル内の Spotify MCP コマンドを使用して、エディターから直接プレイリストを作成および管理できるようになりました。

Install Server
A
security – no known vulnerabilities
A
license - permissive license
A
quality - confirmed to work

Resources

Looking for Admin?

Admins can modify the Dockerfile, update the server description, and track usage metrics. If you are the server author, to access the admin panel.

Latest Blog Posts

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/belljustin/spotify-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server