Spotify MCP Server
spotify-mcp MCP-сервер
Проект MCP для подключения Клода к Spotify. Создан на основе API spotipy-dev .
Функции
Запуск, пауза и пропуск воспроизведения
Поиск треков/альбомов/исполнителей/плейлистов
Получить информацию о треке/альбоме/исполнителе/плейлисте
Управляйте очередью Spotify
Управляйте, создавайте и обновляйте плейлисты
Related MCP server: Spotify MCP Server
Демо
Обязательно включите звук.
Конфигурация
Получение ключей API Spotify
Создайте учетную запись на developer.spotify.com . Перейдите на панель управления . Создайте приложение с redirect_uri как http://127.0.0.1:8080/callback . Вы можете выбрать любой порт, но вы должны использовать http и явный адрес обратной связи (IPv4 или IPv6).
См. здесь для получения дополнительной информации/устранения неполадок. Возможно, вам придется перезапустить среду MCP (например, Claude Desktop) один или два раза, прежде чем все заработает.
Запустите этот проект локально
Этот проект еще не настроен для эфемерных сред (например, использование uvx ). Запустите этот проект локально, клонировав этот репозиторий
git clone https://github.com/varunneal/spotify-mcp.gitДобавьте этот инструмент в качестве сервера mcp.
Claude Desktop на MacOS: ~/Library/Application\ Support/Claude/claude_desktop_config.json
Рабочий стол Клода в Windows: %APPDATA%/Claude/claude_desktop_config.json
"spotify": {
"command": "uv",
"args": [
"--directory",
"/path/to/spotify_mcp",
"run",
"spotify-mcp"
],
"env": {
"SPOTIFY_CLIENT_ID": YOUR_CLIENT_ID,
"SPOTIFY_CLIENT_SECRET": YOUR_CLIENT_SECRET,
"SPOTIFY_REDIRECT_URI": "http://127.0.0.1:8080/callback"
}
}Поиск неисправностей
Пожалуйста, откройте проблему, если вы не можете заставить этот MCP работать. Вот несколько советов:
Убедитесь, что
uvобновлен. Я рекомендую версию>=0.54.Убедитесь, что у Клода есть разрешения на выполнение проекта:
chmod -R 755.Убедитесь, что у вас есть премиум-подписка Spotify (необходима для запуска API разработчика).
Этот MCP будет выдавать логи в std err (как указано в спецификации MCP). На Mac приложение Claude Desktop должно выдавать эти логи в ~/Library/Logs/Claude . На других платформах вы можете найти логи здесь .
Вы можете запустить MCP Inspector через npm с помощью этой команды:
npx @modelcontextprotocol/inspector uv --directory /path/to/spotify_mcp run spotify-mcpПосле запуска Инспектор отобразит URL-адрес, к которому вы можете перейти в своем браузере, чтобы начать отладку.
ДЕЛО
К сожалению, куча крутых функций теперь устарела из Spotify API. Большинство новых функций будут относительно незначительными или для здоровья проекта:
тесты.
добавление поддержки API для управления плейлистами.
добавление поддержки API для постраничных результатов поиска/плейлистов/альбомов.
Пиар приветствуется! Спасибо @jamiew, @davidpadbury, @manncodes, @hyuma7, @aanurraj и другим за вклад.
Развертывание
(все дела)
Строительство и издательское дело
Чтобы подготовить пакет к распространению:
Синхронизируем зависимости и обновляем файл блокировки:
uv syncСборка дистрибутивов пакетов:
uv buildЭто создаст исходный код и дистрибутивы wheel в каталоге dist/ .
Опубликовать в PyPI:
uv publishПримечание: вам необходимо задать учетные данные PyPI с помощью переменных среды или флагов команд:
Токен:
--tokenилиUV_PUBLISH_TOKENИли имя пользователя/пароль:
--username/UV_PUBLISH_USERNAMEи--password/UV_PUBLISH_PASSWORD
Available Tools
5 toolsSpotifyGetInfoA
Get detailed information about a Spotify item (track, album, artist, or playlist).
Inputs: item_uri (required).
SpotifyPlaybackB
Manages the current playback with the following actions: - get: Get information about user's current track. - start: Starts playing new item or resumes current playback if called with no uri. - pause: Pauses current playback. - skip: Skips current track.
Inputs: action (required), num_skips, spotify_uri.
SpotifyPlaylistC
Manage Spotify playlists. - get: Get a list of user's playlists. - get_tracks: Get tracks in a specific playlist. - add_tracks: Add tracks to a specific playlist. - remove_tracks: Remove tracks from a specific playlist. - change_details: Change details of a specific playlist.
Inputs: action (required), description, name, playlist_id, +1 more.
SpotifyQueueB
Manage the playback queue - get the queue or add tracks.
Inputs: action (required), track_id.
SpotifySearchB
Search for tracks, albums, artists, or playlists on Spotify.
Inputs: query (required), limit, qtype.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 5 tools
Each tool has a clearly distinct purpose: SpotifyGetInfo retrieves metadata, SpotifyPlayback handles real-time playback control, SpotifyPlaylist manages playlist content and details, SpotifyQueue manages the playback queue, and SpotifySearch performs searches. There is no overlap in functionality that would cause confusion.
All tool names follow a consistent 'Spotify' prefix with a descriptive noun or verb-noun pattern (e.g., SpotifyGetInfo, SpotifyPlayback, SpotifyPlaylist, SpotifyQueue, SpotifySearch). This uniformity makes the tool set predictable and easy to navigate.
With 5 tools, the server is well-scoped for managing Spotify interactions, covering key areas like playback, playlists, search, queue, and general info. Each tool earns its place without feeling bloated or insufficient for the domain.
The tool set provides comprehensive coverage for core Spotify operations, including CRUD for playlists, playback control, search, and queue management. A minor gap is the lack of user profile or library management tools (e.g., managing saved tracks or albums), but agents can still handle most common workflows effectively.
Maintenance
Related MCP Connectors
Connect Claude to your Platform7n workspaces: chat, links, work and decks. One-click OAuth.
- platform7nDeprecatedtech.p7n
Connect Claude to your Platform7n workspaces: chat, links, work and decks. One-click OAuth.
Connect Claude to Fathom meeting recordings, transcripts, and summaries
Connect Claude to Intervals.icu: review runs, rides, swims and strength, plan training, log sets.
Related MCP Servers
- AlicenseBqualityBmaintenanceConnects Claude with Spotify, allowing users to control playback, search for content, get music information, and manage the Spotify queue.4891 PyPI13MIT
- FlicenseAqualityDmaintenanceConnects Claude with Spotify, enabling playback control, search functionality, and queue management through Spotify's API.4-
- FlicenseNot gradedqualityDmaintenanceConnects Claude with Spotify to control playback, search music, get track information, and manage the queue through conversation.1-
- AlicenseNot gradedqualityDmaintenanceEnables Claude to control Spotify features including playback control, playlist management, search, and accessing user's listening history and preferences through the Spotify API.1ISC