The Vulpes Spotify MCP Server enables AI assistants like Claude to interact with Spotify, allowing them to search for and play tracks, manage playlists, and control playback on your Spotify devices.
The easiest way to install the Vulpes Spotify Server for Claude Desktop is via Smithery:
npx -y @smithery/cli install @ejfox/vulpes-spotify-mcp --client claude
Clone the repository:
git clone https://github.com/yourusername/spotify-mcp.git
cd spotify-mcp
Install dependencies:
npm install
Create a .env
file with your Spotify API credentials:
SPOTIFY_CLIENT_ID=your_client_id
SPOTIFY_CLIENT_SECRET=your_client_secret
SPOTIFY_REDIRECT_URI=http://localhost:8888
# Optional: For playback control
SPOTIFY_REFRESH_TOKEN=your_refresh_token
You can obtain your Client ID and Secret from the Spotify Developer Dashboard.
Generate a refresh token (required for playback control) using one of these methods:
Option 1: Use the built-in script
npm run get-token
Option 2: Use the simple script
node src/simple-auth.js
Add the generated refresh token to your .env
file:
SPOTIFY_REFRESH_TOKEN=your_refresh_token
Build the project:
npm run build
Ensure Spotify is open and playing on your device
Add this server to your Claude Desktop configuration by editing your claude_desktop_config.json
file:
{
"mcpServers": {
"spotify": {
"command": "node",
"args": ["/absolute/path/to/vulpes-spotify-mcp/dist/index.js"],
"env": {
"SPOTIFY_CLIENT_ID": "your_client_id",
"SPOTIFY_CLIENT_SECRET": "your_client_secret",
"SPOTIFY_REDIRECT_URI": "http://localhost:8888",
"SPOTIFY_REFRESH_TOKEN": "your_refresh_token"
}
}
}
}
Replace /absolute/path/to/vulpes-spotify-mcp
with the actual path to the project.
Restart Claude Desktop
The Spotify tools should now appear when you click on the hammer icon in Claude Desktop
.env
file and Claude Desktop configTo add this MCP server to Claude Code, run this command in your terminal:
claude mcp add-json "spotify" '{"command":"node","args":["/absolute/path/to/vulpes-spotify-mcp/dist/index.js"],"env":{"SPOTIFY_CLIENT_ID":"your_client_id","SPOTIFY_CLIENT_SECRET":"your_client_secret","SPOTIFY_REDIRECT_URI":"http://localhost:8888","SPOTIFY_REFRESH_TOKEN":"your_refresh_token"}}'
See the official Claude Code MCP documentation for more details.
There are two ways to add an MCP server to Cursor. The most common way is to add the server globally in the ~/.cursor/mcp.json
file so that it is available in all of your projects.
If you only need the server in a single project, you can add it to the project instead by creating or adding it to the .cursor/mcp.json
file.
To add a global MCP server go to Cursor Settings > Tools & Integrations and click "New MCP Server".
When you click that button the ~/.cursor/mcp.json
file will be opened and you can add your server like this:
{
"mcpServers": {
"spotify": {
"command": "node",
"args": [
"/absolute/path/to/vulpes-spotify-mcp/dist/index.js"
],
"env": {
"SPOTIFY_CLIENT_ID": "your_client_id",
"SPOTIFY_CLIENT_SECRET": "your_client_secret",
"SPOTIFY_REDIRECT_URI": "http://localhost:8888",
"SPOTIFY_REFRESH_TOKEN": "your_refresh_token"
}
}
}
}
To add an MCP server to a project you can create a new .cursor/mcp.json
file or add it to the existing one. This will look exactly the same as the global MCP server example above.
Once the server is installed, you might need to head back to Settings > MCP and click the refresh button.
The Cursor agent will then be able to see the available tools the added MCP server has available and will call them when it needs to.
You can also explicitly ask the agent to use the tool by mentioning the tool name and describing what the function does.
To add this MCP server to Claude Desktop:
1. Find your configuration file:
~/Library/Application Support/Claude/claude_desktop_config.json
%APPDATA%\Claude\claude_desktop_config.json
~/.config/Claude/claude_desktop_config.json
2. Add this to your configuration file:
{
"mcpServers": {
"spotify": {
"command": "node",
"args": [
"/absolute/path/to/vulpes-spotify-mcp/dist/index.js"
],
"env": {
"SPOTIFY_CLIENT_ID": "your_client_id",
"SPOTIFY_CLIENT_SECRET": "your_client_secret",
"SPOTIFY_REDIRECT_URI": "http://localhost:8888",
"SPOTIFY_REFRESH_TOKEN": "your_refresh_token"
}
}
}
}
3. Restart Claude Desktop for the changes to take effect