Spotify Mcp Server — independently scanned and version-tracked by SaferSkills.
SaferSkills independently audited Spotify Mcp Server (Agent Skill) and scored it 100/100 (green). The audit ran 55 deterministic rules across Security, Supply Chain, Maintenance, Transparency, and Community; it found 0 high-severity and 0 lower-severity findings. The full rule-by-rule trace and per-finding evidence are below. Free, methodology-open.
Findings & checks · 0 flagged
Every scanned point with the score it earned and what moved between them.
First recorded scan — no prior version to compare against.
The primary manifest — the file an agent reads to learn what this artifact does.
A comprehensive Model Context Protocol (MCP) server that provides seamless integration with Spotify's Web API. This server enables AI assistants and other MCP clients to interact with Spotify for music search, playback control, playlist management, library operations, and user profile access.
http://localhost:8080 (for local OAuth flow) git clone <repository-url>
cd spotify-mcp-server
# Copy environment template
cp .env.example .envEdit .env file with your Spotify credentials:
SPOTIFY_CLIENT_ID=your_actual_client_id
SPOTIFY_CLIENT_SECRET=your_actual_client_secret # Build the Docker image
docker-compose build
# Start the server
docker-compose up -d
# View logs
docker-compose logs -f spotify-mcp-server # Clone repository
git clone <repository-url>
cd spotify-mcp-server
# Create virtual environment
python -m venv venv
source venv/bin/activate # On Windows: venv\\Scripts\\activate
# Install dependencies
pip install -r requirements.txt export SPOTIFY_CLIENT_ID="your_client_id"
export SPOTIFY_CLIENT_SECRET="your_client_secret" # Direct execution
python run_server.py
# Or as module
python -m src.serverAdd to your Claude Desktop configuration (~/AppData/Roaming/Claude/config.json on Windows or ~/Library/Application Support/Claude/config.json on macOS):
{
"mcpServers": {
"spotify": {
"command": "python",
"args": ["/path/to/spotify-mcp-server/run_server.py"],
"env": {
"SPOTIFY_CLIENT_ID": "your_client_id",
"SPOTIFY_CLIENT_SECRET": "your_client_secret"
}
}
}
}{
"mcpServers": {
"spotify": {
"command": "docker",
"args": [
"run",
"--rm",
"-i",
"-e",
"SPOTIFY_CLIENT_ID=your_client_id",
"-e",
"SPOTIFY_CLIENT_SECRET=your_client_secret",
"spotify-mcp-server"
]
}
}
}#### search_tracks
Search for music tracks
#### search_artists
Find artists and bands
#### search_albums
Discover albums and compilations
#### search_playlists
Find public playlists
#### get_current_playback
Get current playback status and track information
#### play_music
Start or resume playback
#### pause_music
Pause current playback
#### next_track
Skip to next track
#### previous_track
Skip to previous track
#### set_volume
Control playback volume
#### get_user_playlists
List user's playlists
#### create_playlist
Create a new playlist
#### add_tracks_to_playlist
Add tracks to a playlist
#### remove_tracks_from_playlist
Remove tracks from a playlist
#### get_saved_tracks
Get user's saved/liked tracks
#### save_tracks
Save tracks to user's library
#### remove_saved_tracks
Remove tracks from user's library
#### get_top_tracks
Get user's most played tracks
#### get_top_artists
Get user's favorite artists
#### get_recently_played
Get recently played tracks
# Search for tracks
search_tracks(query="bohemian rhapsody queen")
# Play specific track
play_music(track_uris=["spotify:track:4u7EnebtmKWzUH433cf5Qv"])
# Control playback
pause_music()
next_track()
set_volume(volume=75)# Create new playlist
create_playlist(name="My AI Playlist", description="Created by AI assistant")
# Add tracks to playlist
add_tracks_to_playlist(
playlist_id="37i9dQZF1DX0XUsuxWHRQd",
track_uris=["spotify:track:4u7EnebtmKWzUH433cf5Qv"]
)# Get top tracks
get_top_tracks(limit=10, time_range="short_term")
# Get recent history
get_recently_played(limit=20)
# Get favorite artists
get_top_artists(limit=5, time_range="long_term")The server uses Spotify's Authorization Code Flow with PKCE for secure authentication:
The server requests these OAuth scopes for full functionality:
user-read-private - User profile accessuser-read-email - User email (for identification)user-read-playback-state - Current playback informationuser-modify-playback-state - Playback controluser-read-currently-playing - Now playing trackuser-read-recently-played - Listen historyuser-top-read - Top tracks and artistsuser-library-read - Access saved musicuser-library-modify - Modify saved musicplaylist-read-private - Private playlistsplaylist-read-collaborative - Collaborative playlistsplaylist-modify-private - Edit private playlistsplaylist-modify-public - Edit public playlistsstreaming - Playback control┌─────────────────┐ ┌──────────────────┐ ┌─────────────────┐
│ MCP Client │────│ Spotify MCP │────│ Spotify Web │
│ (Claude AI) │ │ Server │ │ API │
└─────────────────┘ └──────────────────┘ └─────────────────┘
│
┌──────▼──────┐
│ Tools & │
│ Capabilities│
└─────────────┘#### Authentication Problems
# Error: "Authentication failed"
# Solution: Check credentials and redirect URI
export SPOTIFY_CLIENT_ID="correct_client_id"
export SPOTIFY_CLIENT_SECRET="correct_client_secret"#### Permission Errors
# Error: "Insufficient scope"
# Solution: Ensure all required scopes are approved
# Check your Spotify app settings and re-authenticate#### Playback Issues
# Error: "No active device"
# Solution: Start Spotify on any device before controlling playback
# The device must be active for remote controlEnable verbose logging:
# Set environment variable
export LOG_LEVEL=DEBUG
# Or modify server.py logging level
logging.basicConfig(level=logging.DEBUG)# Check container logs
docker-compose logs spotify-mcp-server
# Interactive container debugging
docker-compose exec spotify-mcp-server bash
# Rebuild after changes
docker-compose build --no-cache pip install -r requirements.txt
pip install pytest black flake8 mypy pytest tests/ black src/
flake8 src/
mypy src/spotify-mcp-server/
├── src/
│ ├── __init__.py
│ ├── server.py # Main MCP server
│ ├── spotify_client.py # Spotify API wrapper
│ └── tools.py # MCP tool definitions
├── tests/ # Test suite
├── requirements.txt # Python dependencies
├── Dockerfile # Container definition
├── docker-compose.yml # Container orchestration
├── run_server.py # Entry point script
├── .env.example # Environment template
└── README.md # Documentationgit checkout -b feature/amazing-feature)git commit -m 'Add amazing feature')git push origin feature/amazing-feature)This project is licensed under the MIT License - see the LICENSE file for details.
Happy Music Discovery! 🎵
For support and questions, please open an issue in the repository or consult the Spotify Developer documentation.
~30 seconds. Free. No account. Every finding cites a rule and a line of evidence.