music-mcp-agent
Click on "Install Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@music-mcp-agentsearch for Beethoven's Symphony No. 5"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
Music AI Agent — MCP Server - specialized in classical music recognition
A Python MCP server exposing music analysis tools: catalog search, track metadata, local tempo/key/energy detection, recommendations, and optional song recognition.
Why it's built this way
Spotify locked down its audio-features, audio-analysis, recommendations,
and related-artists endpoints for all new apps in November 2024, and hasn't
reopened them. So:
Search + track metadata → still Spotify (works great).
Tempo / key / energy → computed locally with
librosaon an actual audio file, instead of asking Spotify for numbers it no longer gives out.Recommendations → Last.fm's
track.getSimilar, which is still free and public."What song is this?" → a separate problem (audio fingerprinting), done via AudD's API — optional, only needed if you want that specific feature.
Related MCP server: Spotify MCP Server
Setup
cd music-mcp-agent
python -m venv venv
source venv/bin/activate # Windows: venv\Scripts\activate
pip install -r requirements.txt
cp .env.example .envFill in .env:
SPOTIFY_CLIENT_ID/SPOTIFY_CLIENT_SECRET— required for search & metadata. Create an app at https://developer.spotify.com/dashboard (takes ~2 minutes, no approval wait — client-credentials apps don't need extended access).LASTFM_API_KEY— required forget_similar_tracks. Free, instant: https://www.last.fm/api/account/createAUDD_API_KEY— optional, only foridentify_song. Free tier at https://audd.io/
Run it
python server.pyConnect it to Claude Desktop
Add to your Claude Desktop config (claude_desktop_config.json):
{
"mcpServers": {
"music-agent": {
"command": "/absolute/path/to/venv/bin/python",
"args": ["/absolute/path/to/music-mcp-agent/server.py"]
}
}
}Restart Claude Desktop. The tools will show up under the 🔌 icon.
Tools
Tool | Input | What it does |
|
| Search Spotify catalog |
|
| Full metadata for a track |
|
| Tempo, key, energy — no API |
|
| Recommendations via Last.fm |
|
| Fingerprint recognition via AudD |
|
| Extracts composer, work, performers via MusicBrainz |
|
| Upcoming concerts via Songkick |
Classical music: why two extra steps
Spotify and Last.fm treat a classical recording as one flat string —
"Symphony No. 5 in C Minor, Op. 67: I. Allegro con brio" — with composer,
work, and performing orchestra mashed together inconsistently. Neither is a
good source for "what's this piece" or "who's performing it live," so:
resolve_classical_workuses MusicBrainz (free, no key needed beyond a descriptive User-Agent) to split that string into composer + canonical work title.find_live_performancestakes that composer/work/orchestra and searches Songkick's events database for upcoming concerts, optionally filtered by city.
Typical flow: search_music → resolve_classical_work on the result →
find_live_performances with the resolved composer or orchestra name.
Songkick access isn't instant — you have to apply at
https://www.songkick.com/developer and approval is manual (can take a
couple of weeks), so plan for that lead time before you rely on
find_live_performances.
Note on Bachtrack: it's the most classical-specific concert listings site, but it has no public developer API — only a searchable website — so it isn't wired in here.
Next steps to extend this
Add caching (the Spotify token, repeated searches, MusicBrainz lookups) with something like
diskcache— MusicBrainz in particular rate-limits to ~1 request/second per the terms of their free API.Add a
create_playlisttool if you get user-auth (Authorization Code flow) working instead of client-credentials — needed for anything that writes to a user's account.Swap
analyze_audio_fileto batch-process a folder for a full library scan.If AudD's free tier is too limited, ACRCloud is the other common choice for fingerprinting, similar integration shape.
Once Songkick access comes through, consider adding a
subscribe_orchestratool that periodically checks an orchestra's calendar and only surfaces new additions — more useful than re-querying the full calendar each time.
Structure: music-mcp-agent/ ├── config.py # loads all env vars, once ├── server.py # MCP registration only ├── clients/ │ ├── init.py # marks clients/ as a Python package │ ├── spotify.py # search + track info │ ├── audio_analysis.py # local librosa tempo/key/energy │ ├── lastfm.py # similar tracks │ ├── audd.py # song recognition │ ├── musicbrainz.py # classical work resolution │ └── songkick.py # live performances ├── requirements.txt ├── .env.example └── README.md
This server cannot be installed
Maintenance
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
Related MCP Servers
- FlicenseBqualityDmaintenanceEnables interaction with Last.fm music data including searching for artists, albums, and tracks, accessing user listening history, and managing music preferences. Supports both read-only operations and authenticated write operations like scrobbling and loving tracks.345
- Alicense-qualityDmaintenanceEnables interaction with Spotify through natural language for music discovery, playback control, library management, and playlist creation. Supports searching for music, controlling playback, managing saved tracks, and getting personalized recommendations based on mood and preferences.1165MIT
- Flicense-qualityDmaintenanceEnables interaction with Spotify's music catalog through natural language conversations. Search for tracks and artists, get recommendations, explore playlists, and browse artist discographies using the Spotify Web API.
- Alicense-quality-maintenanceConnects Claude to Spotify for music discovery, playlist creation, and collection analysis through natural language. Enables searching songs, analyzing music diversity, creating playlists, and getting recommendations using Spotify's API.
Related MCP Connectors
Search MusicBrainz artists, releases, works, labels; resolve ISRC/ISWC/barcode; fetch cover art.
Privacy-first audio intelligence: BPM, key, waveform. Audio never stored. Pay per second.
Generate AI music via the Lacuna Music API from MCP clients like Claude Desktop & Code.
Latest Blog Posts
- Who's Calling? MCP Hosts Are an Identity Blind Spot (And the Spec Knows It)By Om-Shree-0709 on .mcpAgent IdentityOAuth 2.1
- Your AI Chatbot Just Exposed Your CEO's Salary to an InternBy Om-Shree-0709 on .Agent IdentityMCP SecurityOAuth Delegation
- Why MCP Servers Need Execution Sandboxing (And Why Your Current Stack Isn't Enough)By Om-Shree-0709 on .Agentic AiPrompt InjectionWebAssembly
MCP directory API
We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/thelma-tertrais/music_mcp_agent'
If you have feedback or need assistance with the MCP directory API, please join our Discord server