mcp-lastfm

mcp-lastfm

Provides 41 read-only tools to search and browse Last.fm data, including artists, albums, tracks, user scrobble history, and charts.

Category
访问服务器

README

<div align="center">

TypeScript Node.js npm MIT

MCP server for Last.fm — discover artists, albums and tracks, and browse scrobble history and charts.

<a href="https://kud.io/projects/mcp-lastfm">Website</a> · <a href="https://kud.io/projects/mcp-lastfm/docs">Documentation</a>

</div>

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 country
  • Name 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 optional MCP_LASTFM_USERNAME to default the user tools to your own account
  • Safe by design — read-only throughout; no scrobbling, no writes, nothing that touches a user's Last.fm account

Install

npm install -g @kud/mcp-lastfm

Or install as a Claude plugin from the kud marketplace:

/plugin install lastfm@kud

npm publish is pending — until @kud/mcp-lastfm lands on the registry, install from source (see Development).

Getting an API key

  1. Go to last.fm/api/account/create (you'll need to be signed in to a Last.fm account).
  2. 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.
  3. 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
MCP_LASTFM_API_KEY yes Authenticates every request
MCP_LASTFM_USERNAME no Default account for the get_user_* tools, so you can ask "what have I been listening to?" without repeating your username. An explicit user argument still overrides it, so you can look up anyone's public profile.

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_artists Search for artists by name
search_albums Search for albums by name
search_tracks Search for tracks by name, optionally scoped to an artist

Artist

Tool Description
get_artist Artist bio, listener/play stats, and tags
get_similar_artists Artists similar to a given one, with match scores
get_artist_top_tracks An artist's most-played tracks
get_artist_top_albums An artist's most-played albums
get_artist_top_tags The tags most applied to an artist
correct_artist Last.fm's canonical spelling for a misspelled artist name

Album & Track

Tool Description
get_album Album info, tracklist, and tags
get_album_top_tags The tags most applied to an album
get_track Track info, stats, and tags
get_similar_tracks Tracks similar to a given one
get_track_top_tags The tags most applied to a track
correct_track Last.fm's canonical spelling for a misspelled track/artist

User

Tool Description
get_user_info A user's profile and listening stats
get_user_recent_tracks Recent scrobbles, including the currently playing track
get_user_top_artists Most-played artists over a time period
get_user_top_tracks Most-played tracks over a time period
get_user_top_albums Most-played albums over a time period
get_user_loved_tracks Tracks the user has marked as loved
get_user_friends The user's Last.fm friends
get_user_personal_tags Items the user has tagged with a given tag
get_user_top_tags The user's most-used tags
get_user_weekly_album_chart Album play chart for a given week
get_user_weekly_artist_chart Artist play chart for a given week
get_user_weekly_track_chart Track play chart for a given week
get_user_weekly_chart_list Available weekly-chart date ranges

Chart

Tool Description
get_chart_top_artists The most popular artists on Last.fm right now
get_chart_top_tracks The most popular tracks on Last.fm right now
get_chart_top_tags The most popular tags on Last.fm right now

Tag

Tool Description
get_tag_top_artists Top artists for a tag
get_tag_top_tracks Top tracks for a tag
get_tag_info A tag's description and usage stats
get_similar_tags Tags similar to a given one
get_tag_top_albums Top albums for a tag
get_top_tags The most popular tags globally
get_tag_weekly_chart_list Available weekly-chart date ranges for a tag

Geo

Tool Description
get_geo_top_artists Top artists in a given country
get_geo_top_tracks Top tracks in a given country

Library

Tool Description
get_library_artists 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 dev

Inspect the server interactively with the MCP inspector:

npm run inspect:dev

📚 Full documentation → mcp-lastfm/docs </content>

推荐服务器

Baidu Map

Baidu Map

百度地图核心API现已全面兼容MCP协议,是国内首家兼容MCP协议的地图服务商。

官方
精选
JavaScript
Playwright MCP Server

Playwright MCP Server

一个模型上下文协议服务器,它使大型语言模型能够通过结构化的可访问性快照与网页进行交互,而无需视觉模型或屏幕截图。

官方
精选
TypeScript
Magic Component Platform (MCP)

Magic Component Platform (MCP)

一个由人工智能驱动的工具,可以从自然语言描述生成现代化的用户界面组件,并与流行的集成开发环境(IDE)集成,从而简化用户界面开发流程。

官方
精选
本地
TypeScript
Audiense Insights MCP Server

Audiense Insights MCP Server

通过模型上下文协议启用与 Audiense Insights 账户的交互,从而促进营销洞察和受众数据的提取和分析,包括人口统计信息、行为和影响者互动。

官方
精选
本地
TypeScript
VeyraX

VeyraX

一个单一的 MCP 工具,连接你所有喜爱的工具:Gmail、日历以及其他 40 多个工具。

官方
精选
本地
graphlit-mcp-server

graphlit-mcp-server

模型上下文协议 (MCP) 服务器实现了 MCP 客户端与 Graphlit 服务之间的集成。 除了网络爬取之外,还可以将任何内容(从 Slack 到 Gmail 再到播客订阅源)导入到 Graphlit 项目中,然后从 MCP 客户端检索相关内容。

官方
精选
TypeScript
Kagi MCP Server

Kagi MCP Server

一个 MCP 服务器,集成了 Kagi 搜索功能和 Claude AI,使 Claude 能够在回答需要最新信息的问题时执行实时网络搜索。

官方
精选
Python
e2b-mcp-server

e2b-mcp-server

使用 MCP 通过 e2b 运行代码。

官方
精选
Neon MCP Server

Neon MCP Server

用于与 Neon 管理 API 和数据库交互的 MCP 服务器

官方
精选
Exa MCP Server

Exa MCP Server

模型上下文协议(MCP)服务器允许像 Claude 这样的 AI 助手使用 Exa AI 搜索 API 进行网络搜索。这种设置允许 AI 模型以安全和受控的方式获取实时的网络信息。

官方
精选