Melody
FreeNot checkedA Model Context Protocol (MCP) server that exposes Spotify playback controls, playlist generation, music discovery, and web search tools for integration with La
About
A Model Context Protocol (MCP) server that exposes Spotify playback controls, playlist generation, music discovery, and web search tools for integration with Large Language Models.
README
A Model Context Protocol (MCP) server that exposes Spotify playback controls, playlist generation, music discovery, and web search tools for integration with Large Language Models.
Features
🔐 Built-in Authentication
- Automatic Spotify OAuth flow with browser-based login
- Secure token management and refresh
- No manual token handling required
Spotify Playback Controls
- Play specific tracks
- Pause/resume playback
- Skip tracks (next/previous)
- Control volume
- Manage playback queue
- Get currently playing track
- Device management
Playlist Management
- Create playlists from prompts using AI
- Generate playlists based on listening history
- Create playlists from provided tracks or artists
- Search for tracks and artists (no auth required)
Music Discovery
- Intelligent music search using Last.fm API
- Get top tracks by genre/tag
- Find similar artists and tracks
- Get artist top tracks
Web Search
- Google Custom Search integration for music-related queries
Quick Start
- Install dependencies:
npm install
- Configure environment variables:
cp env.example .env
# Edit .env with your API keys
- Start the server:
npm start
- Authenticate with Spotify (when prompted by Claude):
- Use the
spotify_authenticatetool - Browser will open automatically for Spotify login
- Complete the OAuth flow
- Return to Claude Desktop to use playback features
- Use the
Authentication Flow
The MCP server includes a built-in authentication system:
Check Authentication Status:
Use: spotify_check_authLogin to Spotify:
Use: spotify_authenticate- Opens browser automatically
- Complete Spotify OAuth
- Tokens managed automatically
Logout:
Use: spotify_logout
Tool Categories
🔐 Authentication Tools (3 tools)
spotify_authenticate- Login to Spotifyspotify_check_auth- Check authentication statusspotify_logout- Logout from Spotify
🎵 Playback Controls (11 tools - require authentication)
spotify_play_track- Play specific tracksspotify_pause/resume- Control playbackspotify_skip_next/previous- Track navigationspotify_set_volume- Volume controlspotify_add_to_queue- Queue managementspotify_get_currently_playing- Current track infospotify_get_devices- Device managementspotify_transfer_playback- Switch devicesspotify_seek- Position control
🔍 Search Tools (2 tools - no authentication required)
spotify_search_track- Find tracksspotify_search_artist- Find artists
📝 Playlist Generation (3 tools)
playlist_create_from_prompt- AI-generated from textplaylist_create_from_tracks- Based on provided tracksplaylist_create_from_artists- Based on provided artists
🎼 Music Discovery (4 tools)
music_discovery_search- Intelligent Last.fm searchmusic_discovery_by_genre- Genre-based discoverymusic_discovery_similar_artist- Find similar artistsmusic_discovery_artist_top_tracks- Artist's popular songs
🌐 Web Search (1 tool)
web_search- Google Custom Search integration
Total: 24 tools
Configuration
Create a .env file in the root directory with the following variables:
# Spotify API Credentials
SPOTIFY_CLIENT_ID=your_spotify_client_id
SPOTIFY_CLIENT_SECRET=your_spotify_client_secret
# Last.fm API (for music discovery)
LASTFM_API_KEY=your_lastfm_api_key
# Google Search API (for web search)
GOOGLE_SEARCH_API_KEY=your_google_search_api_key
GOOGLE_SEARCH_CX_ID=your_google_search_cx_id
# OpenAI API Key (for playlist generation)
OPENAI_API_KEY=your_openai_api_key
Getting API Keys
Spotify API
- Go to Spotify Developer Dashboard
- Create a new app
- Copy the Client ID and Client Secret
Last.fm API
- Go to Last.fm API
- Create an API account
- Copy the API key
Google Custom Search API
- Go to Google Cloud Console
- Enable the Custom Search API
- Create credentials and copy the API key
- Set up a Custom Search Engine at Google CSE
OpenAI API
- Go to OpenAI Platform
- Create an API key
Usage with MCP Clients
This server can be integrated with any MCP-compatible client. The server exposes tools for:
spotify_play_track- Play a specific trackspotify_pause- Pause playbackspotify_resume- Resume playbackspotify_skip_next- Skip to next trackspotify_skip_previous- Skip to previous trackspotify_set_volume- Set playback volumespotify_add_to_queue- Add track to queuespotify_get_currently_playing- Get current track infospotify_search_track- Search for tracksspotify_search_artist- Search for artistsplaylist_create_from_prompt- Generate playlist from text promptplaylist_create_from_tracks- Create playlist from provided tracksplaylist_create_from_artists- Create playlist from provided artistsmusic_discovery_search- Intelligent music searchmusic_discovery_by_genre- Get tracks by genremusic_discovery_similar_artist- Find similar artistsmusic_discovery_artist_top_tracks- Get artist's top tracksweb_search- Perform web search
Authentication
For Spotify functionality, you'll need to provide a valid Spotify access token. The server expects this to be passed as a parameter to Spotify-related tools.
License
MIT
Installing Melody
This server has no published package — it is built from source. Open the repository and follow its README.
▸ github.com/AndrewKaranu/Melody-MCP-ServerFAQ
Is Melody MCP free?
Yes, Melody MCP is free — one-click install via Unyly at no cost.
Does Melody need an API key?
No, Melody runs without API keys or environment variables.
Is Melody hosted or self-hosted?
Self-hosted: the server runs locally on your machine via the install command above.
How do I install Melody in Claude Desktop, Claude Code or Cursor?
Open Melody on unyly.org, pick your client tab (Claude Desktop, Claude Code, Cursor) and press Install — the config is generated automatically, no JSON editing.
Related MCPs
ARA
Generate images, video and audio from any AI agent — one connector.
by ARAOmni Video
An MCP server that transforms LLM-enabled IDEs into professional video editors by pre-processing footage into text proxies, generating motion graphics via HTML/
by buildwithtazaYouTube
Transcripts, channel stats, search
by YouTubeEverArt
AI image generation using various models.
by modelcontextprotocolCompare Melody with
Not sure what to pick?
Find your stack in 60 seconds
Author?
Embed badge for your README
Browse similar
All media MCPs
