ArtistLens is a Model Context Protocol (MCP) server that provides seamless access to the Spotify Web API. It allows you to search music catalogs, access artist information, retrieve top tracks, find related artists, and perform many other Spotify-related operations directly from your AI assistant.
For Claude Desktop users, the simplest installation method is via Smithery:
npx -y @smithery/cli install @superseoworld/artistlens --client claude
You can install the package globally:
npm install -g @thomaswawra/artistlens
Or run it directly with npx (no installation required):
npx -y @thomaswawra/artistlens
After installation, you need to add the ArtistLens configuration to your MCP settings file:
claude_desktop_config.json
or cline_mcp_settings.json
){
"mcpServers": {
"spotify": {
"command": "npx",
"args": ["-y", "@thomaswawra/artistlens"],
"env": {
"SPOTIFY_CLIENT_ID": "your_client_id",
"SPOTIFY_CLIENT_SECRET": "your_client_secret"
},
"disabled": false,
"autoApprove": []
}
}
}
To use ArtistLens, you'll need Spotify API credentials:
ArtistLens provides access to numerous Spotify API endpoints through the following tools:
get_access_token
: Retrieve a valid Spotify access tokensearch
: Look for tracks, albums, artists, or playlistsget_artist
: Get detailed artist informationget_artist_top_tracks
: Retrieve an artist's most popular tracksget_artist_related_artists
: Find artists similar to a specified artistget_artist_albums
: Get all albums by an artistget_album
: Get detailed album informationget_album_tracks
: Retrieve all tracks on an albumget_track
: Get detailed track informationget_new_releases
: Discover newly released albumsget_available_genres
: List all available genres for recommendationsget_recommendations
: Get track recommendations based on seeds (tracks, artists, genres)get_audiobook
: Get audiobook information with market-specific optionsget_multiple_audiobooks
: Retrieve information for up to 50 audiobooksget_audiobook_chapters
: Access audiobook chapters with paginationget_playlist
: Access a playlist owned by any Spotify userget_playlist_tracks
: Get detailed information about playlist tracksget_playlist_items
: Get all items in a playlist with paginationmodify_playlist
: Change playlist details (name, description, visibility)add_tracks_to_playlist
: Add one or more tracks to a playlistremove_tracks_from_playlist
: Remove tracks from a playlistget_current_user_playlists
: View playlists owned or followed by the current userget_featured_playlists
: Access Spotify's featured playlistsget_category_playlists
: Get playlists in a specific categoryTo update to the latest version:
# If installed globally
npm update -g @thomaswawra/artistlens
# If using npx, it will automatically use the latest version
npx -y @thomaswawra/artistlens
To search for tracks by an artist:
Tool: search
Parameters: {"q": "Taylor Swift", "type": "track", "limit": 5}
To get details about an artist:
Tool: get_artist
Parameters: {"id": "06HL4z0CvFAxyc27GXpf02"}
To discover artists similar to your favorites:
Tool: get_artist_related_artists
Parameters: {"id": "06HL4z0CvFAxyc27GXpf02"}
To add tracks to a playlist:
Tool: add_tracks_to_playlist
Parameters: {
"playlist_id": "5iK97V5C4TMrh4vAccYrGl",
"uris": ["spotify:track:4iV5W9uYEdYUVa79Axb7Rh", "spotify:track:1301WleyT98MSxVHPZCA6M"]
}
To add this MCP server to Claude Code, run this command in your terminal:
claude mcp add-json "spotify" '{"command":"npx","args":["-y","@thomaswawra/artistlens"],"env":{"SPOTIFY_CLIENT_ID":"your_client_id","SPOTIFY_CLIENT_SECRET":"your_client_secret"},"disabled":false,"autoApprove":[]}'
See the official Claude Code MCP documentation for more details.
There are two ways to add an MCP server to Cursor. The most common way is to add the server globally in the ~/.cursor/mcp.json
file so that it is available in all of your projects.
If you only need the server in a single project, you can add it to the project instead by creating or adding it to the .cursor/mcp.json
file.
To add a global MCP server go to Cursor Settings > Tools & Integrations and click "New MCP Server".
When you click that button the ~/.cursor/mcp.json
file will be opened and you can add your server like this:
{
"mcpServers": {
"spotify": {
"command": "npx",
"args": [
"-y",
"@thomaswawra/artistlens"
],
"env": {
"SPOTIFY_CLIENT_ID": "your_client_id",
"SPOTIFY_CLIENT_SECRET": "your_client_secret"
},
"disabled": false,
"autoApprove": []
}
}
}
To add an MCP server to a project you can create a new .cursor/mcp.json
file or add it to the existing one. This will look exactly the same as the global MCP server example above.
Once the server is installed, you might need to head back to Settings > MCP and click the refresh button.
The Cursor agent will then be able to see the available tools the added MCP server has available and will call them when it needs to.
You can also explicitly ask the agent to use the tool by mentioning the tool name and describing what the function does.
To add this MCP server to Claude Desktop:
1. Find your configuration file:
~/Library/Application Support/Claude/claude_desktop_config.json
%APPDATA%\Claude\claude_desktop_config.json
~/.config/Claude/claude_desktop_config.json
2. Add this to your configuration file:
{
"mcpServers": {
"spotify": {
"command": "npx",
"args": [
"-y",
"@thomaswawra/artistlens"
],
"env": {
"SPOTIFY_CLIENT_ID": "your_client_id",
"SPOTIFY_CLIENT_SECRET": "your_client_secret"
},
"disabled": false,
"autoApprove": []
}
}
}
3. Restart Claude Desktop for the changes to take effect