Last.fm

v0.2.0
io.github.ndyakov/lastfm-mcp Checked 8 hours ago Published 1 month ago

Last.fm MCP server: scrobbles, charts, artist/album/track info and more

Values you need

VariableWhat it is
LASTFM_API_KEYrequired secret Last.fm API key (https://www.last.fm/api/account/create)
LASTFM_API_SECREToptional secret Last.fm API secret; only needed for authenticated/write methods
LASTFM_ENABLE_WRITESoptional Set to 1 to enable scrobbling/write tools

Docker discovery passed

Requires Docker

Run in a terminal
claude mcp add lastfm-mcp -e 'LASTFM_API_KEY=<LASTFM_API_KEY>' -- docker run -i --rm -e LASTFM_API_KEY ghcr.io/ndyakov/lastfm-mcp:0.2.0
Add to claude_desktop_config.json
{
  "mcpServers": {
    "lastfm-mcp": {
      "args": [
        "run",
        "-i",
        "--rm",
        "-e",
        "LASTFM_API_KEY",
        "ghcr.io/ndyakov/lastfm-mcp:0.2.0"
      ],
      "command": "docker",
      "env": {
        "LASTFM_API_KEY": "<LASTFM_API_KEY>"
      }
    }
  }
}
Add to ~/.cursor/mcp.json
{
  "mcpServers": {
    "lastfm-mcp": {
      "args": [
        "run",
        "-i",
        "--rm",
        "-e",
        "LASTFM_API_KEY",
        "ghcr.io/ndyakov/lastfm-mcp:0.2.0"
      ],
      "command": "docker",
      "env": {
        "LASTFM_API_KEY": "<LASTFM_API_KEY>"
      }
    }
  }
}
Add to .vscode/mcp.json
{
  "inputs": [
    {
      "description": "LASTFM_API_KEY",
      "id": "lastfm-api-key",
      "password": true,
      "type": "promptString"
    }
  ],
  "servers": {
    "lastfm-mcp": {
      "args": [
        "run",
        "-i",
        "--rm",
        "-e",
        "LASTFM_API_KEY",
        "ghcr.io/ndyakov/lastfm-mcp:0.2.0"
      ],
      "command": "docker",
      "env": {
        "LASTFM_API_KEY": "${input:lastfm-api-key}"
      },
      "type": "stdio"
    }
  }
}
Add to ~/.codex/config.toml
[mcp_servers.lastfm-mcp]
command = "docker"
args = ["run", "-i", "--rm", "-e", "LASTFM_API_KEY", "ghcr.io/ndyakov/lastfm-mcp:0.2.0"]
env = { "LASTFM_API_KEY" = "<LASTFM_API_KEY>" }

For AI agents

  1. Ask the user for: LASTFM_API_KEY. Never invent or guess these values; secrets go into the client config, not into chat logs.
  2. Pick the user's MCP client and apply the matching config from the first install method (it is the one verified by the smoke test when available).
  3. Restart or reload the client so it starts the server.
  4. Verify: the server should expose these tools: lastfm_album_get_info, lastfm_album_get_tags, lastfm_album_get_top_tags, lastfm_album_search, lastfm_artist_get_correction, lastfm_artist_get_info, lastfm_artist_get_similar, lastfm_artist_get_tags, ….
  5. If it fails, check that the required runtime is installed (Docker) and that the values above are set.

Machine-readable: install.md · manifest.json