mcp-lastfm
Provides 41 read-only tools for interacting with Last.fm, including searching artists, albums, and tracks; retrieving artist, album, and track details; accessing user scrobble history, loved tracks, friends, top artists/tracks/albums/tags, and weekly charts; fetching global, tag, and country charts; obtaining name corrections; and library lookups.
Click on "Deploy Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@mcp-lastfm Search for the artist 'Mogwai'"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
MCP server for Last.fm — discover artists, albums and tracks, and browse scrobble history and charts.
Website · Documentation
Features
41 read-only tools — search, artist, album/track, user, chart, tag, geo, and library lookups, all backed by the official Last.fm API
Scrobble history at a glance — pull any user's recent tracks, loved tracks, friends, top artists/tracks/albums/tags, and weekly charts over a chosen time period
Global, tag, and country charts — surface what's trending on Last.fm overall, within a tag (e.g.
shoegaze), or by countryName corrections — check Last.fm's canonical-name correction data for misspelled artists and tracks
Just an API key — a single
MCP_LASTFM_API_KEY, no OAuth flow or session handshake; set an optionalMCP_LASTFM_USERNAMEto default the user tools to your own accountSafe by design — read-only throughout; no scrobbling, no writes, nothing that touches a user's Last.fm account
Related MCP server: lastfm-mcp
Install
npm install -g @kud/mcp-lastfmOr install as a Claude plugin from the kud marketplace:
/plugin install lastfm@kudnpm publish is pending — until
@kud/mcp-lastfmlands on the registry, install from source (see Development).
Getting an API key
Go to last.fm/api/account/create (you'll need to be signed in to a Last.fm account).
Fill in Application name (e.g.
mcp-lastfm) and a short description. Leave Callback URL blank — it's only used for the web login flow, which this read-only server doesn't need.Submit. Last.fm shows you an API key and a shared secret — you only need the API key. (The shared secret is for signed write calls like scrobbling, which aren't supported here.)
Configuration
Add it to your MCP client config:
{
"mcpServers": {
"lastfm": {
"command": "mcp-lastfm",
"env": {
"MCP_LASTFM_API_KEY": "your-api-key",
"MCP_LASTFM_USERNAME": "your-lastfm-username"
}
}
}
}Variable | Required | Purpose |
| yes | Authenticates every request |
| no | Default account for the |
Usage
Once connected, ask your MCP client things like:
> Search for the artist "Slowdive"
> What are Radiohead's top tracks?
> Show me my recent scrobbles
> What's trending on the shoegaze tag right now?Tools
Search
Tool | Description |
| Search for artists by name |
| Search for albums by name |
| Search for tracks by name, optionally scoped to an artist |
Artist
Tool | Description |
| Artist bio, listener/play stats, and tags |
| Artists similar to a given one, with match scores |
| An artist's most-played tracks |
| An artist's most-played albums |
| The tags most applied to an artist |
| Last.fm's canonical spelling for a misspelled artist name |
Album & Track
Tool | Description |
| Album info, tracklist, and tags |
| The tags most applied to an album |
| Track info, stats, and tags |
| Tracks similar to a given one |
| The tags most applied to a track |
| Last.fm's canonical spelling for a misspelled track/artist |
User
Tool | Description |
| A user's profile and listening stats |
| Recent scrobbles, including the currently playing track |
| Most-played artists over a time period |
| Most-played tracks over a time period |
| Most-played albums over a time period |
| Tracks the user has marked as loved |
| The user's Last.fm friends |
| Items the user has tagged with a given tag |
| The user's most-used tags |
| Album play chart for a given week |
| Artist play chart for a given week |
| Track play chart for a given week |
| Available weekly-chart date ranges |
Chart
Tool | Description |
| The most popular artists on Last.fm right now |
| The most popular tracks on Last.fm right now |
| The most popular tags on Last.fm right now |
Tag
Tool | Description |
| Top artists for a tag |
| Top tracks for a tag |
| A tag's description and usage stats |
| Tags similar to a given one |
| Top albums for a tag |
| The most popular tags globally |
| Available weekly-chart date ranges for a tag |
Geo
Tool | Description |
| Top artists in a given country |
| Top tracks in a given country |
Library
Tool | Description |
| Artists in a user's library, with play counts |
Development
git clone https://github.com/kud/mcp-lastfm.git
cd mcp-lastfm
npm install
MCP_LASTFM_API_KEY=your-api-key MCP_LASTFM_USERNAME=your-username npm run devInspect the server interactively with the MCP inspector:
npm run inspect:dev📚 Full documentation → mcp-lastfm/docs
Available Tools
41 toolscorrect_artistA
Check Last.fm's correction data for a canonical artist name
Inputs: artist (required).
correct_trackB
Check Last.fm's correction data for a canonical track name
Inputs: track (required), artist (required).
get_albumA
Get detailed info for an album: tracklist, tags, wiki
Inputs: mbid, album, artist, autocorrect.
get_album_top_tagsB
Get the top tags applied to an album
Inputs: mbid, album, artist, autocorrect.
get_artistB
Get detailed info for an artist: bio, stats, tags, similar artists
Inputs: lang, mbid, artist, autocorrect.
get_artist_top_albumsB
Get an artist's most popular albums
Inputs: mbid, page, limit, artist, +1 more.
get_artist_top_tagsB
Get the top tags applied to an artist
Inputs: mbid, artist, autocorrect.
get_artist_top_tracksC
Get an artist's most popular tracks
Inputs: mbid, page, limit, artist, +1 more.
get_chart_top_artistsB
Get the current global top artists chart
Inputs: page, limit.
get_chart_top_tagsC
Get the current global top tags chart
Inputs: page, limit.
get_chart_top_tracksB
Get the current global top tracks chart
Inputs: page, limit.
get_geo_top_artistsC
Get the most popular artists for a given country
Inputs: country (required), page, limit.
get_geo_top_tracksC
Get the most popular tracks for a given country
Inputs: country (required), page, limit, location.
get_library_artistsB
Get all the artists in a user's library
Inputs: page, user, limit.
get_similar_artistsB
Get artists similar to a given artist
Inputs: mbid, limit, artist, autocorrect.
get_similar_tagsB
Get tags similar to a given tag
Inputs: tag (required).
get_similar_tracksB
Get tracks similar to a given track
Inputs: mbid, limit, track, artist, +1 more.
get_tag_infoC
Get metadata and wiki for a tag
Inputs: tag (required), lang.
get_tag_top_albumsB
Get the top albums tagged with a given tag
Inputs: tag (required), page, limit.
get_tag_top_artistsA
Get the top artists tagged with a given tag
Inputs: tag (required), page, limit.
get_tag_top_tracksB
Get the top tracks tagged with a given tag
Inputs: tag (required), page, limit.
get_tag_weekly_chart_listA
Get the list of available weekly chart date ranges for a tag
Inputs: tag (required).
get_top_tagsA
Get the top global tags on Last.fm, sorted by popularity
Inputs: no named parameters.
get_trackB
Get detailed info for a track: stats, album, tags, wiki
Inputs: mbid, track, artist, autocorrect.
get_track_top_tagsB
Get the top tags applied to a track
Inputs: mbid, track, artist, autocorrect.
get_user_friendsB
Get a user's Last.fm friends
Inputs: page, user, limit, recenttracks.
get_user_infoB
Get a Last.fm user's profile info
Inputs: user.
get_user_loved_tracksC
Get the tracks a user has loved
Inputs: page, user, limit.
get_user_personal_tagsC
Get items a user has tagged with a given tag (artists, albums, or tracks)
Inputs: tag (required), taggingtype (required), page, user, +1 more.
get_user_recent_tracksB
Get a user's recent scrobbles, including the currently playing track
Inputs: to, from, page, user, +2 more.
get_user_top_albumsA
Get a user's most-played albums over a time period
Inputs: page, user, limit, period.
get_user_top_artistsB
Get a user's most-played artists over a time period
Inputs: page, user, limit, period.
get_user_top_tagsC
Get the tags a user applies most often
Inputs: user, limit.
get_user_top_tracksB
Get a user's most-played tracks over a time period
Inputs: page, user, limit, period.
get_user_weekly_album_chartB
Get a user's album chart for a given week (or the latest)
Inputs: to, from, user.
get_user_weekly_artist_chartC
Get a user's artist chart for a given week (or the latest)
Inputs: to, from, user.
get_user_weekly_chart_listA
Get the list of available weekly chart date ranges for a user
Inputs: user.
get_user_weekly_track_chartC
Get a user's track chart for a given week (or the latest)
Inputs: to, from, user.
search_albumsB
Search for albums by name
Inputs: album (required), page, limit.
search_artistsB
Search for artists by name
Inputs: artist (required), page, limit.
search_tracksB
Search for tracks by name, optionally narrowed by artist
Inputs: track (required), page, limit, artist.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 41 tools
Each tool targets a distinct resource and action (e.g., get_artist vs get_artist_top_albums). Even tools that seem similar like get_tag_top_albums and get_album_top_tags are clearly inverses with different inputs and outputs, leaving no ambiguity.
All tool names follow a verb_noun pattern using snake_case (correct_, get_, search_). The naming is predictable, making it easy for an agent to infer functionality from the name.
41 tools is high but justified by the broad Last.fm API domain (artists, albums, tracks, tags, users, charts, geo). The count is within the upper bound of a well-scoped set; it covers essential endpoints without being excessive.
The tool set provides thorough read coverage of Last.fm data: artists, albums, tracks, tags, users, charts, and search. Minor gaps like missing artist events or user library management are acceptable for a read-only server, and core workflows are complete.
Related MCP Connectors
Unofficial, read-only access to your Last.fm listening history, charts, and music lookups.
Live X/Twitter data: profiles, tweets, search, followers, lists and trends. 29 read-only tools.
Search MusicBrainz artists, releases, works, labels; resolve ISRC/ISWC/barcode; fetch cover art.
Full Spotify Web API coverage - albums, artists, playlists, player controls, and more.
Related MCP Servers
- FlicenseBqualityDmaintenanceEnables interaction with Last.fm music data including searching for artists, albums, and tracks, accessing user listening history, and managing music preferences. Supports both read-only operations and authenticated write operations like scrobbling and loving tracks.345-
- AlicenseNot gradedqualityBmaintenanceAn MCP server for the Last.fm API, exposing artist, album, track, chart, and user data as read-only tools. Supports optional writes, auth, and experimental methods over stdio or HTTP.MIT
- FlicenseNot gradedqualityCmaintenanceEnables music discovery and recommendations through the free Last.fm API by exposing tools for artist and track search, similarity-based suggestions, genre or mood-based discovery, and personalized recommendations built from a Last.fm user's listening history.-
- AlicenseAqualityBmaintenanceEnables reading and writing Last.fm data from Claude, with all 44 read methods and 10 write methods exposed as tools, including scrobbling, loving tracks, and tagging.5963 npmMIT