Skip to main content
0

How to Use Spotify MCP Server with Your AI

A
a-gnt4 min read

Step-by-step guide to controlling Spotify playback, searching music, and managing playlists directly from your AI assistant using the Spotify MCP server.

How to Use Spotify MCP Server with Your AI

Imagine telling your AI assistant "play something chill for working" and having your Spotify instantly start playing a lo-fi playlist. That is exactly what the Spotify MCP server makes possible. It connects your AI directly to Spotify, letting you control playback, search for music, manage playlists, and discover new artists without ever leaving your conversation.

The Spotify MCP server bridges the gap between your AI assistant and one of the world's most popular music platforms. Instead of switching between apps, you keep your focus where it belongs and let your AI handle the music.

What It Does

The Spotify MCP server gives your AI the ability to interact with Spotify's full API. That means your AI can search for songs, albums, and artists. It can control playback on any of your connected devices, including play, pause, skip, and volume control. It can create and modify playlists, fetch your recently played tracks, and get recommendations based on your listening history.

Think of it as giving your AI a remote control for your music library, except this remote control also understands natural language.

Prerequisites

Before you set things up, make sure you have the following ready:

  • A Spotify Premium account. Playback control features require Premium. Free accounts can still search and browse, but cannot control what is playing.
  • A Spotify Developer account. Head to developer.spotify.com and create an app to get your Client ID and Client Secret.
  • Node.js 18 or later installed on your machine.
  • An MCP-compatible AI client such as Claude Desktop, Cursor, or Windsurf.

Step-by-Step Setup

1. Create a Spotify Developer App

Go to the Spotify Developer Dashboard, click "Create App," and fill in the details. Set the redirect URI to http://localhost:8888/callback. Save your Client ID and Client Secret somewhere safe.

2. Install the MCP Server

Add the Spotify MCP server to your AI client's configuration. In your MCP settings file, add the following:

json{
  "mcpServers": {
    "spotify": {
      "command": "npx",
      "args": ["-y", "mcp-spotify"],
      "env": {
        "SPOTIFY_CLIENT_ID": "your_client_id_here",
        "SPOTIFY_CLIENT_SECRET": "your_client_secret_here",
        "SPOTIFY_REDIRECT_URI": "http://localhost:8888/callback"
      }
    }
  }
}

3. Authenticate

When you first use the server, it will open a browser window asking you to log in to Spotify and authorize the app. Complete the authorization flow and the server will store your tokens for future sessions.

4. Restart Your AI Client

After saving the configuration, restart your AI client. The Spotify tools should now appear in your available MCP tools list.

Things to Try

Once everything is connected, here are some practical ways to put it to use:

  • "Play my Discover Weekly playlist." Your AI will find and start playing your personalized Discover Weekly mix on your active Spotify device.
  • "Create a playlist called 'Morning Run' with 15 high-energy songs around 140 BPM." The AI will search for tracks that match your criteria, create the playlist, and add them.
  • "What have I been listening to this week?" Get a summary of your recent listening history, including your most-played artists and tracks.
  • "Skip this song and turn the volume down to 40%." Real-time playback control without touching your phone or desktop app.
  • "Find me something similar to Khruangbin but more electronic." Leverage Spotify's recommendation engine through your AI to discover new music based on specific tastes.

Tips and Tricks

Use specific language for better results. Instead of "play some music," try "play the album In Rainbows by Radiohead on my living room speaker." The more specific you are, the more accurate the result.

Combine with other tasks. The real power shows up when you weave music control into larger workflows. Ask your AI to set a 25-minute focus timer and start a concentration playlist at the same time.

Manage multiple devices. If you have Spotify running on several devices, you can tell your AI which one to target. Ask it to list your available devices first, then direct playback to the one you want.

Build playlists collaboratively. Describe a mood, a genre, or even a scenario like "dinner party for six people who all like jazz and soul" and let the AI curate a playlist for you.

Tools That Pair Well

The Spotify MCP server becomes even more useful when combined with other tools on a-gnt. The Filesystem MCP server can help you organize downloaded music files. If you are building a music-related project, the GitHub MCP server lets you manage your code while your AI handles the soundtrack. And for scheduling music-related tasks or reminders, pairing with a productivity tool like Linear keeps everything organized.

Find It on a-gnt

Ready to get started? Check out the full listing for the Spotify MCP server on a-gnt for installation details, user reviews, and more configuration options.

Share this post:

Ratings & Reviews

0.0

out of 5

0 ratings

No reviews yet. Be the first to share your experience.