lastfm-lyrics
by thaimtl
README.md
# Music Lyrics MCP Server
Ask Claude to analyze the song you're currently listening to LIVE on Spotify, and it will automatically look up what's playing and fetch the lyrics.
If you listen to mumble rap as much as me, you might find this useful. Sometimes, I just lost track of what the artist is singing, but I keep following because the flow is so good:)
## How it works
1. You play music in Spotify
2. Last.fm detects what's playing and logs it in real-time
3. Claude reads that from Last.fm, fetches the lyrics from Genius, and answers your question
## Prerequisites
- [Claude Desktop](https://claude.ai/download) (Windows or Mac)
- A [Last.fm account](https://www.last.fm) with Spotify connected for scrobbling
- A [Genius API token](https://genius.com/api-clients)
- Python 3.10+
## Setup
**1. Install dependencies**
```bash
pip install -r requirements.txt
```
**2. Configure credentials**
```bash
cp .env.example .env
```
Fill in `.env` with your Last.fm API key, secret, username, and Genius token.
**3. Connect Spotify to Last.fm**
Go to https://www.last.fm/settings/applications and connect Spotify. This enables scrobbling — Last.fm will track what you play in Spotify automatically.
**4. Get a Last.fm API key**
Go to https://www.last.fm/api/account/create. Leave the callback URL blank. Copy the API key and shared secret into `.env`.
**5. Register with Claude Desktop**
On Windows (Microsoft Store), edit:
`%LOCALAPPDATA%\Packages\Claude_pzs8sxrjxfjjc\LocalCache\Roaming\Claude\claude_desktop_config.json`
```json
{
"mcpServers": {
"lastfm-lyrics": {
"command": "python",
"args": ["C:/absolute/path/to/server.py"]
}
}
}
```
Fully quit and reopen Claude Desktop. The tools will appear automatically.
## Usage
Play a song in Spotify, then ask Claude:
- "What am I listening to?"
- "Analyze what I'm listening to"
- "What's the mood of this song?"
- "What themes does this song explore?"
- "Tell me about the artist I'm listening to"
- "Get the lyrics for Blinding Lights by The Weeknd"
## Notes
- Spotify free tier works — no Premium required
- There is a ~10–30 second delay between when a track starts and when Last.fm reports it
- Claude can analyze lyrics but will not reproduce them verbatim (copyright policy)
This server cannot be deployed
Maintenance
ActivityInactive
ResponsivenessNo issues