Skip to main content
Glama
rollecode

lastfm-mcp

by rollecode

Server Configuration

Describes the environment variables required to run the server.

NameRequiredDescriptionDefault
LASTFM_API_KEYYesLast.fm API key. Required. Create an API account at https://www.last.fm/api/account/create.
LASTFM_USERNAMENoLast.fm username. Optional, used as the default for user tools.
LASTFM_API_SECRETNoLast.fm API secret. Only needed for write operations (scrobbling, loving, tagging).

Instructions

Guidance the server publishes about itself, which clients place ahead of the tool catalog so the model reads it before choosing anything.

This server publishes no instructions, or was last inspected before Glama recorded them.

Capabilities

Features and capabilities supported by this server

Protocol revision2025-11-25

CapabilityDetails
tools
{
  "listChanged": false
}
prompts
{
  "listChanged": false
}
resources
{
  "subscribe": false,
  "listChanged": false
}
experimental
{}

Tools

Functions exposed to the LLM to take actions

NameDescription
start_authenticationA

Begin the Last.fm desktop auth flow.

Returns a token and the URL to open in a browser. Approve the request there, then call finish_authentication with the same token. Only needed for writes: scrobbling, loving and tagging.

finish_authenticationA

Exchange an approved token for a stored session key.

Args: token: The token returned by start_authentication, after approving it in the browser.

get_authentication_statusA

Report whether a write-capable session is stored, and for which user.

clear_authenticationA

Forget the stored session key, disabling writes until re-authenticated.

get_albumA

Get album metadata: tracklist, listeners, playcount, tags, wiki.

Args: artist: Artist name. Required unless mbid is given. album: Album name. Required unless mbid is given. mbid: MusicBrainz id for the album, used instead of the names. username: Include this user's playcount for the album. autocorrect: Let Last.fm fix a misspelled artist name. lang: ISO 639 alpha-2 language for the wiki text.

get_album_tagsA

Get the tags one user applied to an album.

Args: artist: Artist name. Required unless mbid is given. album: Album name. Required unless mbid is given. mbid: MusicBrainz id for the album. user: Whose tags to read. Defaults to the authenticated account. autocorrect: Let Last.fm fix a misspelled artist name.

get_album_top_tagsB

Get the tags the whole community applied to an album, by popularity.

Args: artist: Artist name. Required unless mbid is given. album: Album name. Required unless mbid is given. mbid: MusicBrainz id for the album. autocorrect: Let Last.fm fix a misspelled artist name.

search_albumsA

Search albums by name, best match first.

Args: album: The album name to search for. limit: Results per page (default 30, maximum 1000). page: Which page of results to fetch.

add_album_tagsB

Apply your own tags to an album. Needs authentication.

Args: artist: Artist name. album: Album name. tags: Up to 10 tags, comma separated.

remove_album_tagA

Remove one of your tags from an album. Needs authentication.

Args: artist: Artist name. album: Album name. tag: The single tag to remove.

get_artistA

Get artist metadata: listeners, playcount, similar artists, bio.

Args: artist: Artist name. Required unless mbid is given. mbid: MusicBrainz id for the artist. username: Include this user's playcount for the artist. autocorrect: Let Last.fm fix a misspelled artist name. lang: ISO 639 alpha-2 language for the biography text.

get_artist_correctionA

Get Last.fm's canonical spelling for a misspelled artist name.

Args: artist: The name as written, possibly misspelled.

get_similar_artistsA

Get artists similar to this one, most similar first.

Args: artist: Artist name. Required unless mbid is given. mbid: MusicBrainz id for the artist. limit: How many similar artists to return. autocorrect: Let Last.fm fix a misspelled artist name.

get_artist_tagsA

Get the tags one user applied to an artist.

Args: artist: Artist name. Required unless mbid is given. mbid: MusicBrainz id for the artist. user: Whose tags to read. Defaults to the authenticated account. autocorrect: Let Last.fm fix a misspelled artist name.

get_artist_top_albumsA

Get an artist's most played albums.

Args: artist: Artist name. Required unless mbid is given. mbid: MusicBrainz id for the artist. limit: Results per page. page: Which page of results to fetch. autocorrect: Let Last.fm fix a misspelled artist name.

get_artist_top_tagsA

Get the tags the community applied to an artist, by popularity.

Args: artist: Artist name. Required unless mbid is given. mbid: MusicBrainz id for the artist. autocorrect: Let Last.fm fix a misspelled artist name.

get_artist_top_tracksA

Get an artist's most played tracks.

Args: artist: Artist name. Required unless mbid is given. mbid: MusicBrainz id for the artist. limit: Results per page. page: Which page of results to fetch. autocorrect: Let Last.fm fix a misspelled artist name.

search_artistsA

Search artists by name, best match first.

Args: artist: The artist name to search for. limit: Results per page (default 30, maximum 1000). page: Which page of results to fetch.

add_artist_tagsA

Apply your own tags to an artist. Needs authentication.

Args: artist: Artist name. tags: Up to 10 tags, comma separated.

remove_artist_tagA

Remove one of your tags from an artist. Needs authentication.

Args: artist: Artist name. tag: The single tag to remove.

get_trackA

Get track metadata: duration, listeners, playcount, album, tags, wiki.

Args: artist: Artist name. Required unless mbid is given. track: Track name. Required unless mbid is given. mbid: MusicBrainz id for the track. username: Include this user's playcount and loved status. autocorrect: Let Last.fm fix a misspelled artist or track name.

get_track_correctionA

Get Last.fm's canonical spelling for a misspelled artist and track.

Args: artist: The artist name as written. track: The track name as written.

get_similar_tracksA

Get tracks similar to this one, most similar first.

Args: artist: Artist name. Required unless mbid is given. track: Track name. Required unless mbid is given. mbid: MusicBrainz id for the track. limit: How many similar tracks to return. autocorrect: Let Last.fm fix a misspelled artist or track name.

get_track_tagsA

Get the tags one user applied to a track.

Args: artist: Artist name. Required unless mbid is given. track: Track name. Required unless mbid is given. mbid: MusicBrainz id for the track. user: Whose tags to read. Defaults to the authenticated account. autocorrect: Let Last.fm fix a misspelled artist or track name.

get_track_top_tagsA

Get the tags the community applied to a track, by popularity.

Args: artist: Artist name. Required unless mbid is given. track: Track name. Required unless mbid is given. mbid: MusicBrainz id for the track. autocorrect: Let Last.fm fix a misspelled artist or track name.

search_tracksB

Search tracks by name, best match first.

Args: track: The track name to search for. artist: Narrow the search to one artist. limit: Results per page (default 30, maximum 1000). page: Which page of results to fetch.

love_trackA

Mark a track as loved. Needs authentication.

Args: artist: Artist name. track: Track name.

unlove_trackA

Remove a track from your loved tracks. Needs authentication.

Args: artist: Artist name. track: Track name.

add_track_tagsA

Apply your own tags to a track. Needs authentication.

Args: artist: Artist name. track: Track name. tags: Up to 10 tags, comma separated.

remove_track_tagA

Remove one of your tags from a track. Needs authentication.

Args: artist: Artist name. track: Track name. tag: The single tag to remove.

scrobble_tracksA

Scrobble one or more plays. Needs authentication.

Args: tracks: Up to 50 plays. Each needs artist and track; timestamp (Unix seconds the play started) defaults to now, and album, albumArtist, mbid, duration and trackNumber are optional. Scrobble only what was really played: Last.fm rejects timestamps far in the future, and a play should be at least half the track or four minutes long.

update_now_playingA

Set what is playing right now. Needs authentication.

This does not scrobble; it only updates the "now playing" line on your profile, which Last.fm clears on its own shortly after.

Args: artist: Artist name. track: Track name. album: Album name. album_artist: Album artist, when it differs from the track artist. duration: Track length in seconds. track_number: Position of the track on the album. mbid: MusicBrainz id for the track.

get_user_infoA

Get a user's profile: playcount, registration date, country, subscriber.

Args: user: Whose profile to read. Defaults to the authenticated account.

get_user_recent_tracksA

Get a user's listening history, most recent first.

This is the tool for "what have I been listening to". A currently playing track appears first with a nowplaying flag and no play date.

Args: user: Whose history to read. Defaults to the authenticated account. limit: Results per page (maximum 200). page: Which page of results to fetch. from_timestamp: Only plays at or after this Unix timestamp. to_timestamp: Only plays at or before this Unix timestamp. extended: Also return artist images and whether you loved each track.

get_user_loved_tracksA

Get the tracks a user has loved, most recent first.

Args: user: Whose loved tracks to read. Defaults to the authenticated account. limit: Results per page. page: Which page of results to fetch.

get_user_friendsA

Get a user's friends.

Args: user: Whose friends to read. Defaults to the authenticated account. limit: Results per page. page: Which page of results to fetch. recenttracks: Also include each friend's latest scrobble.

get_user_top_artistsA

Get a user's most played artists over a period.

Args: user: Whose chart to read. Defaults to the authenticated account. period: One of overall, 7day, 1month, 3month, 6month, 12month. limit: Results per page. page: Which page of results to fetch.

get_user_top_albumsA

Get a user's most played albums over a period.

Args: user: Whose chart to read. Defaults to the authenticated account. period: One of overall, 7day, 1month, 3month, 6month, 12month. limit: Results per page. page: Which page of results to fetch.

get_user_top_tracksB

Get a user's most played tracks over a period.

Args: user: Whose chart to read. Defaults to the authenticated account. period: One of overall, 7day, 1month, 3month, 6month, 12month. limit: Results per page. page: Which page of results to fetch.

get_user_top_tagsA

Get the tags a user uses most.

Args: user: Whose tags to read. Defaults to the authenticated account. limit: How many tags to return.

get_user_personal_tagsA

Get everything a user tagged with one tag.

Args: tag: The tag to look up. tagging_type: What was tagged -- artist, album or track. user: Whose tags to read. Defaults to the authenticated account. limit: Results per page. page: Which page of results to fetch.

get_user_weekly_chart_listA

Get the week ranges a user has weekly charts for.

Each entry is a from/to Unix timestamp pair to pass to the weekly chart tools.

Args: user: Whose chart list to read. Defaults to the authenticated account.

get_user_weekly_artist_chartA

Get a user's artist chart for one week.

Args: user: Whose chart to read. Defaults to the authenticated account. from_timestamp: Week start, from get_user_weekly_chart_list. Defaults to the most recent week. to_timestamp: Week end, from get_user_weekly_chart_list.

get_user_weekly_album_chartA

Get a user's album chart for one week.

Args: user: Whose chart to read. Defaults to the authenticated account. from_timestamp: Week start, from get_user_weekly_chart_list. Defaults to the most recent week. to_timestamp: Week end, from get_user_weekly_chart_list.

get_user_weekly_track_chartA

Get a user's track chart for one week.

Args: user: Whose chart to read. Defaults to the authenticated account. from_timestamp: Week start, from get_user_weekly_chart_list. Defaults to the most recent week. to_timestamp: Week end, from get_user_weekly_chart_list.

get_library_artistsA

Get every artist in a user's library, with playcounts.

Args: user: Whose library to read. Defaults to the authenticated account. limit: Results per page. page: Which page of results to fetch.

get_chart_top_artistsA

Get the most popular artists on Last.fm right now.

Args: limit: Results per page. page: Which page of results to fetch.

get_chart_top_tracksA

Get the most popular tracks on Last.fm right now.

Args: limit: Results per page. page: Which page of results to fetch.

get_chart_top_tagsA

Get the most popular tags on Last.fm right now.

Args: limit: Results per page. page: Which page of results to fetch.

get_geo_top_artistsA

Get the most popular artists in one country.

Args: country: Country name in ISO 3166-1 form, such as Finland. limit: Results per page. page: Which page of results to fetch.

get_geo_top_tracksA

Get the most popular tracks in one country.

Args: country: Country name in ISO 3166-1 form, such as Finland. location: Narrow to a city within that country. limit: Results per page. page: Which page of results to fetch.

get_tag_infoA

Get a tag's description, total uses and reach.

Args: tag: The tag name. lang: ISO 639 alpha-2 language for the description.

get_similar_tagsA

Get tags similar to this one.

Args: tag: The tag name.

get_tag_top_artistsA

Get the artists most associated with a tag.

Args: tag: The tag name. limit: Results per page. page: Which page of results to fetch.

get_tag_top_albumsA

Get the albums most associated with a tag.

Args: tag: The tag name. limit: Results per page. page: Which page of results to fetch.

get_tag_top_tracksA

Get the tracks most associated with a tag.

Args: tag: The tag name. limit: Results per page. page: Which page of results to fetch.

get_top_tagsA

Get the tags used most across all of Last.fm.

get_tag_weekly_chart_listB

Get the week ranges a tag has weekly charts for.

Args: tag: The tag name.

Prompts

Interactive templates invoked by user choice

NameDescription

No prompts

Resources

Contextual data attached and managed by the client

NameDescription

No resources

TDQS

A3.6/5.0

Scored across 58 tools

Disambiguation4/5

Most tools are clearly separated by resource and action (artist vs album vs track, user-specific vs global charts), and descriptions clarify the few near-pairs like get_album_tags vs get_album_top_tags. However, get_top_tags and get_chart_top_tags appear to describe essentially the same global tag ranking, which could cause an agent to misselect.

Naming Consistency5/5

Every tool follows a consistent snake_case verb_noun pattern: get_*, search_*, add_*, remove_*, love/unlove, scrobble_tracks, update_now_playing. Auth tools also align with start/finish/get/clear, so a predictable rhythm is maintained throughout.

Tool Count1/5

At 58 tools, the server is far beyond the recommended scope and is an extreme count for an MCP agent to reason over. The combinatorial explosion of similar endpoints (weekly charts, top tags, per-entity tags) makes navigation burdensome, even if each endpoint maps to a real Last.fm API method.

Completeness4/5

The surface covers the core Last.fm domain well: user history and charts, global/geo/tag charts, album/artist/track metadata and search, tagging, love/unlove, scrobbling, now playing, and authentication. Minor gaps exist around events and some less common API endpoints, but these are workable omissions rather than dead ends.

Maintenance

ActivityMaintained
ResponsivenessNo issues