MCP-Spotify
MCP Spotify AI Assistant
Documentation
A Model Context Protocol (MCP) server that enables Claude to control Spotify features.
Contents
Example Interactions
- _"Can you add the top 5 Coldplay songs to my playlist vibes"_
- _"What are my most listened to songs this past month"_
- _"Can you shuffle play my top songs"_
Tools
Read Operations
1. searchSpotify
2. getTopItems
3. getMyPlaylists
4. getPlaylistItems
5. getCurrentUserProfile
6. getCurrentlyPlaying
7. getRecentlyPlayedTracks
8. getUserQueue
Write Operations
1. startPlayback
2. resumePlayback
3. pausePlayback
4. addQueue
5. togglePlaybackShuffle
6. createPlaylist
7. addItemsToPlaylist
7. changePlaylistDetails
Setup
Prerequisites
- Node.js v16+
- A Spotify Premium account
- A registered Spotify Developer application
Installation
git clone https://github.com/iankan04/MCP-Spotify.git
cd mcp-spotify
npm install
npm run buildCreating a Spotify Developer Application
1. Go to the Spotify Developer Dashboard
2. Log in with your Spotify account
3. Click the "Create an App" button
4. Fill in the app name and description
5. Accept the Terms of Service and click "Create"
6. In your new app's dashboard, you'll see your Client ID
7. Click "Show Client Secret" to reveal your Client Secret
8. Click "Edit Settings" and add a Redirect URI (e.g., `http://localhost:8000/callback`)
9. Save your changes
Spotify API Configuration
Create a `.env.local` file in the project root (you can copy and modify the provided example):
SPOTIFY_CLIENT_ID='Your client_id'
SPOTIFY_CLIENT_SECRET='Your client_secret'
SPOTIFY_REDIRECT_URI='Your redirect_uri (i.e. http://127.0.0.1:8000/callback'Make sure your redirect_uri follows the newest Spotify Developer Settings.
Authentication Process
The Spotify API uses OAuth 2.0 for authentication. Follow these steps to authenticate your application:
1. Open two terminal screens. In one, run
redis-serverIn the other, run
npm run auth2. The script will generate an authorization URL. Open this URL in your web browser.
3. You'll be prompted to log in to Spotify and authorize your application.
4. After authorization, Spotify will redirect you to your specified redirect URI with a code parameter in the URL.
5. The authentication script will automatically exchange this code for access and refresh tokens.
6. These tokens will be saved to the Redis database and automatically refreshed when called
Integrating with Claude Desktop
To use your MCP server with Claude Desktop, add it to your Claude configuration:
{
"mcpServers": {
"spotify": {
"command": "node",
"args": ["MCP-Spotify/build/index.js"]
}
}
}If Claude is running, restart the application, and you should see "spotify" as a new tool
Frequently asked questions
What is MCP-Spotify?
MCP-Spotify is MCP Spotify AI Assistant
How do I install MCP-Spotify?
Open the GitHub repository and follow its README. Most MCP servers are added to your client's MCP config, then called by your agent.
Is MCP-Spotify open source?
Yes — it is hosted on GitHub at https://github.com/iankan04/MCP-Spotify and has 1 stars.
Related MCP tools
🔥 Official Firecrawl MCP Server - Adds powerful web scraping and search to Cursor, Claude and any other LLM clients.
Use any LLMs (Large Language Models) for Deep Research. Support SSE API and MCP server.
Enhanced MCP server for interactive user feedback and command execution in AI-assisted development, featuring dual interface support (Web UI and Desktop Application) with intelligent environment detection and cross-platform compatibility.
A powerful Zotero AI and MCP plugin with ChatGPT, Gemini 3.7, Claude Fable 5, Claude Opus 5, DeepSeek V4, Grok, OpenRouter, Kimi k3, GLM 5.3, SiliconFlow, GPT-oss, Gemma 4, Qwen 3.8
Connect your browser to AI models. Just use Dia on Chrome, Arc or Firefox.
文颜 MCP Server 可以让 AI 自动将 Markdown 文章排版后发布至微信公众号。
Run your own MCP server? See who uses it and what to fix.
Measure it with TrackMCP