home / mcp / spotify bulk actions mcp server
Provides bulk Spotify operations including library exports, batch playlist creation, and large-scale library management via MCP.
Configuration
View docs{
"mcpServers": {
"khglynn-spotify-bulk-actions-mcp": {
"command": "/path/to/spotify-bulk-actions-mcp/venv/bin/python",
"args": [
"/path/to/spotify-bulk-actions-mcp/src/server.py"
]
}
}
}This Spotify Bulk Actions MCP server enables bulk Spotify operations through a Model Context Protocol interface, focusing on batch playlist creation, library exports, and large-scale library management. It emphasizes confidence scoring for bulk searches, human-in-the-loop review for uncertain matches, and built-in rate limiting to efficiently handle 500+ song operations while exporting and importing library data as needed.
You will use an MCP client to connect to this server and perform bulk Spotify tasks. Start by authenticating with Spotify, then run the MCP server locally and connect to it from your MCP client. You can fetch your library, run batch searches with confidence scores, and create playlists from search results. For uncertain matches, review and import them back into your library.
Prerequisites: ensure you have Python 3.10 or newer and a Spotify account. You also need Spotify Developer credentials.
1. Clone the project and enter the directory.
# Clone the repo
git clone https://github.com/khglynn/spotify-bulk-actions-mcp.git
cd spotify-bulk-actions-mcp2. Create and activate a virtual environment, then install in editable mode.
# Create and activate virtual environment
python -m venv venv
source venv/bin/activate # On Windows: venv\Scripts\activate
# Install the package
pip install -e .3. Prepare environment variables. Copy the example and edit with your Spotify credentials.
cp .env.example .env
# Edit .env to set SPOTIFY_CLIENT_ID and SPOTIFY_CLIENT_SECRET4. Authenticate with Spotify one time to obtain and store tokens.
python setup_auth.py
```
After login, tokens are saved locally in the .spotify_cache directory.5. Run a quick check to ensure authentication is active.
source venv/bin/activate
python -c "from src.utils.auth import is_authenticated; print('Auth OK!' if is_authenticated() else 'Not authenticated')"You connect a client to the MCP server using a local stdio configuration. The README provides a ready-made setup for Claude Code that demonstrates how to link to the local Python runtime and the server script.
{
"mcpServers": {
"spotify": {
"command": "/path/to/spotify-bulk-actions-mcp/venv/bin/python",
"args": ["/path/to/spotify-bulk-actions-mcp/src/server.py"]
}
}
}If you use Claude Code, add the following configuration to your settings to connect to the local MCP server.
{
"mcpServers": {
"spotify": {
"command": "/path/to/spotify-bulk-actions-mcp/venv/bin/python",
"args": ["/path/to/spotify-bulk-actions-mcp/src/server.py"]
}
}
}Verify Spotify authentication is functioning correctly for the connected MCP session.
Retrieve all artists you currently follow in Spotify.
Fetch all your liked songs from your Spotify library.
List artists from saved tracks, ranked by how many songs you have for each artist.
Find albums that contain at least a specified number of saved songs.
Export a comprehensive summary of your saved/library data.
Search for a single track by title and artist.
Perform a broader search when exact matches are not found.
Search multiple tracks in bulk and return confidence scores per match.
Obtain a 30-second preview URL for a track.
Create a new playlist in your Spotify account.
Add tracks to an existing playlist.
Process a CSV to create a new playlist from listed tracks.
Create a playlist directly from a set of search results.
Add corrected or reviewed tracks back into a playlist or library.
Fetch details about a specified playlist.
Validate and parse a CSV of songs to be processed.
Export uncertain matches for review and correction.