1. Conduid
  2. Developer Tools
  3. Lastfm MCP
MCP server · Developer Tools

Lastfm MCP

An MCP server that provides seamless access to a user's Last.fm listening data and music information via AI assistants like Claude.

Unclaimed MIT devtools
72Good

Scored 7 days ago · breakdown

About Lastfm MCP

Lastfm MCP is an MCP server published by rianvdm in the Developer Tools category: an MCP server that provides seamless access to a user's Last.fm listening data and music information via AI assistants like Claude.

The repository has 52 stars and 10 forks, with the last commit 12 days ago. Recent commit activity is the strongest signal that reported issues will get attention.

Install

From source
git clone https://github.com/rianvdm/lastfm-mcp

This server has no ConduID identity, so agent calls to it are not receipted. Pin the version you install and review the source before granting it credentials.

Tools (10)

get_album_infoAlbum details and track listing

Parameters not published.

get_artist_infoArtist information and bio

Parameters not published.

get_artist_top_albumsAn artist's globally most-played albums

Parameters not published.

get_artist_top_tracksAn artist's globally most-played tracks

Parameters not published.

get_similar_artistsArtists similar to a given artist

Parameters not published.

get_similar_tracksTracks similar to a given track

Parameters not published.

get_track_infoDetailed information about a track

Parameters not published.

lastfm_auth_statusCheck authentication status

Parameters not published.

pingTest connectivity

Parameters not published.

server_infoServer status and capabilities

Parameters not published.

Ask AI

✦

Ask AI about Lastfm MCP

Powered by Claude · Grounded in docs

I know everything about Lastfm MCP. Ask me about installation, configuration, usage, or troubleshooting.

Security checks

Static checks derived from the repository 9 hours ago. Heuristics on the source, not an audit.

  • ✓README presentThe repository ships documentation.
  • ✓License declaredUsable under a stated license.
  • ✓Tests presentA test suite exists in the repository.
  • ✓Dependencies pinnedA lockfile pins dependency versions.
  • ✓No dynamic code executionSource scan found no eval, dynamic Function, or shell execution.
  • !Scoped permissionsDoesn't declare a permission scope. Assume it can do anything its process can.

Releases

v2.6.0lastfm-mcp v2.6.0 — Sign-in without client registration · 5 Oct 2026MCP clients can now sign in by pointing at a web address that describes them, with no registration step first. This is the method the current MCP spec prefers, and existing connections keep working as before. All five changes behind it…
v2.5.0lastfm-mcp v2.5.0 — Latest MCP protocol support · 25 Aug 2026The server now speaks the current MCP revision (2026-07-28, the stateless one) natively, while older clients keep working through the SDK's compatibility lane. Tool responses also got smarter about what to call next, and two long-standing…
v2.4.0lastfm-mcp v2.4.0 — Top tracks and 8K fewer lines · 30 Apr 2026The big shifts in this release: three new tools, a glassmorphism-redesigned landing page, timezone-aware day boundaries on `get_recent_tracks`, and a 8,300-line cull of the original session-based worker now that the OAuth path has been the…
v2.3.1v2.3.1 — Timezone-aware date formatting · 17 Mar 2026What's new Track play times in `get_recent_tracks` now display in the correct timezone instead of silently using UTC. Previously, a track played at 11pm Pacific would show as the next day — causing Claude to say "yesterday" when it was…
v2.3.0v2.3.0 - Automatic OAuth Browser Flow · 15 Mar 2026What's New This release fixes the authentication experience for all MCP clients. Previously, connecting any client (Claude Code, Claude Desktop, opencode) to the server required manually copying and pasting a login URL. Now the browser…

README

Last.fm MCP Server

A Model Context Protocol (MCP) server for Last.fm. Gives AI assistants access to your listening history, music discovery, and detailed track/artist/album information.

Runs on Cloudflare Workers with OAuth 2.0 authentication. Public tools (track info, artist info, similar artists) work without signing in -- connect your Last.fm account to access personal listening data.

Quick start

Claude.ai / Claude Desktop

  1. Open Settings -> Connectors -> Add Custom Connector
  2. Enter https://lastfm-mcp.com/mcp
  3. Sign in to Last.fm when prompted

Claude Code

claude mcp add --transport http lastfm "https://lastfm-mcp.com/mcp"

Windsurf

Add to ~/.codeium/windsurf/mcp_config.json:

{
	"mcpServers": {
		"lastfm": {
			"serverUrl": "https://lastfm-mcp.com/mcp"
		}
	}
}

Other MCP clients

For clients that don't support remote servers directly (Continue.dev, Zed, etc.), use mcp-remote:

{
	"mcpServers": {
		"lastfm": {
			"command": "npx",
			"args": ["-y", "mcp-remote", "https://lastfm-mcp.com/mcp"]
		}
	}
}

MCP Inspector

npx @modelcontextprotocol/inspector https://lastfm-mcp.com/mcp

Authentication

The server uses OAuth 2.0. When you connect from a supported client, your browser opens to Last.fm to authorize access. Tokens persist across sessions.

Public tools work without signing in. You only need to connect your account for personal listening data.

Available tools

Public tools

Tool Description
get_track_info Detailed information about a track
get_artist_info Artist information and bio
get_album_info Album details and track listing
get_artist_top_tracks An artist's globally most-played tracks
get_artist_top_albums An artist's globally most-played albums
get_similar_artists Artists similar to a given artist
get_similar_tracks Tracks similar to a given track
ping Test connectivity
server_info Server status and capabilities
lastfm_auth_status Check authentication status

Personal tools (requires sign-in)

Tool Description
get_recent_tracks Recent listening history (paginated)
get_top_artists Top artists by time period
get_top_albums Top albums by time period
get_top_tracks Top tracks by time period
get_loved_tracks Loved/favorited tracks
get_user_info Last.fm profile information
get_listening_stats Listening statistics
get_music_recommendations Personalized recommendations

Temporal queries (requires sign-in)

Tool Description
get_weekly_chart_list Available historical time periods
get_weekly_artist_chart Artist charts for a specific time period
get_weekly_track_chart Track charts for a specific time period

Good for questions like "when did I start listening to Led Zeppelin?" or "what was I into last March?"

Resources

The server exposes MCP resource URIs:

lastfm://user/{username}/recent          # Recent tracks
lastfm://user/{username}/top-artists     # Top artists
lastfm://user/{username}/top-albums      # Top albums
lastfm://user/{username}/loved           # Loved tracks
lastfm://user/{username}/profile         # User profile
lastfm://track/{artist}/{track}          # Track info
lastfm://artist/{artist}                 # Artist info
lastfm://album/{artist}/{album}          # Album info
lastfm://artist/{artist}/similar         # Similar artists
lastfm://track/{artist}/{track}/similar  # Similar tracks

Prompts

Prompt Description Arguments
listening_insights Analyze listening habits and patterns username, period?
music_discovery Discover music based on listening history username, genre?
track_analysis Detailed analysis of a track artist, track
album_analysis Detailed analysis of an album artist, album
artist_analysis Detailed analysis of an artist artist
listening_habits Summarize listening habits username, timeframe?

Development

Prerequisites

  • Node.js 20 or newer (CI runs 20)
  • Cloudflare Workers account
  • Last.fm API key (create one here)

Local setup

git clone https://github.com/rianvdm/lastfm-mcp.git
cd lastfm-mcp
npm install

Create .dev.vars (or copy .dev.vars.example):

LASTFM_API_KEY=your_api_key
LASTFM_SHARED_SECRET=your_shared_secret
npm run dev

Test with the inspector:

npx @modelcontextprotocol/inspector http://localhost:8787/mcp

Deployment

Set production secrets (or run npm run setup:prod, which creates the KV namespaces and prompts for these):

echo "your_api_key" | wrangler secret put LASTFM_API_KEY --env production
echo "your_shared_secret" | wrangler secret put LASTFM_SHARED_SECRET --env production

Deploy:

npm run deploy:prod

Testing

npm test          # vitest, in workerd via @cloudflare/vitest-pool-workers
npm run lint
npm run build     # wrangler deploy --dry-run: catches type and binding errors

Architecture

  • Runtime: Cloudflare Workers
  • Protocol: MCP (streamable HTTP)
  • Auth: OAuth 2.0 (RFC 9728) via @cloudflare/workers-oauth-provider; the provider owns sessions and tokens
  • Storage: Cloudflare KV for OAuth state, sessions, caching, and rate-limit counters
  • Rate limiting: per-IP on /mcp, so one client can't exhaust the shared Last.fm API key's budget
  • API: Last.fm Web API v2.0

Endpoints

Endpoint Purpose
/mcp MCP JSON-RPC endpoint (rate-limited per IP)
/authorize OAuth 2.0 authorization
/oauth/token OAuth 2.0 token exchange
/oauth/register OAuth 2.0 dynamic client registration
/.well-known/oauth-authorization-server OAuth server metadata
/.well-known/oauth-protected-resource OAuth resource metadata
/.well-known/mcp.json MCP server card (name, version, transport)
/health Health check
/ Landing page

Contributing

  1. Fork the repo
  2. Create a feature branch
  3. Commit your changes
  4. Open a pull request

License

MIT

README fetched from the repository 9 hours ago. The original is authoritative.

Questions

About Lastfm MCP

How do I install Lastfm MCP?

No package has been published for this server, so install it from source: clone the repository and follow its README.

Is Lastfm MCP safe to use with an AI agent?

Its trust score is 72 out of 100 (good). It passes 5 of the 6 static security checks run so far; the failures are listed above. It has no ConduID identity yet, so agent calls to it are not receipted.

Is Lastfm MCP still maintained?

Yes — the latest release is v2.6.0 (5 Oct 2026), and the last commit was 12 days ago. The repository has 52 stars and 6 open issues.