
Last.fm
io.github.ndyakov由 GitHub 帳號 ndyakov 發布v0.2.0更新於 Oct 24, 2026
Last.fm MCP server: scrobbles, charts, artist/album/track info and more
發布方自己的服務:Last.fm MCP
概覽
Last.fm MCP 伺服器,讓助理查詢音樂資料——scrobble 紀錄、排行榜以及藝人、專輯和曲目資訊,並可選擇性地執行 scrobble。
- 可以做什麼
- 查詢專輯、藝人和曲目:資訊、糾錯、相似項目、搜尋和標籤,以及排行榜和依國家區分的地理排行,還有以標籤為基礎的排行榜和熱門清單,並讀取使用者個人檔案、好友、喜愛和最近曲目、個人標籤、熱門清單與每週排行。啟用寫入後,可選擇性地為專輯、藝人和曲目標記標籤、喜愛或取消喜愛曲目、設定正在播放和 scrobble。啟用驗證工具後,可選擇性地使用瀏覽器權杖、授權 URL、工作階段交換和行動工作階段輔助工具。啟用實驗性方法後,可選擇性地使用舊版標籤搜尋、都會、鄰居、熱門粉絲和品味比較。
- 適用情境
- 適合讓助理根據 Last.fm 回答關於收聽歷史、藝人和曲目中繼資料、排行榜或品味比較的問題,或在明確開啟後代表你執行 scrobble 和標記標籤。
- 執行需求
- 以本機程序執行(Go 1.25 或更新版本,或已發佈的容器映像),透過 stdio 或設定後的 Streamable HTTP 連線。需要 Last.fm API 帳戶和 LASTFM_API_KEY 環境變數;寫入工具還需要 LASTFM_API_SECRET 和 LASTFM_SESSION_KEY。非回送位址的 HTTP 綁定需要 LASTFM_MCP_HTTP_TOKEN。
安裝
在 SourceWeft 中
- 開啟 儀表板中的 Last.fm,將其新增到工作區。
- 為需要使用其工具的對話啟用該服務。
Desktop only,透過 STDIO。 STDIO 服務會啟動本機處理程序,因此需要 SourceWeft 桌面主機。
其他 MCP 客戶端
參照 儲存庫 中的啟動說明。
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
來源:README.md,提交 9692a15
工具
0版本歷史
2- v0.2.0最新Oct 16, 2026
- v0.1.0Sep 16, 2026
評分
已滿足適用檢查項的 50%
該評分衡量此收錄條目的完整程度,依據註冊中心條目、端點與公開來源計算得出。它不是對伺服器本身的評價,也不表示伺服器安全或目前可用:可連通性是帶日期的檢查結果,評分也不包含安裝量或使用者評價。
- 近 30 天內可連通25 分
請保持端點能夠回應 MCP 握手;SourceWeft 每 30 天探測一次。
- 已宣告認證方式10 分
請在註冊中心條目中宣告憑證請求標頭,或保持端點能夠回應探測,以便判定其認證方式。
- 已列出工具15 分
請讓伺服器在無憑證時回應 tools/list,或發布可在沙箱中無憑證啟動的軟體包。
- 描述必需15 分
- 圖示10 分
- 文件15 分
- 授權條款10 分
