Spotify MCP Server
spotify-mcp MCP 서버
Claude와 Spotify를 연결하는 MCP 프로젝트입니다. spotipy-dev의 API를 기반으로 구축되었습니다.
특징
재생 시작, 일시 정지 및 건너뛰기
트랙/앨범/아티스트/재생목록 검색
트랙/앨범/아티스트/재생목록에 대한 정보 얻기
Spotify 대기열 관리
Related MCP server: Spotify MCP Server
데모
오디오를 켜두세요
구성
Spotify API 키 받기
developer.spotify.com 에서 계정을 만드세요. 대시보드 로 이동하세요. 'redirect_uri'를 http://localhost:8888 로 설정하여 앱을 만드세요. (원하는 포트를 선택할 수 있지만 http와 localhost를 사용해야 합니다.) 저는 "사용되는 API"를 "웹 재생 SDK"로 설정했습니다.
이 프로젝트를 로컬로 실행하세요
이 프로젝트는 아직 임시 환경(예: uvx 사용)에 맞게 설정되지 않았습니다. 이 저장소를 복제하여 로컬에서 프로젝트를 실행하세요.
지엑스피1
이 도구를 mcp 서버로 추가합니다.
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://localhost:8888"
}
}문제 해결
이 MCP가 작동하지 않으면 문제를 제기해 주세요. 몇 가지 팁을 알려드리겠습니다.
uv최신 상태인지 확인하세요.>=0.54버전을 권장합니다.클로드에게 프로젝트에 대한 실행 권한이 있는지 확인하세요:
chmod -R 755.Spotify 프리미엄이 있는지 확인하세요(개발자 API를 실행하는 데 필요).
할 일
안타깝게도 Spotify API에서 여러 가지 멋진 기능이 지원 중단되었습니다 . 대부분의 새로운 기능은 비교적 사소하거나 프로젝트 운영에 도움이 될 것입니다.
테스트.
재생목록 관리를 위한 API 지원 추가.
페이지별 검색 결과/재생 목록/앨범에 대한 API 지원 추가.
전개
(할 일)
건축 및 출판
배포를 위해 패키지를 준비하려면:
종속성 동기화 및 잠금 파일 업데이트:
uv sync패키지 배포 빌드:
uv build이렇게 하면 dist/ 디렉토리에 소스와 휠 배포판이 생성됩니다.
PyPI에 게시:
uv publish참고: 환경 변수나 명령 플래그를 통해 PyPI 자격 증명을 설정해야 합니다.
토큰:
--token또는UV_PUBLISH_TOKEN또는 사용자 이름/비밀번호:
--username/UV_PUBLISH_USERNAME및--password/UV_PUBLISH_PASSWORD
디버깅
MCP 서버는 stdio를 통해 실행되므로 디버깅이 어려울 수 있습니다. 최상의 디버깅 환경을 위해서는 MCP Inspector 사용을 강력히 권장합니다.
다음 명령을 사용하여 npm 통해 MCP Inspector를 시작할 수 있습니다.
npx @modelcontextprotocol/inspector uv --directory /Users/varun/Documents/Python/spotify_mcp run spotify-mcpInspector를 실행하면 브라우저에서 접근하여 디버깅을 시작할 수 있는 URL이 표시됩니다.
Available Tools
4 toolsSpotifyGetInfoC
Get detailed information about a Spotify item (track, album, artist, or playlist).
| Name | Required | Description | Default |
|---|---|---|---|
| item_id | Yes | ID of the item to get information about | |
| qtype | No | Type of item: 'track', 'album', 'artist', or 'playlist'. If 'playlist' or 'album', returns its tracks. If 'artist',returns albums and top tracks. | track |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
With no annotations provided, the description carries the full burden of behavioral disclosure. It states the action ('Get detailed information') but doesn't cover critical aspects like authentication requirements, rate limits, error handling, or what 'detailed information' entails (e.g., fields returned, pagination). This leaves significant gaps for an agent to understand operational constraints.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is a single, efficient sentence that directly states the tool's purpose without redundancy. It's front-loaded with the core action and resource, making it easy to parse quickly. There's no wasted verbiage or unnecessary elaboration.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
Given the complexity of retrieving varied Spotify item types and the lack of annotations and output schema, the description is insufficient. It doesn't explain what 'detailed information' includes (e.g., track metadata, artist albums), how results are structured, or any behavioral traits like authentication needs. For a tool with no structured safety or output guidance, more context is needed.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema description coverage is 100%, so the schema already documents both parameters thoroughly (item_id and qtype with default and effects). The description doesn't add any meaningful semantic details beyond what's in the schema, such as format examples for item_id or nuances in qtype behavior. Baseline 3 is appropriate as the schema does the heavy lifting.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description clearly states the verb ('Get') and resource ('detailed information about a Spotify item'), specifying the item types (track, album, artist, or playlist). However, it doesn't explicitly differentiate from sibling tools like SpotifySearch, which might also retrieve information but through search queries rather than direct ID lookup.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The description provides no guidance on when to use this tool versus alternatives like SpotifySearch or other siblings. It lacks context about prerequisites (e.g., authentication), exclusions, or specific scenarios where this direct ID lookup is preferred over search-based methods.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
SpotifyPlaybackB
Manages the current playback with the following actions: - get: Get information about user's current track. - start: Starts of resumes playback. - pause: Pauses current playback. - skip: Skips current track.
| Name | Required | Description | Default |
|---|---|---|---|
| action | Yes | Action to perform: 'get', 'start', 'pause' or 'skip'. | |
| track_id | No | Specifies track to play for 'start' action. If omitted, resumes current playback. | |
| num_skips | No | Number of tracks to skip for `skip` action. |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
With no annotations provided, the description carries full burden for behavioral disclosure. While it describes what each action does at a basic level, it lacks important behavioral details like authentication requirements, rate limits, error conditions, or what happens during concurrent playback management. The description doesn't contradict any annotations since none exist.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is efficiently structured with a clear opening statement followed by bullet points for each action. Each bullet is concise and directly relevant. However, the repetition of the opening sentence in the schema description suggests some redundancy that could be eliminated.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
For a playback management tool with 3 parameters and no output schema, the description provides adequate basic information but lacks completeness. Without annotations or output schema, it should ideally cover more behavioral aspects like response format, error handling, or prerequisites. The description meets minimum requirements but leaves gaps.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema description coverage is 100%, so the schema already documents all three parameters thoroughly. The description lists the four action types but doesn't add meaningful parameter semantics beyond what's in the schema. The baseline of 3 is appropriate when the schema does the heavy lifting.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description clearly states the tool's purpose as managing current playback with four specific actions (get, start, pause, skip), providing a verb+resource combination. However, it doesn't explicitly differentiate from sibling tools like SpotifyQueue or SpotifySearch, which likely handle different aspects of Spotify functionality.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The description implies usage context through action descriptions (e.g., 'get' for track information, 'skip' for skipping tracks), but doesn't provide explicit guidance on when to use this tool versus alternatives like SpotifyQueue or SpotifySearch. No when-not scenarios or clear alternatives are mentioned.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
SpotifyQueueB
Manage the playback queue - get the queue or add tracks.
| Name | Required | Description | Default |
|---|---|---|---|
| action | Yes | Action to perform: 'add' or 'get'. | |
| track_id | No | Track ID to add to queue (required for add action) |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
No annotations exist, so the description bears full responsibility. It fails to disclose behavior such as whether adding a track requires an active device, if the queue is appended or overwritten, or what errors occur. Minimal behavioral detail beyond the schema.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
Single, concise sentence that immediately communicates the tool's purpose. No superfluous words, front-loads the resource and actions.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
For a simple tool with two parameters and two actions, the description adequately covers purpose. It lacks details on return values or error cases but is sufficient for basic usage given no output schema and limited complexity.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema coverage is 100% with parameter descriptions. The description adds marginal value by linking 'add tracks' to the action parameter and implying track_id for add. Baseline score is appropriate as schema handles semantics.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description clearly states the tool manages the playback queue with two specific actions: get or add tracks. It distinguishes itself from sibling tools like SpotifyPlayback by focusing on queue management.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
No guidance on when to use this tool versus alternatives like SpotifyPlayback for control operations. The description simply lists actions without context on prerequisites or typical use cases.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
SpotifySearchB
Search for tracks, albums, artists, or playlists on Spotify.
| Name | Required | Description | Default |
|---|---|---|---|
| query | Yes | query term | |
| qtype | No | Type of items to search for (track, album, artist, playlist, or comma-separated combination) | track |
| limit | No | Maximum number of items to return |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
No annotations provided, so description carries burden. It mentions search types and parameters but omits behavior like response structure, pagination, error handling, auth needs, or rate limits.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
Single clear sentence, front-loaded with action verb. No wasted words.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
Given 3 parameters, no output schema, and no annotations, the description is too brief. Lacks guidance on output format, pagination, or effective usage compared to sibling tools.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema has 100% coverage with descriptions for all 3 parameters. Description adds minimal context beyond schema (e.g., hinting at qtype values already documented). Baseline score of 3 is appropriate.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
Description clearly states it searches for tracks, albums, artists, or playlists on Spotify. Distinct from sibling tools like SpotifyGetInfo (specific item info), SpotifyPlayback (playback control), SpotifyQueue (queue management).
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
Description implies usage for searching Spotify content, but no explicit when-to-use vs alternatives, no when-not or exclusions provided.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
4 tool updates
v1.0.0- Changed
SpotifyGetInfo2 fields changed- added
Input schema / descriptionAdded value: +"Get detailed information about a Spotify item (track, album, artist, or playlist)." - added
Input schema / titleAdded value: +"GetInfo"
- Changed
SpotifyPlayback2 fields changed- added
Input schema / descriptionAdded value: +"Manages the current playback with the following actions:\n- get: Get information about user's current track.\n- start: Starts of resumes playback.\n- pause: Pauses current playback.\n- skip: Skips current track." - added
Input schema / titleAdded value: +"Playback"
- Changed
SpotifyQueue2 fields changed- added
Input schema / descriptionAdded value: +"Manage the playback queue - get the queue or add tracks." - added
Input schema / titleAdded value: +"Queue"
- Changed
SpotifySearch2 fields changed- added
Input schema / descriptionAdded value: +"Search for tracks, albums, artists, or playlists on Spotify." - added
Input schema / titleAdded value: +"Search"
4 tool updates
- First observed
SpotifyGetInfo - First observed
SpotifyPlayback - First observed
SpotifyQueue - First observed
SpotifySearch
TDQS
Scored across 4 tools
Each tool has a clearly distinct purpose with no overlap: GetInfo retrieves metadata, Playback controls active listening, Queue manages upcoming tracks, and Search finds new content. The separation between Playback (current track control) and Queue (future track management) is particularly well-defined.
All tools follow a perfect 'Spotify[Action]' naming pattern with consistent PascalCase throughout. The pattern is immediately recognizable and predictable across all four tools.
Four tools is ideal for this music streaming domain - it covers the essential workflows (discovery, playback control, queue management, and information lookup) without being overwhelming or sparse. Each tool earns its place in the set.
The toolset covers core Spotify functionality well with only minor gaps. Notable missing operations include playlist/library management (saving/removing tracks), volume control, and seeking within tracks, but the provided tools enable basic listening workflows.
Maintenance
Related MCP Connectors
Connect Claude to Fathom meeting recordings, transcripts, and summaries
- platform7nOAuthtech.p7n
Connect Claude to your Platform7n workspaces — chat, links, and tasks. One-click OAuth.
Connect Claude to your Intervals.icu watch data for fitness, workout review, and plan writing.
One workspace of tools for Claude and ChatGPT: connect 600+ apps, generate media, build tools.
Related MCP Servers
- AlicenseBqualityAmaintenanceConnects Claude with Spotify, allowing users to control playback, search for content, get music information, and manage the Spotify queue.2895 PyPI11MIT
- FlicenseNot gradedqualityDmaintenanceConnects Claude with Spotify to control playback, search music, get track information, and manage the queue through conversation.1-
- FlicenseAqualityDmaintenanceConnects Claude with Spotify, allowing users to control playback, search for music, get track/artist information, and manage the queue via the Spotify API.51-
- FlicenseNot gradedqualityDmaintenanceEnables Claude to control Spotify features including playback control, playlist management, search, and accessing user's listening history and preferences through the Spotify API.1-