{"_id":"@0xbarandiaran/spotify-mcp-server","_rev":"6-6b5bc6c10b1a868210c363475213c998","name":"@0xbarandiaran/spotify-mcp-server","dist-tags":{"latest":"2.0.5"},"versions":{"2.0.0":{"name":"@0xbarandiaran/spotify-mcp-server","version":"2.0.0","keywords":["spotify","mcp","model-context-protocol","claude","ai","music","playback","playlist"],"author":{"name":"Marcel Marais"},"license":"MIT","_id":"@0xbarandiaran/spotify-mcp-server@2.0.0","maintainers":[{"name":"gabrielbarandiaran","email":"pr.barandiaran@gmail.com"}],"homepage":"https://github.com/marcelmarais/spotify-mcp-server#readme","bugs":{"url":"https://github.com/marcelmarais/spotify-mcp-server/issues"},"bin":{"spotify-mcp":"build/index.js","spotify-mcp-server":"build/index.js"},"dist":{"shasum":"44918eba1a61c88afea0550f884b8b8fbf63d2cb","tarball":"https://registry.npmjs.org/@0xbarandiaran/spotify-mcp-server/-/spotify-mcp-server-2.0.0.tgz","fileCount":10,"integrity":"sha512-lgRx7Ovnr+r2TrJTKB41HqS4d4EWFjlizD/YCaraUIfn/T6AqsrT1jt2DvyC3xYuBAnBjVe95prL2ecRmz52jg==","signatures":[{"sig":"MEUCIQC72Cykgi8P/ddGL3EqHe8oIIt23cRXun13lburAV4yZwIgJ0N04FqjF5CcnY6ws8jloVlNR9/Jq+/0QHwVunMccPE=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":72316},"main":"build/index.js","type":"module","engines":{"node":">=18.0.0"},"gitHead":"5f8d916af64d86e8ad16e48195ae9fc5bc4fec61","scripts":{"auth":"tsc && node build/auth.js","lint":"biome check --diagnostic-level=warn --error-on-warnings","build":"tsc && node -e \"require('fs').chmodSync('build/index.js', '755')\"","lint:fix":"biome check --write --unsafe --organize-imports-enabled=true","typecheck":"tsc --noEmit","prepublishOnly":"npm run build"},"_npmUser":{"name":"gabrielbarandiaran","email":"pr.barandiaran@gmail.com"},"repository":{"url":"git+https://github.com/marcelmarais/spotify-mcp-server.git","type":"git"},"_npmVersion":"11.6.2","description":"A Model Context Protocol server for Spotify integration - Updated for Spotify's February 2026 API migration","directories":{},"_nodeVersion":"24.12.0","dependencies":{"zod":"^3.24.2","open":"^10.1.0","@modelcontextprotocol/sdk":"^1.10.1"},"_hasShrinkwrap":false,"devDependencies":{"typescript":"^5.8.2","@types/node":"^22.13.8","@biomejs/biome":"^1.9.4"},"_npmOperationalInternal":{"tmp":"tmp/spotify-mcp-server_2.0.0_1772122688231_0.9990059602995072","host":"s3://npm-registry-packages-npm-production"}},"2.0.1":{"name":"@0xbarandiaran/spotify-mcp-server","version":"2.0.1","keywords":["spotify","mcp","model-context-protocol","claude","ai","music","playback","playlist"],"author":{"name":"Marcel Marais"},"license":"MIT","_id":"@0xbarandiaran/spotify-mcp-server@2.0.1","maintainers":[{"name":"gabrielbarandiaran","email":"pr.barandiaran@gmail.com"}],"homepage":"https://github.com/marcelmarais/spotify-mcp-server#readme","bugs":{"url":"https://github.com/marcelmarais/spotify-mcp-server/issues"},"bin":{"spotify-mcp":"build/index.js","spotify-mcp-server":"build/index.js"},"dist":{"shasum":"f090eab71da460c66a55072b291b6f09b2b710be","tarball":"https://registry.npmjs.org/@0xbarandiaran/spotify-mcp-server/-/spotify-mcp-server-2.0.1.tgz","fileCount":10,"integrity":"sha512-RGjDQGurSjQNYL41QXryP4VQxzM7bUPeYfqK/LtAsiNESfpDQvojNnA09seOwK+dRBxQVgZ9BEmSgp1fAqE7wA==","signatures":[{"sig":"MEUCIB3GUYoPyhXFeHudy2G8BKbShhp9dpzQOKt/0n1gddlUAiEA6u9hPaM4b5Cd/836O6WjbalQDXoKwx//LmiRVl1Ka8M=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":72396},"main":"build/index.js","type":"module","engines":{"node":">=18.0.0"},"gitHead":"c040e9f4afeb760c5d4b28246da474927f290f82","scripts":{"auth":"tsc && node build/auth.js","lint":"biome check --diagnostic-level=warn --error-on-warnings","build":"tsc && node -e \"require('fs').chmodSync('build/index.js', '755')\"","lint:fix":"biome check --write --unsafe --organize-imports-enabled=true","typecheck":"tsc --noEmit","prepublishOnly":"npm run build"},"_npmUser":{"name":"gabrielbarandiaran","email":"pr.barandiaran@gmail.com"},"repository":{"url":"git+https://github.com/marcelmarais/spotify-mcp-server.git","type":"git"},"_npmVersion":"11.6.2","description":"A Model Context Protocol server for Spotify integration - Updated for Spotify's February 2026 API migration","directories":{},"_nodeVersion":"24.12.0","dependencies":{"zod":"^3.24.2","open":"^10.1.0","@modelcontextprotocol/sdk":"^1.10.1"},"_hasShrinkwrap":false,"devDependencies":{"typescript":"^5.8.2","@types/node":"^22.13.8","@biomejs/biome":"^1.9.4"},"_npmOperationalInternal":{"tmp":"tmp/spotify-mcp-server_2.0.1_1772122999852_0.32353267135912556","host":"s3://npm-registry-packages-npm-production"}},"2.0.2":{"name":"@0xbarandiaran/spotify-mcp-server","version":"2.0.2","keywords":["spotify","mcp","model-context-protocol","claude","ai","music","playback","playlist"],"author":{"name":"Marcel Marais"},"license":"MIT","_id":"@0xbarandiaran/spotify-mcp-server@2.0.2","maintainers":[{"name":"gabrielbarandiaran","email":"pr.barandiaran@gmail.com"}],"homepage":"https://github.com/marcelmarais/spotify-mcp-server#readme","bugs":{"url":"https://github.com/marcelmarais/spotify-mcp-server/issues"},"bin":{"spotify-mcp":"build/index.js","spotify-mcp-auth":"build/auth.js","spotify-mcp-server":"build/index.js"},"dist":{"shasum":"30e007084d68e78a4315b226c270944df951534d","tarball":"https://registry.npmjs.org/@0xbarandiaran/spotify-mcp-server/-/spotify-mcp-server-2.0.2.tgz","fileCount":10,"integrity":"sha512-yS5AFIoFdoVI6O5LEK/MSqRcv+1yulmmNFxtP1xCpFznh/WMZSRW84uVnp4dNUveAt3Bplz4muJRpjKw2do9vg==","signatures":[{"sig":"MEUCIFHRwc3Ft0bQLgvWvaDcwXnlzqD36Nt4ISg0SuIX/DTGAiEA/XwGgUqNR0SQjdJnAB+RS8lCDZT3zMTuHkVV9zlpLuU=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":73805},"main":"build/index.js","type":"module","engines":{"node":">=18.0.0"},"gitHead":"8bbefe80882376ef2bb8baf98fdd212ade0c5e08","scripts":{"auth":"tsc && node build/auth.js","lint":"biome check --diagnostic-level=warn --error-on-warnings","build":"tsc && node -e \"require('fs').chmodSync('build/index.js', '755'); require('fs').chmodSync('build/auth.js', '755');\"","lint:fix":"biome check --write --unsafe --organize-imports-enabled=true","typecheck":"tsc --noEmit","prepublishOnly":"npm run build"},"_npmUser":{"name":"gabrielbarandiaran","email":"pr.barandiaran@gmail.com"},"repository":{"url":"git+https://github.com/marcelmarais/spotify-mcp-server.git","type":"git"},"_npmVersion":"11.6.2","description":"A Model Context Protocol server for Spotify integration - Updated for Spotify's February 2026 API migration","directories":{},"_nodeVersion":"24.12.0","dependencies":{"zod":"^3.24.2","open":"^10.1.0","@modelcontextprotocol/sdk":"^1.10.1"},"_hasShrinkwrap":false,"devDependencies":{"typescript":"^5.8.2","@types/node":"^22.13.8","@biomejs/biome":"^1.9.4"},"_npmOperationalInternal":{"tmp":"tmp/spotify-mcp-server_2.0.2_1772123319439_0.7220267391995006","host":"s3://npm-registry-packages-npm-production"}},"2.0.3":{"name":"@0xbarandiaran/spotify-mcp-server","version":"2.0.3","keywords":["spotify","mcp","model-context-protocol","claude","ai","music","playback","playlist"],"author":{"name":"Marcel Marais"},"license":"MIT","_id":"@0xbarandiaran/spotify-mcp-server@2.0.3","maintainers":[{"name":"gabrielbarandiaran","email":"pr.barandiaran@gmail.com"}],"homepage":"https://github.com/marcelmarais/spotify-mcp-server#readme","bugs":{"url":"https://github.com/marcelmarais/spotify-mcp-server/issues"},"bin":{"spotify-mcp":"build/index.js","spotify-mcp-auth":"build/auth.js","spotify-mcp-server":"build/index.js"},"dist":{"shasum":"7a40f3f06bde9136a3bb65f316c7a99b1608393b","tarball":"https://registry.npmjs.org/@0xbarandiaran/spotify-mcp-server/-/spotify-mcp-server-2.0.3.tgz","fileCount":10,"integrity":"sha512-HcoLmx/SNamEMEnIwejn3R+U4haDgnh++jm7lvc2fuYH6dNgjOSqyVkcXw/p3SzyvhUbbkaBp6UvqVcFeJxhRQ==","signatures":[{"sig":"MEUCIQDYwzFb5z2Tl9Lt8JvZ8Kd6Elp+A+3oStMaU2zesG1ZzwIgcaJD/3LtHQ7KX+GqfdbQEDCaOVn9p1CghpUggyPtwZU=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":74014},"main":"build/index.js","type":"module","engines":{"node":">=18.0.0"},"gitHead":"8fd258e5bdeeaece4b0a2d8b5c7b5270e11882b1","scripts":{"auth":"tsc && node build/auth.js","lint":"biome check --diagnostic-level=warn --error-on-warnings","build":"tsc && node -e \"require('fs').chmodSync('build/index.js', '755'); require('fs').chmodSync('build/auth.js', '755');\"","lint:fix":"biome check --write --unsafe --organize-imports-enabled=true","typecheck":"tsc --noEmit","prepublishOnly":"npm run build"},"_npmUser":{"name":"gabrielbarandiaran","email":"pr.barandiaran@gmail.com"},"repository":{"url":"git+https://github.com/marcelmarais/spotify-mcp-server.git","type":"git"},"_npmVersion":"11.6.2","description":"A Model Context Protocol server for Spotify integration - Updated for Spotify's February 2026 API migration","directories":{},"_nodeVersion":"24.12.0","dependencies":{"zod":"^3.24.2","open":"^10.1.0","@modelcontextprotocol/sdk":"^1.10.1"},"_hasShrinkwrap":false,"devDependencies":{"typescript":"^5.8.2","@types/node":"^22.13.8","@biomejs/biome":"^1.9.4"},"_npmOperationalInternal":{"tmp":"tmp/spotify-mcp-server_2.0.3_1772123660480_0.8792959304845256","host":"s3://npm-registry-packages-npm-production"}},"2.0.4":{"name":"@0xbarandiaran/spotify-mcp-server","version":"2.0.4","keywords":["spotify","mcp","model-context-protocol","claude","ai","music","playback","playlist"],"author":{"name":"Marcel Marais"},"license":"MIT","_id":"@0xbarandiaran/spotify-mcp-server@2.0.4","maintainers":[{"name":"gabrielbarandiaran","email":"pr.barandiaran@gmail.com"}],"homepage":"https://github.com/marcelmarais/spotify-mcp-server#readme","bugs":{"url":"https://github.com/marcelmarais/spotify-mcp-server/issues"},"bin":{"spotify-mcp":"build/index.js","spotify-mcp-auth":"build/auth.js","spotify-mcp-server":"build/index.js"},"dist":{"shasum":"bb0542173e396a212e921a5f29303804bc6844dc","tarball":"https://registry.npmjs.org/@0xbarandiaran/spotify-mcp-server/-/spotify-mcp-server-2.0.4.tgz","fileCount":10,"integrity":"sha512-I+lmhePSCdgN07/64u8dgdN46Sts4HwwVPZEb4VsRicuFDyXlVD0C6yPcOERA9M5CqarRvC/V2wojZnn9FNlxw==","signatures":[{"sig":"MEQCIFXr7wNzmwIKj0o3ylyMrUwKD4CxzPSlIPj9hRnGUOftAiArBBONmn/Uu30B/t6LfIuWmBUHh2hHn3CuugAHRNxjqw==","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":73913},"main":"build/index.js","type":"module","engines":{"node":">=18.0.0"},"gitHead":"24b2a48a794ca7eb55ec6487d5d4aa7941e00f27","scripts":{"auth":"tsc && node build/auth.js","lint":"biome check --diagnostic-level=warn --error-on-warnings","build":"tsc && node -e \"require('fs').chmodSync('build/index.js', '755'); require('fs').chmodSync('build/auth.js', '755');\"","lint:fix":"biome check --write --unsafe --organize-imports-enabled=true","typecheck":"tsc --noEmit","prepublishOnly":"npm run build"},"_npmUser":{"name":"gabrielbarandiaran","email":"pr.barandiaran@gmail.com"},"repository":{"url":"git+https://github.com/marcelmarais/spotify-mcp-server.git","type":"git"},"_npmVersion":"11.6.2","description":"A Model Context Protocol server for Spotify integration - Updated for Spotify's February 2026 API migration","directories":{},"_nodeVersion":"24.12.0","dependencies":{"zod":"^3.24.2","open":"^10.1.0","@modelcontextprotocol/sdk":"^1.10.1"},"_hasShrinkwrap":false,"devDependencies":{"typescript":"^5.8.2","@types/node":"^22.13.8","@biomejs/biome":"^1.9.4"},"_npmOperationalInternal":{"tmp":"tmp/spotify-mcp-server_2.0.4_1772123813715_0.7565094513346893","host":"s3://npm-registry-packages-npm-production"}},"2.0.5":{"type":"module","name":"@0xbarandiaran/spotify-mcp-server","version":"2.0.5","main":"build/index.js","bin":{"spotify-mcp-server":"build/index.js","spotify-mcp":"build/index.js","spotify-mcp-auth":"build/auth.js"},"scripts":{"build":"tsc && node -e \"require('fs').chmodSync('build/index.js', '755'); require('fs').chmodSync('build/auth.js', '755');\"","auth":"tsc && node build/auth.js","lint":"biome check --diagnostic-level=warn --error-on-warnings","lint:fix":"biome check --write --unsafe --organize-imports-enabled=true","typecheck":"tsc --noEmit","prepublishOnly":"npm run build"},"keywords":["spotify","mcp","model-context-protocol","claude","ai","music","playback","playlist"],"author":{"name":"Marcel Marais"},"license":"MIT","repository":{"type":"git","url":"git+https://github.com/marcelmarais/spotify-mcp-server.git"},"bugs":{"url":"https://github.com/marcelmarais/spotify-mcp-server/issues"},"homepage":"https://github.com/marcelmarais/spotify-mcp-server#readme","engines":{"node":">=18.0.0"},"description":"A Model Context Protocol server for Spotify integration - Updated for Spotify's February 2026 API migration","dependencies":{"@modelcontextprotocol/sdk":"^1.10.1","open":"^10.1.0","zod":"^3.24.2"},"devDependencies":{"@biomejs/biome":"^1.9.4","@types/node":"^22.13.8","typescript":"^5.8.2"},"gitHead":"b6da19c55ed5c19aeaf69f2a60cf64df3a8931b2","_id":"@0xbarandiaran/spotify-mcp-server@2.0.5","_nodeVersion":"24.12.0","_npmVersion":"11.6.2","dist":{"integrity":"sha512-gyZOnZpVFW/HezY8t7eIsq4rqjHSDvzhdY6EKS08q49qqqrM0hbgAwpdwzUMxrTQRjdW0Leon/UZfElavu6rEg==","shasum":"b2add593e89e3831130e3e3cf66ca8aca2342497","tarball":"https://registry.npmjs.org/@0xbarandiaran/spotify-mcp-server/-/spotify-mcp-server-2.0.5.tgz","fileCount":10,"unpackedSize":73610,"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEUCIQCGTadLyFI99joLRdQkIa+7iEnKoMlq40UybBL1SY/7eAIgIj170Y4yaygdGoH3jmoTGGpGoaU6cO4M1wXjKYVwjZo="}]},"_npmUser":{"name":"gabrielbarandiaran","email":"pr.barandiaran@gmail.com"},"directories":{},"maintainers":[{"name":"gabrielbarandiaran","email":"pr.barandiaran@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/spotify-mcp-server_2.0.5_1772123898508_0.13904971371378405"},"_hasShrinkwrap":false}},"time":{"created":"2026-02-26T16:18:08.149Z","modified":"2026-02-26T16:38:18.796Z","2.0.0":"2026-02-26T16:18:08.366Z","2.0.1":"2026-02-26T16:23:20.014Z","2.0.2":"2026-02-26T16:28:39.577Z","2.0.3":"2026-02-26T16:34:20.622Z","2.0.4":"2026-02-26T16:36:53.855Z","2.0.5":"2026-02-26T16:38:18.655Z"},"bugs":{"url":"https://github.com/marcelmarais/spotify-mcp-server/issues"},"author":{"name":"Marcel Marais"},"license":"MIT","homepage":"https://github.com/marcelmarais/spotify-mcp-server#readme","keywords":["spotify","mcp","model-context-protocol","claude","ai","music","playback","playlist"],"repository":{"type":"git","url":"git+https://github.com/marcelmarais/spotify-mcp-server.git"},"description":"A Model Context Protocol server for Spotify integration - Updated for Spotify's February 2026 API migration","maintainers":[{"name":"gabrielbarandiaran","email":"pr.barandiaran@gmail.com"}],"readme":"<div align=\"center\" style=\"display: flex; align-items: center; justify-content: center; gap: 10px;\">\n<img src=\"https://upload.wikimedia.org/wikipedia/commons/8/84/Spotify_icon.svg\" width=\"30\" height=\"30\">\n<h1>Spotify MCP Server</h1>\n</div>\n\nA lightweight [Model Context Protocol (MCP)](https://modelcontextprotocol.io) server that enables AI assistants like Cursor & Claude to control Spotify playback and manage playlists.\n\n> **Note**: This version (2.0.x) has been updated to comply with [Spotify's February 2026 API migration](https://developer.spotify.com/documentation/web-api/tutorials/february-2026-migration-guide). The server now uses direct HTTP calls to the new Spotify API endpoints instead of the deprecated SDK.\n\n<details>\n<summary>Contents</summary>\n\n- [Quick Start](#quick-start)\n- [Example Interactions](#example-interactions)\n- [Tools](#tools)\n  - [Read Operations](#read-operations)\n  - [Album Operations](#album-operations)\n  - [Play / Create Operations](#play--create-operations)\n- [Setup](#setup)\n  - [Prerequisites](#prerequisites)\n  - [Creating a Spotify Developer Application](#creating-a-spotify-developer-application)\n  - [Configuration](#configuration)\n  - [Authentication](#authentication)\n- [Integrating with Claude Desktop, Cursor, and VsCode (Cline)](#integrating-with-claude-desktop-cursor-and-vscode-cline)\n</details>\n\n## Quick Start\n\n```bash\n# 1. Create config directory and file\nmkdir -p ~/.spotify-mcp\ncat > ~/.spotify-mcp/config.json << 'EOF'\n{\n  \"clientId\": \"YOUR_SPOTIFY_CLIENT_ID\",\n  \"clientSecret\": \"YOUR_SPOTIFY_CLIENT_SECRET\",\n  \"redirectUri\": \"http://127.0.0.1:8888/callback\"\n}\nEOF\n\n# 2. Authenticate with Spotify (opens browser)\nnpx @0xbarandiaran/spotify-mcp-server auth\n\n# 3. Add to your Claude/Cursor config and restart\n```\n\nSee [Creating a Spotify Developer Application](#creating-a-spotify-developer-application) to get your Client ID and Secret.\n\n## Example Interactions\n\n- _\"Play Elvis's first song\"_\n- _\"Create a Taylor Swift / Slipknot fusion playlist\"_\n- _\"Copy all the techno tracks from my workout playlist to my work playlist\"_\n- _\"Turn the volume down a bit\"_\n\n## Tools\n\n### Read Operations\n\n1. **searchSpotify**\n\n   - **Description**: Search for tracks, albums, artists, or playlists on Spotify\n   - **Parameters**:\n     - `query` (string): The search term\n     - `type` (string): Type of item to search for (track, album, artist, playlist)\n     - `limit` (number, optional): Maximum number of results to return (1-10, max 10 due to API limits)\n   - **Returns**: List of matching items with their IDs, names, and additional details\n   - **Example**: `searchSpotify(\"bohemian rhapsody\", \"track\", 10)`\n\n2. **getNowPlaying**\n\n   - **Description**: Get information about the currently playing track on Spotify, including device and volume info\n   - **Parameters**: None\n   - **Returns**: Object containing track name, artist, album, playback progress, duration, playback state, device info, volume, and shuffle/repeat status\n   - **Example**: `getNowPlaying()`\n\n3. **getMyPlaylists**\n\n   - **Description**: Get a list of the current user's playlists on Spotify\n   - **Parameters**:\n     - `limit` (number, optional): Maximum number of playlists to return (default: 20)\n     - `offset` (number, optional): Index of the first playlist to return (default: 0)\n   - **Returns**: Array of playlists with their IDs, names, track counts, and public status\n   - **Example**: `getMyPlaylists(10, 0)`\n\n4. **getPlaylistTracks**\n\n   - **Description**: Get a list of tracks in a specific Spotify playlist\n   - **Parameters**:\n     - `playlistId` (string): The Spotify ID of the playlist\n     - `limit` (number, optional): Maximum number of tracks to return (default: 100)\n     - `offset` (number, optional): Index of the first track to return (default: 0)\n   - **Returns**: Array of tracks with their IDs, names, artists, album, duration, and added date\n   - **Example**: `getPlaylistTracks(\"37i9dQZEVXcJZyENOWUFo7\")`\n\n5. **getRecentlyPlayed**\n\n   - **Description**: Retrieves a list of recently played tracks from Spotify.\n   - **Parameters**:\n     - `limit` (number, optional): A number specifying the maximum number of tracks to return.\n   - **Returns**: If tracks are found it returns a formatted list of recently played tracks else a message stating: \"You don't have any recently played tracks on Spotify\".\n   - **Example**: `getRecentlyPlayed({ limit: 10 })`\n\n6. **getUsersSavedTracks**\n\n   - **Description**: Get a list of tracks saved in the user's \"Liked Songs\" library\n   - **Parameters**:\n     - `limit` (number, optional): Maximum number of tracks to return (1-50, default: 50)\n     - `offset` (number, optional): Offset for pagination (0-based index, default: 0)\n   - **Returns**: Formatted list of saved tracks with track names, artists, duration, track IDs, and when they were added to Liked Songs. Shows pagination info (e.g., \"1-20 of 150\").\n   - **Example**: `getUsersSavedTracks({ limit: 20, offset: 0 })`\n\n7. **getQueue**\n\n   - **Description**: Get the currently playing track and upcoming items in the Spotify queue\n   - **Parameters**:\n     - `limit` (number, optional): Maximum number of upcoming items to show (1-50, default: 10)\n   - **Returns**: Currently playing track and list of upcoming tracks in the queue\n   - **Example**: `getQueue({ limit: 20 })`\n\n8. **getAvailableDevices**\n\n   - **Description**: Get information about the user's available Spotify Connect devices\n   - **Parameters**: None\n   - **Returns**: List of available devices with name, type, active status, volume, and device ID\n   - **Example**: `getAvailableDevices()`\n\n\n### Play / Create Operations\n\n1. **playMusic**\n\n   - **Description**: Start playing a track, album, artist, or playlist on Spotify\n   - **Parameters**:\n     - `uri` (string, optional): Spotify URI of the item to play (overrides type and id)\n     - `type` (string, optional): Type of item to play (track, album, artist, playlist)\n     - `id` (string, optional): Spotify ID of the item to play\n     - `deviceId` (string, optional): ID of the device to play on\n   - **Returns**: Success status\n   - **Example**: `playMusic({ uri: \"spotify:track:6rqhFgbbKwnb9MLmUQDhG6\" })`\n   - **Alternative**: `playMusic({ type: \"track\", id: \"6rqhFgbbKwnb9MLmUQDhG6\" })`\n\n2. **pausePlayback**\n\n   - **Description**: Pause the currently playing track on Spotify\n   - **Parameters**:\n     - `deviceId` (string, optional): ID of the device to pause\n   - **Returns**: Success status\n   - **Example**: `pausePlayback()`\n\n3. **resumePlayback**\n\n   - **Description**: Resume Spotify playback on the active device\n   - **Parameters**:\n     - `deviceId` (string, optional): ID of the device to resume playback on\n   - **Returns**: Success status\n   - **Example**: `resumePlayback()`\n\n4. **skipToNext**\n\n   - **Description**: Skip to the next track in the current playback queue\n   - **Parameters**:\n     - `deviceId` (string, optional): ID of the device\n   - **Returns**: Success status\n   - **Example**: `skipToNext()`\n\n5. **skipToPrevious**\n\n   - **Description**: Skip to the previous track in the current playback queue\n   - **Parameters**:\n     - `deviceId` (string, optional): ID of the device\n   - **Returns**: Success status\n   - **Example**: `skipToPrevious()`\n\n6. **createPlaylist**\n\n   - **Description**: Create a new playlist on Spotify\n   - **Parameters**:\n     - `name` (string): Name for the new playlist\n     - `description` (string, optional): Description for the playlist\n     - `public` (boolean, optional): Whether the playlist should be public (default: false)\n   - **Returns**: Object with the new playlist's ID and URL\n   - **Example**: `createPlaylist({ name: \"Workout Mix\", description: \"Songs to get pumped up\", public: false })`\n\n7. **addTracksToPlaylist**\n\n   - **Description**: Add tracks to an existing Spotify playlist\n   - **Parameters**:\n     - `playlistId` (string): ID of the playlist\n     - `trackUris` (array): Array of track URIs or IDs to add\n     - `position` (number, optional): Position to insert tracks\n   - **Returns**: Success status and snapshot ID\n   - **Example**: `addTracksToPlaylist({ playlistId: \"3cEYpjA9oz9GiPac4AsH4n\", trackUris: [\"spotify:track:4iV5W9uYEdYUVa79Axb7Rh\"] })`\n\n8. **addToQueue**\n\n   - **Description**: Adds a track, album, artist or playlist to the current playback queue\n   - **Parameters**:\n     - `uri` (string, optional): Spotify URI of the item to add to queue (overrides type and id)\n     - `type` (string, optional): Type of item to queue (track, album, artist, playlist)\n     - `id` (string, optional): Spotify ID of the item to queue\n     - `deviceId` (string, optional): ID of the device to queue on\n   - **Returns**: Success status\n   - **Example**: `addToQueue({ uri: \"spotify:track:6rqhFgbbKwnb9MLmUQDhG6\" })`\n   - **Alternative**: `addToQueue({ type: \"track\", id: \"6rqhFgbbKwnb9MLmUQDhG6\" })`\n\n9. **setVolume**\n\n   - **Description**: Set the playback volume to a specific percentage (requires Spotify Premium)\n   - **Parameters**:\n     - `volumePercent` (number): The volume to set (0-100)\n     - `deviceId` (string, optional): ID of the device to set volume on\n   - **Returns**: Success status with the new volume level\n   - **Example**: `setVolume({ volumePercent: 50 })`\n\n10. **adjustVolume**\n\n   - **Description**: Adjust the playback volume up or down by a relative amount (requires Spotify Premium)\n   - **Parameters**:\n     - `adjustment` (number): The amount to adjust volume by (-100 to 100). Positive values increase volume, negative values decrease it.\n     - `deviceId` (string, optional): ID of the device to adjust volume on\n   - **Returns**: Success status showing the volume change (e.g., \"Volume increased from 50% to 60%\")\n   - **Example**: `adjustVolume({ adjustment: 10 })` (increase by 10%)\n   - **Example**: `adjustVolume({ adjustment: -20 })` (decrease by 20%)\n\n\n### Album Operations\n\n1. **getAlbums**\n\n   - **Description**: Get detailed information about one or more albums by their Spotify IDs\n   - **Parameters**:\n     - `albumIds` (string|array): A single album ID or array of album IDs (max 20)\n   - **Returns**: Album details including name, artists, release date, type, total tracks, and ID. For single album returns detailed view, for multiple albums returns summary list.\n   - **Example**: `getAlbums(\"4aawyAB9vmqN3uQ7FjRGTy\")` or `getAlbums([\"4aawyAB9vmqN3uQ7FjRGTy\", \"1DFixLWuPkv3KT3TnV35m3\"])`\n\n2. **getAlbumTracks**\n\n   - **Description**: Get tracks from a specific album with pagination support\n   - **Parameters**:\n     - `albumId` (string): The Spotify ID of the album\n     - `limit` (number, optional): Maximum number of tracks to return (1-50)\n     - `offset` (number, optional): Offset for pagination (0-based index)\n   - **Returns**: List of tracks from the album with track names, artists, duration, and IDs. Shows pagination info.\n   - **Example**: `getAlbumTracks(\"4aawyAB9vmqN3uQ7FjRGTy\", 10, 0)`\n\n3. **saveOrRemoveAlbumForUser**\n\n   - **Description**: Save or remove albums from the user's \"Your Music\" library\n   - **Parameters**:\n     - `albumIds` (array): Array of Spotify album IDs (max 20)\n     - `action` (string): Action to perform: \"save\" or \"remove\"\n   - **Returns**: Success status with confirmation message\n   - **Example**: `saveOrRemoveAlbumForUser([\"4aawyAB9vmqN3uQ7FjRGTy\"], \"save\")`\n\n4. **checkUsersSavedAlbums**\n\n   - **Description**: Check if albums are saved in the user's \"Your Music\" library\n   - **Parameters**:\n     - `albumIds` (array): Array of Spotify album IDs to check (max 20)\n   - **Returns**: Status of each album (saved or not saved)\n   - **Example**: `checkUsersSavedAlbums([\"4aawyAB9vmqN3uQ7FjRGTy\", \"1DFixLWuPkv3KT3TnV35m3\"])`\n\n## Setup\n\n### Prerequisites\n\n- Node.js v18+\n- A Spotify Premium account (required for the app owner due to [Spotify API changes](https://developer.spotify.com/documentation/web-api/tutorials/february-2026-migration-guide))\n- A registered Spotify Developer application\n\n> **Important**: As of February 2026, Spotify requires the app owner to maintain an active Spotify Premium subscription for Development Mode apps. The app will stop functioning if the Premium subscription lapses.\n\n### Creating a Spotify Developer Application\n\n1. Go to the [Spotify Developer Dashboard](https://developer.spotify.com/dashboard/)\n2. Log in with your Spotify account\n3. Click the \"Create an App\" button\n4. Fill in the app name and description\n5. Accept the Terms of Service and click \"Create\"\n6. In your new app's dashboard, you'll see your **Client ID**\n7. Click \"Show Client Secret\" to reveal your **Client Secret**\n8. Click \"Edit Settings\" and add a Redirect URI: `http://127.0.0.1:8888/callback`\n9. Save your changes\n\n### Configuration\n\nThe server looks for configuration in these locations (in order):\n\n1. `~/.spotify-mcp/config.json` (recommended for npx users)\n2. `./spotify-config.json` (current directory, for local development)\n\nCreate your config file:\n\n```bash\n# Create the config directory\nmkdir -p ~/.spotify-mcp\n\n# Create the config file\ncat > ~/.spotify-mcp/config.json << 'EOF'\n{\n  \"clientId\": \"your-client-id\",\n  \"clientSecret\": \"your-client-secret\",\n  \"redirectUri\": \"http://127.0.0.1:8888/callback\"\n}\nEOF\n```\n\nOr if you prefer, edit `~/.spotify-mcp/config.json` manually with your favorite editor.\n\n### Authentication\n\nThe Spotify API uses OAuth 2.0 for authentication. Run the authentication command:\n\n```bash\n# Using npx (recommended)\nnpx @0xbarandiaran/spotify-mcp-server auth\n\n# Or if cloned locally\nnpm run auth\n```\n\nThis will:\n1. Open your browser to Spotify's authorization page\n2. After you approve, capture the authorization code\n3. Exchange it for access and refresh tokens\n4. Save the tokens to your config file\n\nYour config file will now include the tokens:\n\n```json\n{\n  \"clientId\": \"your-client-id\",\n  \"clientSecret\": \"your-client-secret\",\n  \"redirectUri\": \"http://127.0.0.1:8888/callback\",\n  \"accessToken\": \"BQAi9Pn...kKQ\",\n  \"refreshToken\": \"AQDQcj...7w\",\n  \"expiresAt\": 1677889354671\n}\n```\n\n**Automatic Token Refresh**: The server automatically refreshes the access token when it expires (typically after 1 hour). If refresh fails, run the auth command again.\n\n## Integrating with Claude Desktop, Cursor, and VsCode (Cline)\n\n### Claude Desktop / Claude Code\n\nAdd to your Claude configuration file:\n- **macOS**: `~/Library/Application Support/Claude/claude_desktop_config.json`\n- **Windows**: `%APPDATA%\\Claude\\claude_desktop_config.json`\n\n```json\n{\n  \"mcpServers\": {\n    \"spotify\": {\n      \"command\": \"npx\",\n      \"args\": [\"-y\", \"@0xbarandiaran/spotify-mcp-server\"]\n    }\n  }\n}\n```\n\nThen restart Claude Desktop.\n\n### Cursor\n\nGo to the MCP tab in `Cursor Settings` (command + shift + J). Add a server with this command:\n\n```bash\nnpx -y @0xbarandiaran/spotify-mcp-server\n```\n\n### Cline (VS Code Extension)\n\nAdd to your `cline_mcp_settings.json`:\n\n```json\n{\n  \"mcpServers\": {\n    \"spotify\": {\n      \"command\": \"npx\",\n      \"args\": [\"-y\", \"@0xbarandiaran/spotify-mcp-server\"],\n      \"autoApprove\": [\"getNowPlaying\", \"getMyPlaylists\", \"searchSpotify\"]\n    }\n  }\n}\n```\n\n## Development\n\n### Building from source\n\n```bash\ngit clone https://github.com/gabrielbarandiaran/spotify-mcp-server.git\ncd spotify-mcp-server\nnpm install\nnpm run build\n```\n\n### Running locally\n\n```bash\n# Run the MCP server\nnode build/index.js\n\n# Run authentication\nnode build/auth.js\n```\n\n## License\n\nMIT\n","readmeFilename":"README.md"}