Skip to main content
Glama

Spotify MCP Server

Spotify MCP 서버

이 프로젝트는 CursorClaude for Desktop (macOS 및 Windows 전용)과 같은 MCP 클라이언트를 통해 자연어를 사용하여 Spotify 재생을 제어할 수 있는 MCP(Model Context Protocol) 서버를 구현합니다.

특징

이 서버는 다음 도구를 제공합니다.

  • play : 트랙, 앨범 또는 재생 목록을 재생하거나 재생을 다시 시작합니다.
  • pause : 재생을 일시정지합니다.
  • next : 다음 트랙으로 건너뜁니다.
  • previous : 이전 트랙으로 건너뜁니다.
  • get_current_track : 현재 재생 중인 트랙에 대한 정보를 가져옵니다.
  • search : 트랙, 앨범, 아티스트 또는 재생 목록을 검색합니다.

필수 조건

  • Bun (버전 1.0.0 이상)
  • Spotify 프리미엄 계정.
  • Spotify 개발자 애플리케이션:
    • Spotify 개발자 대시보드 에서 하나 만들어 보세요.
    • 클라이언트 ID와 클라이언트 비밀번호를 얻으세요.
    • 앱 설정에서 리디렉션 URI에 http://localhost:8888/callback 추가합니다.
  • MCP 클라이언트(예: 데스크톱용 Cursor 또는 Claude).

설치 및 설정

  1. 저장소를 복제합니다.지엑스피1
  2. 종속성 설치:
    bun install
  3. .env 파일을 만듭니다.프로젝트 디렉터리 루트에 .env 라는 이름의 파일을 만듭니다. 다음을 추가하고, 자리 표시자는 실제 Spotify 사용자 이름(ID)으로 바꾸세요.
    SPOTIFY_CLIENT_ID=your_spotify_client_id SPOTIFY_CLIENT_SECRET=your_spotify_client_secret SPOTIFY_REDIRECT_URI=http://localhost:8888/callback # These will be filled in after running the auth script: SPOTIFY_ACCESS_TOKEN= SPOTIFY_REFRESH_TOKEN=
  4. 권한 부여 스크립트를 실행합니다.이 스크립트는 브라우저를 열고 Spotify에 로그인하여 권한을 부여하라는 메시지를 표시한 다음 초기 액세스 토큰과 새로 고침 토큰을 검색합니다.
    bun run auth
    스크립트는 SPOTIFY_ACCESS_TOKENSPOTIFY_REFRESH_TOKEN 값을 콘솔에 출력합니다. 이 값들을 .env 파일에 복사하세요.
  5. MCP 클라이언트를 구성하세요.
    • 커서:
      • 커서 설정을 엽니다(Cmd+, 또는 Ctrl+,).
      • "모델 컨텍스트 프로토콜"을 검색하세요.
      • "settings.json에서 편집"을 클릭합니다.
      • mcp.servers 배열에 다음을 추가합니다( /absolute/path/to/your/spotify-mcp``spotify-mcp 디렉터리의 절대 경로로 바꿉니다).
        { "mcp.servers": [ { "spotify": { "command": "bun", "args": ["/absolute/path/to/your/spotify-mcp/src/index.ts"], "env": { "SPOTIFY_CLIENT_ID": "your_spotify_client_id", "SPOTIFY_CLIENT_SECRET": "your_spotify_client_secret", "SPOTIFY_REDIRECT_URI": "http://localhost:8888/callback", "SPOTIFY_ACCESS_TOKEN": "your_spotify_access_token", "SPOTIFY_REFRESH_TOKEN": "your_spotify_refresh_token" } } } ] }
        settings.json 파일에 값을 추가하는 대신, .env 파일을 사용하고 Spotify와 관련된 환경 변수만 거기에 넣는 것이 좋습니다.
    • 데스크톱(macOS/Windows)용 Claude:
      • Claude for Desktop 구성 파일을 엽니다.
        • macOS: ~/Library/Application Support/Claude/claude_desktop_config.json
        • Windows: %APPDATA%\Claude\claude_desktop_config.json
      • mcpServers 개체에 다음을 추가합니다( /absolute/path/to/your/spotify-mcp``spotify-mcp 디렉터리의 절대 경로로 바꿉니다): GXP6
    • 중요: 클라이언트 구성에서는 항상 절대 경로를 사용하세요.
  6. MCP 클라이언트를 다시 시작하세요설정을 적용하려면 MCP 클라이언트(Cursor/Claude)를 다시 시작하세요.

서버 실행

bun run start This command starts the server with automatic reloading on file changes (thanks to Bun's --watch flag). Keep this terminal window open while you're using the server. ## Usage Once the server is running and your MCP client is configured, you can start using natural language commands to control Spotify. Examples: "Play Bohemian Rhapsody" "Pause the music" "What song is playing?" "Search for Taylor Swift albums" "Next track" "Play spotify:track:4uLU6hMCjMI75M1A2tKUQC"
-
security - not tested
-
license - not tested
-
quality - not tested

local-only server

The server can only run on the client's local machine because it depends on local resources.

Cursor나 Claude for Desktop과 같은 MCP 클라이언트에서 자연어 명령을 통해 Spotify 재생을 제어할 수 있는 모델 컨텍스트 프로토콜 서버입니다.

  1. 특징
    1. 필수 조건
      1. 설치 및 설정
        1. 서버 실행

          Related MCP Servers

          • A
            security
            F
            license
            A
            quality
            A FastMCP tool that enables control of Spotify through natural language commands in Cursor Composer, allowing users to manage playback, search for content, and interact with playlists.
            Last updated -
            21
            1
            Python
          • A
            security
            F
            license
            A
            quality
            A lightweight Model Context Protocol server that enables AI assistants like Cursor & Claude to control Spotify playback and manage playlists.
            Last updated -
            12
            80
            TypeScript
          • -
            security
            F
            license
            -
            quality
            A Model Context Protocol server that enables AI assistants like Claude to interact with Spotify, allowing them to search for tracks, control playback, and manage playlists.
            Last updated -
            1
            TypeScript
            • Apple
          • -
            security
            F
            license
            -
            quality
            A Model Context Protocol (MCP) server that provides access to the Beatport Developer API, allowing Claude to interact with music data from Beatport's electronic music catalog.
            Last updated -
            Python
            • Apple

          View all related MCP servers

          MCP directory API

          We provide all the information about MCP servers via our MCP API.

          curl -X GET 'https://glama.ai/api/mcp/v1/servers/obre10off/spotify-mcp'

          If you have feedback or need assistance with the MCP directory API, please join our Discord server