[PR #48] Fix deprecated Spotify Web API endpoints #48

Open
opened 2026-02-28 15:42:59 +03:00 by kerem · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/varunneal/spotify-mcp/pull/48
Author: @maxliving
Created: 2/24/2026
Status: 🔄 Open

Base: mainHead: fix/spotify-api-deprecated-endpoints


📝 Commits (1)

  • 41ebaaa Fix deprecated Spotify Web API endpoints

📊 Changes

2 files changed (+28 additions, -19 deletions)

View changed files

📝 src/spotify_mcp/spotify_api.py (+19 -15)
📝 src/spotify_mcp/utils.py (+9 -4)

📄 Description

Summary

Spotify deprecated several playlist-related endpoints in late 2024, replacing /tracks with /items across the playlist API. This PR updates all affected calls.

  • create_playlist: POST /users/{user_id}/playlistsPOST /me/playlists
  • add_tracks_to_playlist: POST /playlists/{id}/tracksPOST /playlists/{id}/items
  • remove_tracks_from_playlist: DELETE /playlists/{id}/tracksDELETE /playlists/{id}/items
  • get_playlist_tracks: replaced sp.playlist()['tracks'] with a direct call to GET /playlists/{id}/items
  • parse_playlist / parse_tracks: handle the renamed response key (trackitem) in playlist item objects, and gracefully handle the missing tracks object in create responses

Test plan

  • Create a playlist via the MCP tool
  • Add tracks to the playlist
  • Get playlist tracks and verify contents
  • Remove tracks from the playlist
  • Confirm no 403s on any of the above

Tested end-to-end against the live Spotify API.

🤖 Generated with Claude Code


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/varunneal/spotify-mcp/pull/48 **Author:** [@maxliving](https://github.com/maxliving) **Created:** 2/24/2026 **Status:** 🔄 Open **Base:** `main` ← **Head:** `fix/spotify-api-deprecated-endpoints` --- ### 📝 Commits (1) - [`41ebaaa`](https://github.com/varunneal/spotify-mcp/commit/41ebaaaf2991c4eca4eca1fc356b40303b82e5c2) Fix deprecated Spotify Web API endpoints ### 📊 Changes **2 files changed** (+28 additions, -19 deletions) <details> <summary>View changed files</summary> 📝 `src/spotify_mcp/spotify_api.py` (+19 -15) 📝 `src/spotify_mcp/utils.py` (+9 -4) </details> ### 📄 Description ## Summary Spotify deprecated several playlist-related endpoints in late 2024, replacing `/tracks` with `/items` across the playlist API. This PR updates all affected calls. - **`create_playlist`**: `POST /users/{user_id}/playlists` → `POST /me/playlists` - **`add_tracks_to_playlist`**: `POST /playlists/{id}/tracks` → `POST /playlists/{id}/items` - **`remove_tracks_from_playlist`**: `DELETE /playlists/{id}/tracks` → `DELETE /playlists/{id}/items` - **`get_playlist_tracks`**: replaced `sp.playlist()['tracks']` with a direct call to `GET /playlists/{id}/items` - **`parse_playlist` / `parse_tracks`**: handle the renamed response key (`track` → `item`) in playlist item objects, and gracefully handle the missing `tracks` object in create responses ## Test plan - [ ] Create a playlist via the MCP tool - [ ] Add tracks to the playlist - [ ] Get playlist tracks and verify contents - [ ] Remove tracks from the playlist - [ ] Confirm no 403s on any of the above Tested end-to-end against the live Spotify API. 🤖 Generated with [Claude Code](https://claude.com/claude-code) --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
Sign in to join this conversation.
No labels
pull-request
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/spotify-mcp-varunneal#48
No description provided.