spotify-mcp
Provides tools for interacting with Spotify's catalog and user account, enabling search of tracks by track, artist, or album terms and retrieval of a connected user's recently played listening history.
This server does not currently have a deployable release on Glama. Follow the repository's setup instructions to install and configure it for your MCP client, including any required credentials and local dependencies.
Spotify MCP
A Model Context Protocol (MCP) server that lets an MCP client search Spotify's track catalog and access the connected user's recently played tracks.
Requirements
Node.js and npm
A Spotify account
A Spotify app created in the Spotify Developer Dashboard
In your Spotify app settings, add this exact Redirect URI:
http://127.0.0.1:8080/callbackThe server uses Spotify's client credentials flow to search the catalog, and
OAuth authorization with the user-read-recently-played permission to read
listening history.
Related MCP server: Spotify MCP Server (Python)
Setup
Install dependencies and compile the TypeScript source:
npm ci npm run buildProvide your Spotify app's client ID and client secret to the MCP server as
SPOTIFY_CLIENT_IDandSPOTIFY_CLIENT_SECRET.This repository includes a VS Code MCP configuration at
.vscode/mcp.json. When VS Code prompts for the server inputs, enter the client ID and secret from your Spotify app. The secret input is masked.For another MCP client, configure a stdio server that runs
node /absolute/path/to/spotify-mcp/build/index.jsand pass both variables in that server's environment. Do not commit credentials or put them in source files.Start the
spotify-mcpserver from your MCP client. The first time you need listening history, callspotify_connectand open the returned URL in a browser. Once Spotify confirms the connection, return to your MCP client.
The refresh token is saved locally at
~/.config/spotify-mcp/token.json with restrictive file permissions. You
normally only need to connect once; use spotify_connect again if access
needs to be restored.
Available tools
spotify_connect
Starts Spotify account authorization and returns a URL to open in a browser.
The local callback listener uses 127.0.0.1:8080.
search_tracks
Searches Spotify's track catalog by track, artist, or album terms.
query(string, required): Search terms.limit(integer, optional): Number of results, from 1 to 10; defaults to 5.
Requires both Spotify environment variables. Does not require connecting a user account.
get_recently_played
Returns recently played tracks for the connected Spotify account, including artist, play time, and Spotify link.
limit(integer, optional): Number of results, from 1 to 50; defaults to 20.after(integer, optional): Unix timestamp in milliseconds; return plays after this time.before(integer, optional): Unix timestamp in milliseconds; return plays before this time.
Specify at most one of after and before. This tool requires the user to
have completed spotify_connect.
Development
The TypeScript source is in src/; npm run build emits runnable JavaScript
into build/. The server communicates over stdio, so start it through an MCP
client rather than as an interactive command-line application.
License
This project is licensed under the MIT License. See LICENSE.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
Related MCP Connectors
Spotify MCP server for ChatGPT, Claude and any AI agent: search songs and artists, list playlists, read playlist songs, create playlist, add songs to playlist, remove songs from playlist, set playlist public or private and save to Liked Songs in your own Spotify account. Cotlet works in the account through your Cloud Browser, a real Chrome where you sign in to Spotify yourself; Cotlet does not store your password and you need no Spotify API key. About the official Spotify API: Spotify has a full Web API and, since 23 Apr 2026, an official connector for Claude (checked 5 Nov 2026). The API needs an app you register, and in development mode the app owner must have Premium and the app allows 5 users; unlimited users need a registered business with at least 250,000 monthly users. Setup and FAQ: https://cotlet.dev/integrations/spotify-api-mcp-server
Spotify MCP — Web API via client_credentials OAuth
Create, inspect, and manage Wubble music, speech, voice, and sound-effect requests through MCP.
Spotify: Spotify Data API for Millions of songs & podcasts, artists, albums, playlists and more.
Related MCP Servers
- AlicenseNot gradedqualityDmaintenanceEnables control of Spotify playback, track search, and user profile retrieval via MCP tools with automatic OAuth token management.118 npm3MIT
- FlicenseNot gradedqualityDmaintenanceEnables interaction with Spotify through MCP, providing tools for searching tracks, artists, albums, playlists, and accessing user data like top tracks and recently played.-
- FlicenseNot gradedqualityDmaintenanceEnables controlling Spotify playback, managing playlists, searching music, and accessing library features through any MCP-compatible AI client. Provides 34 tools for full Spotify integration.-
- AlicenseAqualityCmaintenanceEnables MCP clients to build and edit Spotify playlists from natural language descriptions.7118 npmMIT