Spotify MCP
Enables remote interaction with Spotify through the Model Context Protocol, allowing users to search tracks, control playback, and manage playlists with per-user OAuth authentication. It is hosted on Cloudflare Workers and supports remote MCP over HTTP for compatible clients.
README
Spotify MCP
Remote Spotify MCP server hosted on Cloudflare Workers.
This project exposes Spotify tools over remote MCP at /mcp and uses OAuth so each end user connects their own Spotify account. It is intended for any MCP client that supports:
- Remote MCP over HTTP
- OAuth 2.0/2.1 authorization code flow
- OAuth discovery via
/.well-known/oauth-authorization-server - Protected resource metadata via
/.well-known/oauth-protected-resource - Dynamic client registration or pre-registered OAuth clients
Poke is one supported client, but the server is no longer branded or scoped only to Poke.
What it supports
- Spotify search across tracks, albums, artists, and playlists
- Playback inspection, queue inspection, and device inspection
- Playback control: play, pause, resume, skip, queue, and volume
- Playlist reads and writes
- Album save/remove checks
- Per-user Spotify OAuth with encrypted token storage in Workers KV
Architecture
src/index.ts: Cloudflare Worker entrypoint, OAuth flow, and MCP transportsrc/spotify.ts: Spotify OAuth, token refresh, encryption, and API helperssrc/tools.ts: MCP tool definitionssrc/html.ts: landing page and authorization UI
Cloudflare setup
This Worker uses:
OAUTH_KVfor OAuth provider state and grantsSPOTIFY_TOKENSfor encrypted per-user Spotify token storage- Worker secrets for Spotify credentials and the app encryption secret
Create the KV namespaces and bind them in wrangler.jsonc, then regenerate types:
npx wrangler kv namespace create OAUTH_KV
npx wrangler kv namespace create SPOTIFY_TOKENS
npx wrangler types
Set the required secrets:
npx wrangler secret put SPOTIFY_CLIENT_ID
npx wrangler secret put SPOTIFY_CLIENT_SECRET
npx wrangler secret put APP_ENCRYPTION_SECRET
Run locally or deploy:
npx wrangler dev
npx wrangler deploy
Client setup
Configure your MCP client to use:
https://<your-worker-subdomain>.workers.dev/mcp
Clients should discover these OAuth endpoints automatically:
/.well-known/oauth-authorization-server/.well-known/oauth-protected-resource
If your client requires manual OAuth metadata, use the same base URL.
Poke example
If you are using Poke custom integrations, use the same MCP URL:
https://<your-worker-subdomain>.workers.dev/mcp
Poke should discover the OAuth metadata endpoints automatically.
Spotify dashboard setup
Your Spotify app must allow this redirect URI:
https://<your-worker-subdomain>.workers.dev/spotify/callback
Without that redirect URI configured in the Spotify Developer Dashboard, Spotify login will fail on callback.
Recommended Servers
playwright-mcp
A Model Context Protocol server that enables LLMs to interact with web pages through structured accessibility snapshots without requiring vision models or screenshots.
Magic Component Platform (MCP)
An AI-powered tool that generates modern UI components from natural language descriptions, integrating with popular IDEs to streamline UI development workflow.
Audiense Insights MCP Server
Enables interaction with Audiense Insights accounts via the Model Context Protocol, facilitating the extraction and analysis of marketing insights and audience data including demographics, behavior, and influencer engagement.
VeyraX MCP
Single MCP tool to connect all your favorite tools: Gmail, Calendar and 40 more.
graphlit-mcp-server
The Model Context Protocol (MCP) Server enables integration between MCP clients and the Graphlit service. Ingest anything from Slack to Gmail to podcast feeds, in addition to web crawling, into a Graphlit project - and then retrieve relevant contents from the MCP client.
Kagi MCP Server
An MCP server that integrates Kagi search capabilities with Claude AI, enabling Claude to perform real-time web searches when answering questions that require up-to-date information.
E2B
Using MCP to run code via e2b.
Neon Database
MCP server for interacting with Neon Management API and databases
Exa Search
A Model Context Protocol (MCP) server lets AI assistants like Claude use the Exa AI Search API for web searches. This setup allows AI models to get real-time web information in a safe and controlled way.
Qdrant Server
This repository is an example of how to create a MCP server for Qdrant, a vector search engine.