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 "Install 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-lastfmSearch 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: setlist-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
Maintenance
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
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
- AlicenseAqualityAmaintenanceSearch concert setlists, artists, venues, tours, and cities from setlist.fm via natural language. Provides 16 read-only tools for exploring live music data.20159MIT
- AlicenseAqualityCmaintenanceAn MCP server for the Last.fm API that enables LLM agents to access music data including user profiles, listening history, top charts, search, and artist/album/track metadata.16MIT
- FlicenseNot gradedqualityCmaintenanceEnables music search, metadata retrieval, local audio analysis (tempo, key, energy), recommendations, song recognition, and classical work resolution via Spotify, Last.fm, AudD, MusicBrainz, and Songkick APIs.
Related MCP Connectors
Search MusicBrainz artists, releases, works, labels; resolve ISRC/ISWC/barcode; fetch cover art.
Deezer public music catalog (search/tracks/albums/artists/charts)
MusicBrainz MCP — wraps MusicBrainz Web Service v2 (free, no auth)
Latest Blog Posts
- Who's Calling? MCP Hosts Are an Identity Blind Spot (And the Spec Knows It)By Om-Shree-0709 on .mcpAgent IdentityOAuth 2.1
- Your AI Chatbot Just Exposed Your CEO's Salary to an InternBy Om-Shree-0709 on .Agent IdentityMCP SecurityOAuth Delegation
- Why MCP Servers Need Execution Sandboxing (And Why Your Current Stack Isn't Enough)By Om-Shree-0709 on .Agentic AiPrompt InjectionWebAssembly
MCP directory API
We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/kud/mcp-lastfm'
If you have feedback or need assistance with the MCP directory API, please join our Discord server