Last.fm

Provides access to Last.fm data, user activity, and discovery features via MCP with search, info, top lists, and write operations when authenticated.
  • python

3

GitHub Stars

python

Language

6 months ago

First Indexed

2 months ago

Catalog Refreshed

Documentation & install

Readme and setup notes from the catalogue, plus a client-ready config you can copy for your MCP host.

Installation

Add the following to your MCP client configuration file.

Configuration

View docs
{
  "mcpServers": {
    "elcachorrohumano-lastfm-mcp-server": {
      "command": "docker",
      "args": [
        "run",
        "--rm",
        "-i",
        "--env-file",
        "/path/to/your/.env",
        "lastfm-mcp"
      ],
      "env": {
        "LASTFM_API_KEY": "YOUR_API_KEY",
        "LASTFM_SHARED_SECRET": "YOUR_SHARED_SECRET"
      }
    }
  }
}

You can access Last.fm data and discovery features through a Model Context Protocol (MCP) server. This setup lets you search artists, albums, tracks, and more, then pull personalized listening data or contribute actions like scrobbling and loving tracks from your own MCP-enabled clients.

How to use

Connect to the MCP server from your MCP client and choose the Last.fm data domain. You can search for artists, albums, and tracks, retrieve detailed information such as biographies or track listings, and explore top tracks, albums, and related tags. You can also query user profiles, their listening history, and their love/tracking preferences if you have the appropriate authentication. For actions that require you to modify data (like scrobbling or tagging), you will need to authenticate and obtain an auth token or session.

How to install

Prerequisites: have Docker installed for the Docker-based setup, or have UV (Unified View) installed for the UV-based setup. You will also need Last.fm API credentials to access the Last.fm data.

  1. Prepare credentials and environment data.

  2. If you choose the Docker method, build and run the container with your environment file.

  3. If you choose the UV method, run the UV command with your project directory and environment file.

Additional sections

Configuration notes: you need to provide your Last.fm API key and shared secret. Place them in a .env file with entries LASTFM_API_KEY and LASTFM_SHARED_SECRET.

Security: keep your API credentials secure and avoid sharing the .env file. Use proper access controls for the environment files and ensure only trusted clients can connect to the MCP endpoint.

Troubleshooting: if the server fails to start, check that the environment variables are loaded correctly and that the command paths in your MCP configuration match your local setup. Verify that the MCP client can reach the server URL or the local stdio interface you configured.

Available tools

search_artists

Search for artists by name and return matching results with basic artist metadata.

get_artist_info

Retrieve detailed information and biography for a specific artist.

get_artist_top_albums

Fetch an artist's most popular albums.

get_artist_top_tracks

Fetch an artist's most popular tracks.

search_albums

Search for albums by name and return matching results with metadata.

get_album_info

Get detailed album information and tracklist for a specific album.

get_album_top_tags

Retrieve tags associated with an album.

search_tracks

Search for tracks by name and return matching results.

get_track_info

Get detailed information about a specific track.

get_similar_tracks

Find tracks similar to a given track.

get_track_top_tags

Get tags associated with a track.

get_user_info

Get user profile information.

get_user_recent_tracks

Get a user's recently played tracks.

get_user_top_artists

Get a user's most played artists.

get_user_top_albums

Get a user's most played albums.

get_user_top_tracks

Get a user's most played tracks.

get_user_loved_tracks

Get tracks a user has marked as loved.

get_top_artists

Get global top artists.

get_top_tracks

Get global top tracks.

get_top_tags

Get popular music tags.

get_tag_info

Get information about a music tag.

get_tag_top_artists

Get top artists for a tag.

get_tag_top_albums

Get top albums for a tag.

get_tag_top_tracks

Get top tracks for a tag.

get_tag_weekly_charts

Get weekly chart data for a tag.

scrobble_track

Scrobble a track to the user's profile (requires authentication).

love_track

Mark a track as loved (requires authentication).

unlove_track

Remove love from a track (requires authentication).

update_now_playing

Update what's currently playing for the user (requires authentication).

add_track_tags

Add tags to a track (requires authentication).

remove_track_tag

Remove a tag from a track (requires authentication).

get_auth_token

Get authentication token for user login.

get_auth_session

Convert token to session for API access.

Built by
VeilStrat
AI signals for GTM teams
© 2026 VeilStrat. All rights reserved.All systems operational