# Last.fm

> Last.fm is an open-source MCP server. Last.fm MCP server: scrobbles, charts, artist/album/track info and more. It runs locally on your machine and is started by your AI client.

- **Kind:** MCP server
- **Pricing:** Open source
- **Repository:** https://github.com/ndyakov/lastfm-mcp
- **MCP Registry name:** io.github.ndyakov/lastfm-mcp
- **Listing updated:** 2026-11-13

## About

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

## Install

### Claude Code (Terminal)

```sh
claude mcp add lastfm-mcp --env LASTFM_API_KEY='<LASTFM_API_KEY>' --env LASTFM_API_SECRET='<LASTFM_API_SECRET>' -- docker run -i --rm -e LASTFM_API_KEY -e LASTFM_API_SECRET ghcr.io/ndyakov/lastfm-mcp:0.2.0
```

### Claude Desktop (claude_desktop_config.json)

```json
{
  "mcpServers": {
    "lastfm-mcp": {
      "command": "docker",
      "args": [
        "run",
        "-i",
        "--rm",
        "-e",
        "LASTFM_API_KEY",
        "-e",
        "LASTFM_API_SECRET",
        "ghcr.io/ndyakov/lastfm-mcp:0.2.0"
      ],
      "env": {
        "LASTFM_API_KEY": "<LASTFM_API_KEY>",
        "LASTFM_API_SECRET": "<LASTFM_API_SECRET>"
      }
    }
  }
}
```

### Cursor (~/.cursor/mcp.json)

```json
{
  "mcpServers": {
    "lastfm-mcp": {
      "command": "docker",
      "args": [
        "run",
        "-i",
        "--rm",
        "-e",
        "LASTFM_API_KEY",
        "-e",
        "LASTFM_API_SECRET",
        "ghcr.io/ndyakov/lastfm-mcp:0.2.0"
      ],
      "env": {
        "LASTFM_API_KEY": "<LASTFM_API_KEY>",
        "LASTFM_API_SECRET": "<LASTFM_API_SECRET>"
      }
    }
  }
}
```

### VS Code (.vscode/mcp.json)

```json
{
  "servers": {
    "lastfm-mcp": {
      "type": "stdio",
      "command": "docker",
      "args": [
        "run",
        "-i",
        "--rm",
        "-e",
        "LASTFM_API_KEY",
        "-e",
        "LASTFM_API_SECRET",
        "ghcr.io/ndyakov/lastfm-mcp:0.2.0"
      ],
      "env": {
        "LASTFM_API_KEY": "<LASTFM_API_KEY>",
        "LASTFM_API_SECRET": "<LASTFM_API_SECRET>"
      }
    }
  }
}
```

### Windsurf (~/.codeium/windsurf/mcp_config.json)

```json
{
  "mcpServers": {
    "lastfm-mcp": {
      "command": "docker",
      "args": [
        "run",
        "-i",
        "--rm",
        "-e",
        "LASTFM_API_KEY",
        "-e",
        "LASTFM_API_SECRET",
        "ghcr.io/ndyakov/lastfm-mcp:0.2.0"
      ],
      "env": {
        "LASTFM_API_KEY": "<LASTFM_API_KEY>",
        "LASTFM_API_SECRET": "<LASTFM_API_SECRET>"
      }
    }
  }
}
```

### Other clients (your client's MCP settings (most use this shape))

```json
{
  "mcpServers": {
    "lastfm-mcp": {
      "command": "docker",
      "args": [
        "run",
        "-i",
        "--rm",
        "-e",
        "LASTFM_API_KEY",
        "-e",
        "LASTFM_API_SECRET",
        "ghcr.io/ndyakov/lastfm-mcp:0.2.0"
      ],
      "env": {
        "LASTFM_API_KEY": "<LASTFM_API_KEY>",
        "LASTFM_API_SECRET": "<LASTFM_API_SECRET>"
      }
    }
  }
}
```

## FAQ

### Is Last.fm free?

Yes. Last.fm is open source, so you can use and self-host it for free.

### How do I add Last.fm to Claude Code?

Run this command in your terminal: claude mcp add lastfm-mcp --env LASTFM_API_KEY='<LASTFM_API_KEY>' --env LASTFM_API_SECRET='<LASTFM_API_SECRET>' -- docker run -i --rm -e LASTFM_API_KEY -e LASTFM_API_SECRET ghcr.io/ndyakov/lastfm-mcp:0.2.0

---
Source: https://ai-powered.com/mcp/last-fm
