Skip to main content
Glama
Spotify MCP Server

Spotify MCP Server

by g2dgaming

spotify-mcp MCP サーバー

ClaudeとSpotifyを接続するMCPプロジェクト。spotipy -devのAPIをベースに構築されています。

特徴

  • 再生を開始、一時停止、スキップする

  • トラック/アルバム/アーティスト/プレイリストを検索

  • トラック/アルバム/アーティスト/プレイリストに関する情報を取得する

  • Spotifyキューを管理する

  • プレイリストの管理、作成、更新

Related MCP server: Spotify MCP Server

デモ

音声をオンにしてください

構成

Spotify APIキーの取得

developer.spotify.comでアカウントを作成してください。ダッシュボードに移動します。redirect_uri をhttp://127.0.0.1:8080/callbackに設定してアプリを作成します。任意のポートを選択できますが、http と明示的なループバックアドレス(IPv4 または IPv6)を使用する必要があります。

詳細情報/トラブルシューティングについては、こちらをご覧ください。動作確認前にMCP環境(例:Claude Desktop)を1~2回再起動する必要がある場合があります。

このプロジェクトをローカルで実行する

このプロジェクトはまだ一時的な環境( uvx使用など)向けに設定されていません。このリポジトリをクローンしてローカルで実行してください。

git clone https://github.com/varunneal/spotify-mcp.git

このツールを MCP サーバーとして追加します。

MacOS 上の Claude Desktop: ~/Library/Application\ Support/Claude/claude_desktop_config.json

Windows 上の Claude Desktop: %APPDATA%/Claude/claude_desktop_config.json

"spotify": {
    "command": "uv",
    "args": [
      "--directory",
      "/path/to/spotify_mcp",
      "run",
      "spotify-mcp"
    ],
    "env": {
      "SPOTIFY_CLIENT_ID": YOUR_CLIENT_ID,
      "SPOTIFY_CLIENT_SECRET": YOUR_CLIENT_SECRET,
      "SPOTIFY_REDIRECT_URI": "http://127.0.0.1:8080/callback"
    }
  }

トラブルシューティング

このMCPが動作しない場合は、問題を報告してください。以下にヒントをいくつか示します。

  1. uvが更新されていることを確認してください。バージョン>=0.54推奨します。

  2. claude にプロジェクトの実行権限があることを確認します: chmod -R 755 。

  3. Spotify Premium があることを確認します (開発者 API を実行するために必要)。

このMCPは、MCP仕様で規定されているstd errにログを出力します。Macでは、Claudeデスクトップアプリはこれらのログを~/Library/Logs/Claudeに出力します。その他のプラットフォームでは、ログはここにあります。

次のコマンドを使用して、 npm経由で MCP Inspector を起動できます。

npx @modelcontextprotocol/inspector uv --directory /path/to/spotify_mcp run spotify-mcp

起動すると、ブラウザでアクセスしてデバッグを開始できる URL がインスペクタに表示されます。

やるべきこと

残念ながら、Spotify API から多くの便利な機能が廃止されました。新しい機能のほとんどは、比較的マイナーなもの、またはプロジェクトの健全性に関するものです。

  • テスト。

  • プレイリストを管理するための API サポートを追加します。

  • ページ分割された検索結果/プレイリスト/アルバムの API サポートを追加します。

PR よろしくお願いします! @jamiew、@davidpadbury、@manncodes、@hyuma7、@aanurraj などの貢献に感謝します。

展開

(やること)

建築と出版

配布用のパッケージを準備するには:

  1. 依存関係を同期し、ロックファイルを更新します。

uv sync
  1. パッケージディストリビューションをビルドします。

uv build

これにより、 dist/ディレクトリにソースとホイールのディストリビューションが作成されます。

  1. PyPI に公開:

uv publish

注: 環境変数またはコマンド フラグを使用して PyPI 資格情報を設定する必要があります。

  • トークン: --tokenまたはUV_PUBLISH_TOKEN

  • またはユーザー名/パスワード: --username / UV_PUBLISH_USERNAMEおよび--password / UV_PUBLISH_PASSWORD

Available Tools

5 tools
SpotifyGetInfoA

Get detailed information about a Spotify item (track, album, artist, or playlist).

Inputs: item_uri (required).

SpotifyPlaybackB

Manages the current playback with the following actions: - get: Get information about user's current track. - start: Starts playing new item or resumes current playback if called with no uri. - pause: Pauses current playback. - skip: Skips current track.

Inputs: action (required), num_skips, spotify_uri.

SpotifyPlaylistC

Manage Spotify playlists. - get: Get a list of user's playlists. - get_tracks: Get tracks in a specific playlist. - add_tracks: Add tracks to a specific playlist. - remove_tracks: Remove tracks from a specific playlist. - change_details: Change details of a specific playlist.

Inputs: action (required), description, name, playlist_id, +1 more.

SpotifyQueueB

Manage the playback queue - get the queue or add tracks.

Inputs: action (required), track_id.

SpotifySearchB

Search for tracks, albums, artists, or playlists on Spotify.

Inputs: query (required), limit, qtype.

Tool Schema Changelog

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

Loading tool schema changelog…

    TDQS

    A3.5/5.0

    Scored across 5 tools

    Disambiguation5/5

    Each tool has a clearly distinct purpose: SpotifyGetInfo retrieves metadata, SpotifyPlayback handles real-time playback control, SpotifyPlaylist manages playlist content and details, SpotifyQueue manages the playback queue, and SpotifySearch performs searches. There is no overlap in functionality that would cause confusion.

    Naming Consistency5/5

    All tool names follow a consistent 'Spotify' prefix with a descriptive noun or verb-noun pattern (e.g., SpotifyGetInfo, SpotifyPlayback, SpotifyPlaylist, SpotifyQueue, SpotifySearch). This uniformity makes the tool set predictable and easy to navigate.

    Tool Count5/5

    With 5 tools, the server is well-scoped for managing Spotify interactions, covering key areas like playback, playlists, search, queue, and general info. Each tool earns its place without feeling bloated or insufficient for the domain.

    Completeness4/5

    The tool set provides comprehensive coverage for core Spotify operations, including CRUD for playlists, playback control, search, and queue management. A minor gap is the lack of user profile or library management tools (e.g., managing saved tracks or albums), but agents can still handle most common workflows effectively.

    Maintenance

    ActivityInactive
    ResponsivenessNo recent community issues

    Related MCP Connectors

    Related MCP Servers