# Last.fm MCP MCP

> Last.fm connects your AI client to global music listening data. Use this MCP to audit scrobbling history, track top artists and albums, and retrieve detailed metadata for any song or artist. It turns complex musical statistics into simple conversational queries for your agent.

## Overview
- **Category:** productivity
- **Price:** Free
- **Tags:** music-discovery, scrobbling, listening-habits, music-metadata, user-profile-analytics

## Description

Your agent can build a complete picture of personal and global music taste without you needing to open a dashboard. Instead of manually navigating menus and filtering dates, your AI client handles the whole process through natural conversation. You ask for top artists from last quarter, or the full metadata for a specific track, and it just works. The system pulls that data directly into your workflow. Since Vinkius hosts this MCP within its catalog, you connect once from any compatible agent, giving you access to deep music analysis tools right where you're coding or writing.

This means whether you’re tracking a friend’s listening habits for a project or just curious about the genre trends of your favorite decade, you get instant, quantified results. You audit everything—from listing recent tracks played to understanding an artist's entire catalog metadata.

## Tools

### get_album_info
Gets metadata for a specific album, including its details and tracklist.

### get_artist_info
Retrieves detailed background information about any given musical artist.

### get_loved_tracks
Lists the songs that a user has marked as their favorites or 'loved' tracks.

### get_recent_tracks
Provides a list of the most recently played songs by the connected user.

### get_top_albums
Shows the top albums that a user has listened to over time.

### get_top_artists
Determines and lists the most popular artists for the connected user.

### get_top_tags
Retrieves a list of trending music tags across the platform, useful for spotting genre shifts.

### get_top_tracks
Lists and ranks the songs that have been streamed most frequently by the user.

### get_track_info
Fetches all available metadata for a single, specific song or track.

### get_user_info
Gathers basic and detailed information about the connected Last.fm user account.

## Prompt Examples

**Prompt:** 
```
List my top 5 tracks this month on Last.fm.
```

**Response:** 
```
I've retrieved your top tracks for the last month. Your #1 song is 'Midnight Jam' by Virtual Band. Would you like the play counts for the rest of the list?
```

**Prompt:** 
```
Show me my recent tracks for user 'vinkius'.
```

**Response:** 
```
I've found your recent listening history. You just finished listening to 'Session 42'. I can provide the timestamps for the last 10 tracks if you like.
```

**Prompt:** 
```
Get information about the artist 'Radiohead'.
```

**Response:** 
```
I've retrieved the metadata for 'Radiohead'. They have over 5 million listeners on Last.fm. Would you like to see their top tags and summary biography?
```

## Capabilities

### Audit Listening History
Get a list of all songs and artists the user has recently listened to over various timeframes.

### Identify Top Content
Determine a user's most-played tracks, albums, or artists at any point in their listening history.

### Retrieve Detailed Metadata
Fetch deep background information on specific songs, albums, or artists.

### Monitor Global Trends
Access top-rated music tags and charts to see what genres are popular worldwide right now.

### Analyze User Profile Data
Pull core user account information, letting you manage or verify profile details through the agent.

## Use Cases

### Analyzing a Friend's Taste
A marketing intern wants to send a personalized birthday message based on the recipient’s favorite artists. They ask their agent: 'What are user X's top 5 artists and what did they listen to last month?' The agent uses `get_top_artists` and `get_recent_tracks` to gather actionable data.

### Researching Genre Shifts
A music blogger needs proof of a genre's decline. They ask the agent to check global trends by running `get_top_tags`. The agent retrieves the latest tags, allowing the blogger to write an article on current musical tastes.

### Cross-referencing Album Details
A record label employee needs to confirm a release date or genre for a specific album. They run `get_album_info` using the album title, getting all the necessary metadata without calling any external databases.

### Building a Recommendation Engine
A developer wants to build an app that recommends music based on current favorites. The agent first runs `get_user_info` and then uses `get_loved_tracks` to pull the core dataset for the recommendation logic.

## Benefits

- Get immediate data on top tracks and artists. Instead of checking a dashboard, your agent just lists out the top 5 songs or the biggest artist for you.
- Track musical trends easily. Use `get_top_tags` to see what genres are trending globally, which is faster than manually browsing charts.
- Deep dive into content. Need to verify details on a specific album? Just call `get_album_info`, and your agent returns the metadata instantly.
- Audit user behavior quickly. With tools like `get_recent_tracks` and `get_loved_tracks`, you can reconstruct listening history for reporting or research.
- Keep everything in one place. By connecting this MCP through Vinkius, you keep music data querying alongside your other operational tasks.

## How It Works

The bottom line is you get real-time, auditable music statistics without ever leaving your coding environment.

1. First, subscribe to this MCP and provide your Last.fm API key credentials.
2. Next, prompt your AI client with a natural language query (e.g., 'Show me my top 10 tracks last month').
3. Your agent executes the necessary tool calls against the music data and returns structured results directly into your chat or script.

## Frequently Asked Questions

**How do I use the `get_user_info` tool with Last.fm?**
You simply ask your agent to retrieve user details. This tool fetches general account information, which helps you verify or manage basic profile credentials within your workflow.

**What is the difference between `get_top_tracks` and `get_recent_tracks`?**
`get_recent_tracks` shows a chronological list of everything played. In contrast, `get_top_tracks` ranks songs based on their total play count over the defined period.

**Can I find out about an artist's whole history using `get_artist_info`?**
Yes, this tool retrieves comprehensive background metadata for any artist. It gives you enough detail to build a solid profile summary for writing or research.

**Do I need multiple tools to see my loved tracks? Use `get_loved_tracks`.**
No, just use the dedicated `get_loved_tracks` function. It isolates your favorited songs and returns them in a clean list for you.

**What's the best way to check global music trends? Use `get_top_tags`.**
`get_top_tags` is designed specifically for this. It bypasses personal history and shows current, trending genre tags across the entire platform.

**If I use `get_album_info` with an unknown album ID, how do I handle the failure?**
The tool returns specific error codes in the response payload. Your agent should check for standard API status messages like 'Not Found' rather than assuming a request failed silently.

**Are there any limits on data when running `get_top_artists`?**
Yes, rate limiting applies to large queries. For full datasets, your agent must look for pagination tokens in the response payload to pull all available results across multiple calls.

**What metadata does `get_track_info` return so I can build a complete record?**
It delivers core data points like duration, explicit tags, and source information. This depth lets your agent create detailed records without needing to make extra calls.

**How do I find my Last.fm API Key?**
Go to the [**Last.fm API account page**](https://www.last.fm/api/account/create), create an API account, and you will find your API Key there. Copy and paste it into the field below.

**Can the agent check my top artists for a specific period?**
Yes. Use the `get_top_artists` tool providing your username and the desired period (e.g., 'overall', '7day', '1month'). Your agent will return your most-listened artists instantly.

**Is it possible to retrieve metadata for a specific track via the agent?**
Yes. The `get_track_info` tool allows your agent to fetch complete metadata for any song by providing the artist and track names, including album and listener counts.