
Last.fm
io.github.ndyakovPublished by GitHub account ndyakovv0.2.0Updated Oct 24, 2026
Last.fm MCP server: scrobbles, charts, artist/album/track info and more
Overview
A Last.fm MCP server that lets an assistant look up music data — scrobbles, charts, and artist, album and track information — and optionally scrobble.
- What you can do
- Look up albums, artists and tracks: info, corrections, similar items, search and tags, plus charts and geo rankings by country and tag-based charts and top lists, and read a user's profile, friends, loved and recent tracks, personal tags, top lists and weekly charts. Optionally, when writes are enabled, tag albums, artists and tracks, love or unlove tracks, set now-playing and scrobble. Optionally, when auth tools are enabled, run browser-token, authorization-URL, session-exchange and mobile-session helpers. Optionally, when experimental methods are enabled, use legacy tag search, metros, neighbours, top fans and tasteometer comparison.
- When to use it
- Useful when you want an assistant to answer questions about music listening history, artist and track metadata, charts or taste comparisons from Last.fm, or to scrobble and tag on your behalf with explicit opt-in.
- Requirements
- Runs as a local process (Go 1.25 or later, or the published container image) over stdio, or over Streamable HTTP when configured. Needs a Last.fm API account and the LASTFM_API_KEY environment variable; write tools also need LASTFM_API_SECRET and LASTFM_SESSION_KEY. Non-loopback HTTP binds require LASTFM_MCP_HTTP_TOKEN.
Installation
In SourceWeft
- Open Last.fm in the dashboard and add it to a workspace.
- Enable the server for the chats that should use its tools.
Desktop only via STDIO. STDIO servers start a local process, so they need the SourceWeft desktop host.
Other MCP clients
Follow the launch instructions in the repository.
README
[lastfm-mcp — Last.fm MCP server]
lastfm-mcp
An MCP server for the Last.fm API, built on go-lastfm/v2 and the official Go MCP SDK.
It exposes the complete supported Last.fm surface as discoverable MCP tools over:
- stdio, for local desktop and CLI clients;
- Streamable HTTP, for local services and remote deployments.
Read-only tools are enabled by default. Writes, authentication helpers, and unsupported legacy methods require explicit opt-in.
Status
This project is prepared for its initial repository import. The module path is github.com/ndyakov/lastfm-mcp; change it before the first release if the repository will use a different owner or name.
Requirements
- Go 1.25 or later
- A Last.fm API account
LASTFM_API_KEYLASTFM_API_SECRETandLASTFM_SESSION_KEYonly when write tools are enabled
Run with stdio
Example MCP client configuration:
Never place credentials in a configuration file that will be committed.
Run with Streamable HTTP
The MCP endpoint is http://127.0.0.1:8080/mcp; health checks use GET /healthz.
Non-loopback binds are rejected unless LASTFM_MCP_HTTP_TOKEN is set. Clients then send:
The server applies Go's cross-origin protection around the MCP endpoint and sets conservative HTTP timeouts. Put TLS and production identity-aware authentication in a trusted reverse proxy.
Configuration
Equivalent command-line flags are available for transport, address, path, and feature gates. Run lastfm-mcp -h for details.
Tool coverage
The default server registers every stable read endpoint supported by go-lastfm/v2:
- album: info, user tags, top tags, search;
- artist: correction, info, similar, user tags, top albums/tracks/tags, search;
- chart: top artists, tracks, tags;
- geo: top artists and tracks;
- library: artists;
- tag: info, similar, top albums/artists/tracks/tags, weekly chart ranges;
- track: correction, info, similar, user tags, top tags, search;
- user: profile, friends, loved and recent tracks, personal tags, top albums/artists/tracks/tags, weekly charts and ranges.
LASTFM_ENABLE_WRITES=true adds album/artist/track tagging, love/unlove, now-playing, and scrobbling. These require an API secret and session key.
LASTFM_ENABLE_AUTH_TOOLS=true adds browser-token, authorization-URL, session-exchange, and mobile-session tools. These may expose session credentials to the MCP client and model; leave them disabled unless needed. Prefer completing authentication outside the MCP session and providing LASTFM_SESSION_KEY at process startup.
LASTFM_ENABLE_EXPERIMENTAL=true adds legacy tag search, metros, neighbours, artist/track top fans, and tasteometer comparison. Last.fm may change or disable these without notice.
Docker
docker compose up --build uses the same HTTP setup and reads values from the environment.
Development
Until go-lastfm/v2 is published, use a temporary Go workspace containing this repository and the adjacent go-lastfm checkout. Do not commit a local replace directive.
See CONTRIBUTING.md, SECURITY.md, and ROADMAP.md.
License
Source: README.md at commit 9692a15
Tools
0Version history
2- v0.2.0LatestOct 16, 2026
- v0.1.0Sep 16, 2026
Score
50% of the applicable checks met
How complete this listing is, computed from the registry entry, the endpoint and public sources. Not a rating of the server and not a statement that it is safe or working today: reachability is a dated check, and no installs or reviews go into the score.
- Reached in the last 30 days25 pts
Keep the endpoint answering the MCP handshake; SourceWeft probes it every 30 days.
- Auth declared10 pts
Declare the credential headers in the registry entry, or keep the endpoint answering the probe so its auth can be classified.
- Tools listed15 pts
Answer tools/list without a credential, or ship a package that starts in a sandbox without one.
- DescriptionRequired15 pts
- Logo10 pts
- Documentation15 pts
- License10 pts