Back to Home
thebigredgeek icon

spotify-mcp-server

Verified Safe

by thebigredgeek

Overview

Controls Spotify playback, search, and device management through natural language prompts via the Model Context Protocol.

Installation

Run Command
npx -y @tbrgeek/spotify-mcp-server

Environment Variables

  • SPOTIFY_CLIENT_ID
  • SPOTIFY_CLIENT_SECRET
  • SPOTIFY_REFRESH_TOKEN
  • SPOTIFY_ACCESS_TOKEN
  • SPOTIFY_REDIRECT_URI
  • SPOTIFY_EXPIRES_AT
  • SPOTIFY_SCOPES
  • SPOTIFY_LOG_LEVEL

Security Notes

The server implements robust error handling and token management, prioritizing token integrity. It never invalidates tokens on transient network failures (e.g., 5xx, 429 rate limit, network errors) and explicitly only invalidates tokens upon an 'invalid_grant' error during refresh, indicating a truly revoked refresh token. Credentials are saved using atomic writes to prevent corruption and secured with 0o600 file permissions. OAuth flow includes CSRF protection via state. Logs are correctly directed to stderr to avoid interfering with MCP stdout. No direct 'eval' or malicious patterns are observed. Sensitive credentials (client secret, tokens) are handled with care, either prompted, loaded from secured files, or read from environment variables without being logged in clear text at normal log levels.

Similar Servers

Stats

Interest Score0
Security Score9
Cost ClassLow
Avg Tokens750
Stars0
Forks0
Last Update2025-11-24

Tags

SpotifyMusicPlayback ControlAI AgentModel Context Protocol