MCP_Server_Spotify
Description
<<<<<<< HEAD # Spotify MCP Server for Claude Desktop A Message Control Protocol (MCP) server that enables Claude Desktop to control Spotify playback through natural language commands. ## Features - Control Spotify playback (play, pause, next, previous) - Search for tracks - Get…
About
<<<<<<< HEAD # Spotify MCP Server for Claude Desktop A Message Control Protocol (MCP) server that enables Claude Desktop to control Spotify playback through natural language commands. ## Features - Control Spotify playback (play, pause, next, previous) - Search for tracks - Get current track information - Automatic…
Details
- Author
- Hashim9184
- Downloads
- 338
- Categories
- Media
Jump to
- Control Spotify playback (play, pause, next, previous)
- Search for tracks
- Get current track information
- Automatic token refresh
- Robust error handling and logging
- Easy authentication process
Setting up with Highlight
This MCP is not yet compatible with Highlight’s one-click setup. However, you can still use it with Highlight by following these steps:
- Download and install Highlight from highlightai.com/download
- Navigate to the plugins tab and select "Add Custom Plugin"
-
Configure the plugin with the settings below
Plugin Name
MCP_Server_SpotifyCommand (node, npx, python, etc.)Please refer to the README for specific instructions on how to obtain API keys or other required environment variables.
- Enable "Start Automatically" if you want the plugin to start when Highlight launches
From the repository
Clone the repository, install Python dependencies, create a .env file with your Spotify Client ID and Client Secret, and run python authenticate_spotify.py to complete authentication. Then start the server with python run_spotify_server.py and copy the claude_mcp_config.json to Claude Desktop’s MCP configuration directory. After restarting Claude Desktop, use commands like “Play Bohemian Rhapsody on Spotify,” “Pause the music,” or “Skip to next track.”
Claude Desktop / Cursor
Paste into your MCP client config file to install this server.
{
"mcpServers": {
"mcp_server_spotify": {
"MCP_Server_Spotify": {
"command": "python",
"args": [
"authenticate_spotify.py"
]
}
}
}
}
McpServers
{
"MCP_Server_Spotify": {
"command": "python",
"args": [
"authenticate_spotify.py"
]
}
}
<<<<<<< HEAD
Spotify MCP Server for Claude Desktop
A Message Control Protocol (MCP) server that enables Claude Desktop to control Spotify playback through natural language commands.
Features
- Control Spotify playback (play, pause, next, previous)
- Search for tracks
- Get current track information
- Automatic token refresh
- Robust error handling and logging
- Easy authentication process
Prerequisites
- Python 3.7 or higher
- Spotify Premium account
- Spotify Developer account
- Claude Desktop
Installation
1. Clone the repository:
git clone https://github.com/yourusername/spotify-mcp-server.git
cd spotify-mcp-server
2. Install dependencies:
pip install -r requirements.txt
3. Set up Spotify Developer credentials:
- Go to Spotify Developer Dashboard
- Create a new application
- Add http://localhost:8888/callback as a redirect URI
- Copy your Client ID and Client Secret
4. Create a .env file:
cp .env.example .env
Then edit
.env and add your Spotify credentials:SPOTIFY_CLIENT_ID=your_client_id_here
SPOTIFY_CLIENT_SECRET=your_client_secret_here
Usage
1. Authenticate with Spotify:
python authenticate_spotify.py
Follow the prompts to complete authentication.
2. Start the MCP server:
python run_spotify_server.py
3. Configure Claude Desktop:
- Copy claude_mcp_config.json to Claude Desktop's MCP configuration directory:
- Windows: %APPDATA%\Claude Desktop\mcp\
- macOS: ~/Library/Application Support/Claude Desktop/mcp/
- Linux: ~/.config/Claude Desktop/mcp/
- Restart Claude Desktop
4. Use Claude Desktop to control Spotify with commands like:
- "Play Bohemian Rhapsody on Spotify"
- "Pause the music"
- "Skip to next track"
- "What song is currently playing?"
Testing
Run the test script to verify the server is working:
python test_spotify_server.py
Project Structure
spotify-mcp-server/
├── README.md
├── requirements.txt
├── .env.example
├── claude_mcp_config.json
├── spotify_mcp_server.py # Main server implementation
├── run_spotify_server.py # Server wrapper script
├── authenticate_spotify.py # Authentication helper
└── test_spotify_server.py # Test script
Logging
The server generates several log files:
- spotify_mcp_server.log: Main server logs
- server_output.log: Server stdout/stderr
- wrapper_error.log: Wrapper script errors
Contributing
1. Fork the repository
2. Create your feature branch (git checkout -b feature/amazing-feature)
3. Commit your changes (git commit -m 'Add some amazing feature')
4. Push to the branch (git push origin feature/amazing-feature)
5. Open a Pull Request
License
This project is licensed under the MIT License - see the LICENSE file for details.
Acknowledgments
- Spotipy - Python library for the Spotify Web API
- Flask - Web framework
- Claude Desktop - AI assistant
=======
MCP_Server_Spotify
>>>>>>> 5288f1d010d9cb20435bde5e0798226500eb0489
Sign in to leave a review
Use Google, GitHub, or an email account so ratings stay tied to real people.
No reviews posted yet.
