Skip to content

msauerberg/MCP_server_spotify

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Spotify MCP Server

This repository provides a Spotify MCP (Model Context Protocol) server built with Python.
It exposes Spotify-related capabilities as MCP tools, enabling LLMs or other MCP-compatible clients to query Spotify data in a structured, programmatic way.

The server uses the Spotify Web API via spotipy and authenticates using OAuth. It currently supports:

  • Fetching an artist’s top tracks by country
  • Fetching the authenticated user’s top tracks

Features

MCP Tools

get_top_tracks_country

Returns the top tracks for a given artist in a specified country.

  • Inputs

    • artist_name (string, required)
    • country (string, optional; default "DE")
      • ISO alpha-2 country code (e.g. DE, US)
      • Or full English country name (e.g. Germany, United States)
  • Output

    • A list of objects containing:
      • track_name
      • artist_name
      • album

get_user_top_tracks

Returns the authenticated user’s top tracks.

  • Inputs

    • limit (int, optional; default 10)
    • time_range (string, optional)
      • One of: short_term, medium_term, long_term
  • Output

    • A list of objects containing:
      • song
      • artist

Blog post

The MCP server and the code is described in this blog post https://msauerberg.github.io/blog/2025/mcp_server/

About

Trying out MCP servers with Spotify API

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors