Sponsored by Deepsite.site

Spotify

Created By
akutishevsky16 days ago
Remote MCP server providing full Spotify Web API coverage (80 tools). OAuth2/PKCE, encrypted token storage, TOON-formatted responses.
Overview

Spotify MCP Server

Quality Gate Status Bugs Code Smells Duplicated Lines (%) Lines of Code Reliability Rating Security Rating Maintainability Rating Vulnerabilities

A remote Model Context Protocol server that provides full coverage of the Spotify Web API. Built with Bun, Hono, and Supabase.

Live server: sptfy-mcp.online

Quick Setup

Claude.ai

  1. Go to Customize > Connectors > Add Custom Connector
  2. Set Name to Spotify and URL to https://sptfy-mcp.online/mcp
  3. Save and authorize with your Spotify account

Claude Desktop / Claude Code / Cursor

Add to your MCP client config:

{
  "mcpServers": {
    "spotify": {
      "type": "streamable-http",
      "url": "https://sptfy-mcp.online/mcp"
    }
  }
}

On first connection you'll be guided through Spotify authorization — no API keys or local setup needed.

Features

  • 80 tools covering the Spotify Web API
  • Remote MCP via Streamable HTTP transport — no local install required
  • OAuth2 proxy with PKCE support and dynamic client registration
  • Automatic token refresh — Spotify tokens are refreshed transparently
  • Encrypted storage — all Spotify tokens encrypted at rest with AES-256-GCM
  • Supabase backend — persistent storage for tokens, sessions, and clients
  • Tool analytics — anonymous usage tracking with 90-day retention
  • Scheduled cleanup — automatic purge of expired tokens, sessions, and analytics
  • Landing page with live health status

Tools

CategoryToolsExamples
Albums7Get album, saved albums, save/remove/check
Artists4Get artist, top tracks, albums
Audiobooks7Get audiobook, chapters, save/remove
Chapters2Get chapter details
Episodes6Get episode, save/remove/check
Library3Save/remove/check library items (unified)
Markets1Available markets
Player15Play, pause, skip, seek, queue, devices, volume
Playlists12Create, modify, add/remove items, cover images
Search1Search with field filters across all types
Shows7Get show, episodes, save/remove/check
Tracks6Get track, saved tracks, save/remove/check
Users10Profile, top items, follow/unfollow

All save/remove/check library operations use the new unified Spotify /me/library endpoint with Spotify URIs.

Prerequisites

Setup

1. Clone and install

git clone https://github.com/akutishevsky/spotify-mcp.git
cd spotify-mcp
bun install

2. Configure environment

cp .env.example .env

Fill in the values:

VariableDescription
SPOTIFY_CLIENT_IDFrom your Spotify Developer Dashboard
SPOTIFY_CLIENT_SECRETFrom your Spotify Developer Dashboard
SPOTIFY_REDIRECT_URIMust match your Spotify app settings (e.g. http://localhost:3000/callback)
ENCRYPTION_SECRET32-byte hex key — generate with bun run generate:secret
SUPABASE_URLYour Supabase project URL
SUPABASE_SECRET_KEYYour Supabase service role key
PORTServer port (default: 3000)

3. Run Supabase migrations

Apply the database schema to your Supabase project:

supabase db push

Or run the SQL files manually from supabase/migrations/ in the Supabase SQL editor:

  1. 001_initial_schema.sql — Core tables (mcp_tokens, oauth_sessions, auth_codes, registered_clients) with RLS
  2. 002_fix_rls_policies.sql — Tighten RLS policies
  3. 003_tool_analytics.sql — Tool analytics table with indexes
  4. 004_add_granted_scopes.sql — Granted scopes tracking on mcp_tokens

4. Start the server

bun run dev

OAuth Flow

This server acts as an OAuth2 proxy between MCP clients and Spotify:

MCP Client                    Spotify MCP Server                 Spotify
    |                               |                               |
    |-- POST /register ----------->|                               |
    |<-- client_id ----------------|                               |
    |                               |                               |
    |-- GET /authorize ----------->|                               |
    |                               |-- redirect to Spotify ------>|
    |                               |<-- callback with code -------|
    |<-- redirect with MCP code ---|                               |
    |                               |                               |
    |-- POST /token -------------->|                               |
    |                               |-- exchange code ------------>|
    |                               |<-- Spotify tokens -----------|
    |<-- MCP access token ---------|                               |
    |                               |                               |
    |-- POST /mcp (with Bearer) -->|-- Spotify API calls -------->|
    |<-- tool results -------------|<-- API responses ------------|

API Endpoints

EndpointMethodDescription
/GETLanding page with live health status
/registerPOSTDynamic OAuth client registration
/authorizeGETStart OAuth authorization flow
/callbackGETSpotify OAuth callback
/tokenPOSTExchange auth code for MCP token
/mcpPOST/GET/DELETEMCP Streamable HTTP transport
/healthGETHealth check (JSON)
/.well-known/oauth-authorization-serverGETOAuth server metadata

Scripts

bun run dev              # Start with hot reload
bun run start            # Production start
bun run lint             # Run ESLint
bun run lint:fix         # Auto-fix lint issues
bun run format           # Format with Prettier
bun run generate:secret  # Generate encryption key
bun run inspector        # Launch MCP Inspector

Deployment

The server includes a Dockerfile for container-based deployments (e.g. Digital Ocean App Platform). The idleTimeout is set to 255 seconds to support long-lived SSE streams.

License

MIT

Server Config

{
  "mcpServers": {
    "spotify": {
      "type": "streamable-http",
      "url": "https://sptfy-mcp.online/mcp"
    }
  }
}
Recommend Servers
TraeBuild with Free GPT-4.1 & Claude 3.7. Fully MCP-Ready.
Tavily Mcp
MCP AdvisorMCP Advisor & Installation - Use the right MCP server for your needs
BlenderBlenderMCP connects Blender to Claude AI through the Model Context Protocol (MCP), allowing Claude to directly interact with and control Blender. This integration enables prompt assisted 3D modeling, scene creation, and manipulation.
Zhipu Web SearchZhipu Web Search MCP Server is a search engine specifically designed for large models. It integrates four search engines, allowing users to flexibly compare and switch between them. Building upon the web crawling and ranking capabilities of traditional search engines, it enhances intent recognition capabilities, returning results more suitable for large model processing (such as webpage titles, URLs, summaries, site names, site icons, etc.). This helps AI applications achieve "dynamic knowledge acquisition" and "precise scenario adaptation" capabilities.
WindsurfThe new purpose-built IDE to harness magic
DeepChatYour AI Partner on Desktop
CursorThe AI Code Editor
Jina AI MCP ToolsA Model Context Protocol (MCP) server that integrates with Jina AI Search Foundation APIs.
RedisA Model Context Protocol server that provides access to Redis databases. This server enables LLMs to interact with Redis key-value stores through a set of standardized tools.
ChatWiseThe second fastest AI chatbot™
Baidu Map百度地图核心API现已全面兼容MCP协议,是国内首家兼容MCP协议的地图服务商。
Playwright McpPlaywright MCP server
AiimagemultistyleA Model Context Protocol (MCP) server for image generation and manipulation using fal.ai's Stable Diffusion model.
Amap Maps高德地图官方 MCP Server
Serper MCP ServerA Serper MCP Server
MiniMax MCPOfficial MiniMax Model Context Protocol (MCP) server that enables interaction with powerful Text to Speech, image generation and video generation APIs.
Visual Studio Code - Open Source ("Code - OSS")Visual Studio Code
EdgeOne Pages MCPAn MCP service designed for deploying HTML content to EdgeOne Pages and obtaining an accessible public URL.
Howtocook Mcp基于Anduin2017 / HowToCook (程序员在家做饭指南)的mcp server,帮你推荐菜谱、规划膳食,解决“今天吃什么“的世纪难题; Based on Anduin2017/HowToCook (Programmer's Guide to Cooking at Home), MCP Server helps you recommend recipes, plan meals, and solve the century old problem of "what to eat today"
Y GuiA web-based graphical interface for AI chat interactions with support for multiple AI models and MCP (Model Context Protocol) servers.