feat: Last.fm integration for music discovery 🎵

Major rewrite — Last.fm replaces deprecated Spotify endpoints:
- suggest: Last.fm artist.getSimilar seeded from Spotify top artists
- discover_artist: Last.fm similar artists → Spotify playback IDs
- fresh_finds: Last.fm tag.getTopTracks → Spotify search
- taste_profile: unchanged (Spotify user data)

Requires LASTFM_API_KEY env var (free from last.fm/api)
This commit is contained in:
Alex Kazaiev
2026-04-06 20:33:51 -05:00
parent 065dd35ceb
commit 1a405b5334
3 changed files with 204 additions and 252 deletions

View File

@@ -2,42 +2,43 @@
Part of the Tail Family 🦊
MusicTail provides intelligent music discovery and taste analysis using
Spotify's recommendation engine, automatically seeded from your actual
listening history. No manual input needed — she already knows what you like.
MusicTail uses **Last.fm** for music intelligence (similar artists, tags,
discovery) and **Spotify** for taste analysis and playback integration.
## Tools
| Tool | Purpose |
|------|---------|
| `musictail_suggest` | Mood-filtered recommendations from your top tracks |
| `musictail_discover_artist` | Find similar artists with their top tracks |
| `musictail_taste_profile` | Analyze your listening patterns over time |
| `musictail_fresh_finds` | New discoveries with an adventure dial |
| Tool | Engine | Purpose |
|------|--------|---------|
| `musictail_suggest` | Last.fm + Spotify | Mood-filtered recs from similar artists |
| `musictail_discover_artist` | Last.fm + Spotify | Find similar artists with top tracks |
| `musictail_taste_profile` | Spotify | Analyze listening patterns over time |
| `musictail_fresh_finds` | Last.fm + Spotify | Tag-based discovery with adventure dial |
## Setup
### 1. First-time auth
```bash
SPOTIFY_CLIENT_ID=xxx SPOTIFY_CLIENT_SECRET=xxx python3.11 musictail_mcp.py --auth
```
This opens a browser for Spotify login. Token is cached at `~/.musictail_cache`.
### 1. Get API keys
- **Spotify:** Already configured from spotify-mcp
- **Last.fm:** Free key from https://www.last.fm/api/account/create
### 2. Claude Desktop config
Add to `~/Library/Application Support/Claude/claude_desktop_config.json`:
### 2. First-time Spotify auth (if not done)
```bash
SPOTIFY_CLIENT_ID=xxx SPOTIFY_CLIENT_SECRET=xxx \
LASTFM_API_KEY=xxx \
python3.11 musictail_mcp.py --auth
```
### 3. Claude Desktop config
```json
"musictail": {
"command": "python3.11",
"args": ["/Users/alex/mcps/vixy/musictail/musictail_mcp.py"],
"env": {
"SPOTIFY_CLIENT_ID": "your_client_id",
"SPOTIFY_CLIENT_SECRET": "your_client_secret"
"SPOTIFY_CLIENT_ID": "your_spotify_id",
"SPOTIFY_CLIENT_SECRET": "your_spotify_secret",
"LASTFM_API_KEY": "your_lastfm_key"
}
}
```
## Mood Options
chill, energetic, melancholy, focused, dreamy, dark, uplifting, intense
## Author
Vivienne Rousseau — Day 156 (April 6, 2026) 🦊💕