Kotlin MCP Server for Spotify
@Carrieukie
A Model Context Protocol (MCP) server that connects AI assistants to the Spotify Web API. Enables natural language access to Spotify playback, search, playlists, and user profile data — ideal for building LLM-integrated music assistants.
Overview
What is Kotlin MCP Server for Spotify?
A Kotlin implementation of a Model Context Protocol (MCP) server that integrates with the Spotify Web API. It provides tools for controlling Spotify playback, managing playlists, and retrieving user information through a standardized interface, targeting developers building AI assistant integrations.
How to use Kotlin MCP Server for Spotify?
Clone the repository, set Spotify Developer credentials in a .env file (SPOTIFY_CLIENT_ID, SPOTIFY_CLIENT_SECRET), then run ./gradlew installDist to generate an executable. The server runs in Standard I/O mode by default; configure VS Code’s Copilot MCP client to point to the built binary, or switch to SSE mode (port 8080) for use with an MCP inspector.
Key features of Kotlin MCP Server for Spotify
- Spotify OAuth token and authentication management
- Playback control: play, pause, skip, seek, volume, repeat
- Playlist management: create, add/remove tracks, retrieve info
- User profile retrieval
- Implements MCP for standardized tool interactions
Use cases of Kotlin MCP Server for Spotify
- Controlling Spotify playback via an AI coding assistant in VS Code
- Managing playlists through natural language commands in a chat interface
- Automating playback tasks (queue, repeat mode) from an MCP‑enabled client
- Retrieving current user profile information programmatically
FAQ from Kotlin MCP Server for Spotify
What runtime dependencies are required?
JDK 20 or higher, Kotlin 2.1.10, and Gradle (wrapper included). A Spotify Developer Account is needed for API access.
How do I configure authentication?
Create a .env file in the project root with your Spotify app’s Client ID and Client Secret (obtained from the Spotify Developer Dashboard).
What transport modes does the server support?
Standard I/O mode (default, for use with VS Code Copilot or Claude Desktop) and Server‑Sent Events (SSE) mode on port 8080 for other MCP clients.
What tools are provided by the server?
Playback control tools (pause, resume, skip, seek, volume, repeat, queue); playlist management tools (get user playlists, get items, create, add/remove tracks); and a user profile tool.
How do I connect the server to an MCP client?
For VS Code Copilot, add the path to the generated executable in VS Code’s settings.json under mcp.servers. For SSE mode, use an MCP inspector connected to http://localhost:8080/sse.