user_top_tracks

Pack: last-fm · Endpoint: https://gateway.pipeworx.io/last-fm/mcp

Fetch a Last.fm user’s most-scrobbled tracks for a given period (overall/7day/1month/3month/6month/12month); returns track names, artists, and play counts.

Parameters

NameTypeRequiredDescription
userstringyes
periodstringno
limitnumberno

Example call

Arguments

{
  "user": "rj"
}

curl

curl -X POST https://gateway.pipeworx.io/last-fm/mcp \
  -H 'Content-Type: application/json' \
  -d '{"jsonrpc":"2.0","id":1,"method":"tools/call","params":{"name":"user_top_tracks","arguments":{"user":"rj"}}}'

TypeScript (@pipeworx/sdk)

import { Pipeworx } from '@pipeworx/sdk';
const pipeworx = new Pipeworx();

const result = await pipeworx.call('user_top_tracks', {
  "user": "rj"
});

More examples

{
  "user": "lastfmuser",
  "period": "7day",
  "limit": 20
}

Response shape

FieldTypeDescription
toptracksobjectUser top tracks container
Full JSON Schema
{
  "type": "object",
  "properties": {
    "toptracks": {
      "type": "object",
      "description": "User top tracks container",
      "properties": {
        "track": {
          "type": "array",
          "description": "Array of user top tracks",
          "items": {
            "type": "object",
            "properties": {
              "name": {
                "type": "string",
                "description": "Track name"
              },
              "playcount": {
                "type": "string",
                "description": "User's play count"
              },
              "url": {
                "type": "string",
                "description": "Track URL"
              },
              "artist": {
                "type": "object",
                "properties": {
                  "name": {
                    "type": "string"
                  },
                  "url": {
                    "type": "string"
                  }
                }
              },
              "image": {
                "type": "array",
                "items": {
                  "type": "object",
                  "properties": {
                    "size": {
                      "type": "string"
                    },
                    "#text": {
                      "type": "string"
                    }
                  }
                }
              }
            }
          }
        },
        "@attr": {
          "type": "object",
          "properties": {
            "user": {
              "type": "string"
            },
            "period": {
              "type": "string"
            },
            "page": {
              "type": "string"
            },
            "perPage": {
              "type": "string"
            },
            "totalPages": {
              "type": "string"
            },
            "total": {
              "type": "string"
            }
          }
        }
      }
    }
  }
}

Connect

Add this to your MCP client config, or use one-click install buttons:

{
  "mcpServers": {
    "last-fm": {
      "url": "https://gateway.pipeworx.io/last-fm/mcp"
    }
  }
}

See Getting Started for client-specific install steps.

Regenerated from source · build July 6, 2026