MS

marcelmarais/spotify-mcp-server

开发工具

本页由 AI 翻译,技术细节请以原文为准。 查看原文

491 stars 162 forks 质量 86 趋势 41MIT

Spotify的轻量级MCP服务器

概览

一个轻量级的模型上下文协议(MCP)服务器,使像Cursor和Claude这样的AI助手能够控制Spotify播放和管理播放列表。 - “播放猫王的第一首歌” - “创建一个泰勒·斯威夫特 / Slipknot 融合播放列表” - “把我锻炼播放列表里的所有电子曲目复制到我的工作播放列表” - “把音量调低一点” - : 在Spotify上搜索曲目、专辑、艺术家或播放列表 - : - 查询(字符串):搜索词 - 类型(字符串):要搜索的项目类型(曲目、专辑、艺术家、播放列表)- 限制(数量,可选):返回的最大结果数(10-50)- : 匹配项目列表及其ID、名称及额外信息 - : searchSpotify(“bohemian rhapsody”,“track”,20) - : 获取当前在Spotify播放的曲目信息,包括设备和音量信息 - : 无 - : 包含曲目名称、艺术家、专辑、播放进度、时长、播放状态、设备信息、音量及随机播放/重复状态的对象 - : getNowPlaying() - :列个清单......

概述(AI 翻译)

Spotify MCP 服务器

一个轻量级的模型上下文协议(MCP)服务器,使像Cursor和Claude这样的AI助手能够控制Spotify播放和管理播放列表。

目录

  • 示例交互
  • 工具
  • 读取操作
  • 专辑运营
  • 播放/创建操作
  • 播放列表运营
  • 设置
  • 先决条件
  • 安装
  • 创建 Spotify 开发者应用程序
  • Spotify API 配置
  • 认证流程
  • 与 Claude Desktop、光标和 VsCode(Cline)集成
  • 可流式HTTP
  • OAuth(MCPHub及其他支持OAuth的客户端)
  • Docker(推荐用于 MCPHub)

示例互动

  • _“播放猫王的第一首歌”
  • “创建泰勒·斯威夫特 / Slipknot 融合播放列表”
  • “把我锻炼播放列表里的所有电子曲目复制到我的工作播放列表”
  • _“把音量调小一点” _

工具

阅读运营

  1. 搜索Spotify
  • 描述:在Spotify上搜索曲目、专辑、艺术家或播放列表
  • 参数:
  • query(字符串):搜索词
  • type(字符串):要搜索的项目类型(曲目、专辑、艺人、播放列表)
  • limit(编号,可选):返回的最大结果数(1-10,默认:10)

本页由 AI 翻译,技术细节请以原文为准。

README

以下为原文 README 节选,完整内容请查看原文。

A lightweight Model Context Protocol (MCP) server that enables AI assistants like Cursor & Claude to control Spotify playback and manage playlists.

Example Interactions

  • “Play Elvis’s first song”
  • “Create a Taylor Swift / Slipknot fusion playlist”
  • “Copy all the techno tracks from my workout playlist to my work playlist”
  • “Turn the volume down a bit”

Tools

Read Operations

  1. searchSpotify

    • Description: Search for tracks, albums, artists, or playlists on Spotify
    • Parameters:
      • query (string): The search term
      • type (string): Type of item to search for (track, album, artist, playlist)
      • limit (number, optional): Maximum number of results to return (1-10, default: 10)
      • offset (number, optional): Index of the first result to return (default: 0)
    • Returns: List of matching items with their IDs, names, and additional details
    • Example: searchSpotify("bohemian rhapsody", "track", 10)
  2. getNowPlaying

    • Description: Get information about the currently playing track on Spotify, including device and volume info
    • Parameters: None
    • Returns: Object containing track name, artist, album, playback progress, duration, playback state, device info, volume, and shuffle/repeat status
    • Example: getNowPlaying()
  3. getMyPlaylists

    • Description: Get a list of the current user’s playlists on Spotify
    • Parameters:
      • limit (number, optional): Maximum number of playlists to return (default: 20)
      • offset (number, optional): Index of the first playlist to return (default: 0)
    • Returns: Array of playlists with their IDs, names, track counts, and public status
    • Example: getMyPlaylists(10, 0)
  4. getPlaylistTracks

在 GitHub 查看完整 README

安装

This server does not publish a one-line install command.

Open the repository installation guide 新手?先看 mcpskill.org 教程 →

配置

{ "mcpServers": { "spotify": { "command": "node", "args": ["spotify-mcp-server/build/index.js"] } } }