连接器指南阅读约 5 分钟27 个 MCP 工具7 种语言

如何通过 MCP 将 Spotify 连接到 Cursor

让你的 AI 使用你的 Spotify 账号:搜索音乐和播客,读取你的播放列表、已点赞的歌曲、最常听的艺人和最近播放的曲目,查看正在播放的内容,并在你确认后创建播放列表、添加或移除曲目,以及在 Premium 账号上控制播放。通过你自己的 Spotify 开发者应用登录。

HC作者:HelpCode 团队更新于 5 分钟阅读 在 GitHub 开源

无需信用卡 · 7 天试用 · 提供自托管方案

Spotify

Spotify

Let your AI work with your Spotify account: search music and podcasts, read your playlists, Liked Songs, top artists and recently played tracks, see what is playing, create playlists and add or remove tracks, and control playback on Premium after your confirmation. Signed in through a Spotify developer app of your own.

个工具

27

区域

INTL

类别

社交媒体

身份验证

OAuth 2.0

所需环境变量

SPOTIFY_CLIENT_IDSPOTIFY_CLIENT_SECRET
在 Cloud 上一键安装

7 天免费试用 · 无需信用卡

  • 7 天免费试用
    无需信用卡
  • 符合 GDPR,SOC 2 就绪
    数据驻留欧盟,审计日志
  • 在 GitHub 开源
    开源 · AGPL-3.0
  • 支持 ChatGPT、Claude、Gemini
    任何兼容 MCP 的客户端

跳过安装。2 分钟内即可运行。

在 cloud.anythingmcp.com 开始免费试用,一键添加 Spotify,然后将你的 AI 客户端(Claude、ChatGPT、Copilot 或 Cursor)指向生成的 MCP 端点。无需 Docker,无需 git clone,无需任何工程经验。

开始免费试用

摘要

让你的 AI 使用你的 Spotify 账号:搜索音乐和播客,读取你的播放列表、已点赞的歌曲、最常听的艺人和最近播放的曲目,查看正在播放的内容,并在你确认后创建播放列表、添加或移除曲目,以及在 Premium 账号上控制播放。通过你自己的 Spotify 开发者应用登录。

试试这样问

Spotify 的示例提示

点击任意提示即可复制,然后粘贴到 Claude、ChatGPT、Cursor、Gemini、Copilot 或 OpenClaw 中,在该连接器上运行。

Spotify · 通过 MCP 实时
分享
Opus 4.7

Claude 是 AI,可能会出错。请核对回答。

💡 无需安装? 直接使用 cloud.anythingmcp.com。 登录、点击 Connectors → Spotify、粘贴凭证、生成 MCP API key,即可完成。无 Docker、无 git clone、无本地服务器。

Spotify + Cursor

让你的 AI 使用你的 Spotify 账号:搜索音乐和播客,读取你的播放列表、已点赞的歌曲、最常听的艺人和最近播放的曲目,查看正在播放的内容,并在你确认后创建播放列表、添加或移除曲目,以及在 Premium 账号上控制播放。通过你自己的 Spotify 开发者应用登录。

前提条件

完整的设置说明已内置在连接器中 (在 store 中选择连接器时可见)。所需环境变量:

SPOTIFY_CLIENT_ID, SPOTIFY_CLIENT_SECRET

步骤 1 — 获取凭证

  1. 用将成为应用所有者的 Spotify Premium 账号登录 developer.spotify.com/dashboard,点击 Create app。
  2. 输入名称和描述。在 Redirect URIs 中添加 https://cloud.anythingmcp.com/api/mcp-oauth/callback。如果你自行托管 AnythingMCP,请使用 https://your-anythingmcp-host/api/mcp-oauth/callback。勾选 Web API,接受条款并点击 Save。
  3. 打开应用的 Settings:把 Client ID 复制到 SPOTIFY_CLIENT_ID,点击 View client secret,把密钥复制到 SPOTIFY_CLIENT_SECRET。
  4. 在 User Management 中添加每一个要登录的 Spotify 账号,填写名称和该 Spotify 账号的邮箱。最多 5 个账号。
  5. 安装连接器,在连接器页面点击 Authorize with Provider,登录 Spotify 并同意授权。
  6. 用 spotify_get_me 检查设置:它会显示你登录的账号。

按 Spotify 的规则,这是一个个人连接器:Spotify 让每个新的开发者应用都在开发模式下运行。自 2026 年 2 月起,应用所有者需要有效的 Spotify Premium 订阅,否则应用会停止工作,直到 Premium 续订。一个应用最多服务 5 个 Spotify 用户,每个都要在 User Management 中手动添加;其他人可以登录,但每次调用都会被 403 拒绝。更多用户需要 Spotify 的 extended quota,而只有已上线服务、月活跃用户至少 25 万的注册企业才能申请。实际上,这个连接器适用于你自己的账号和你添加的几个人。

重定向 URI 的规则:Spotify 只接受 HTTPS 地址,或用于本地测试的带端口的 http://127.0.0.1。localhost 会被拒绝。应用中的 URI 必须与 AnythingMCP 使用的 URI 完全一致。

可以读取的内容:你的个人资料;在曲库中搜索歌曲、艺人、专辑、播放列表、播客、单集和有声书;单首歌曲、专辑或艺人的详情以及艺人的作品;你的播放列表,以及你拥有或参与协作的播放列表中的曲目;已点赞的歌曲;4 周、6 个月或约一年内最常听的艺人和歌曲;最近播放的曲目;正在播放的内容、你的设备和播放队列。

每次更改前都会询问:spotify_create_playlist、spotify_add_playlist_items 和 spotify_remove_playlist_items 会更改你的播放列表,spotify_start_playback、spotify_pause_playback、spotify_skip_to_next、spotify_skip_to_previous 和 spotify_add_to_queue 会改变正在播放的内容。每次调用前,AI 都会告诉你将发生什么,并等你同意。新建的播放列表默认公开,除非你要求设为私密。

播放控制需要 Premium:要控制播放,登录的账号需要 Spotify Premium,并且手机、电脑或音箱上要开着 Spotify 应用。没有活动设备时,Spotify 会返回 NO_ACTIVE_DEVICE:在某个设备上打开 Spotify,或让 AI 从 spotify_list_devices 中选择一个设备。免费账号会收到 PREMIUM_REQUIRED。查看正在播放的内容在免费账号上也可以。连接器只是远程控制你的 Spotify 应用,本身不会播放音频。

安装时默认关闭:spotify_save_to_library 和 spotify_remove_from_library(保存或移除已点赞的歌曲,关注或取消关注)。如需使用,请在连接器的 OAuth 设置中添加 scope user-library-modify 和 user-follow-modify,重新授权后启用这些工具。它们同样会先询问你。

开发模式下不可用的功能:推荐、音频特征、相关艺人、艺人的热门歌曲、新发行、精选和分类播放列表,以及其他用户的资料和播放列表。Spotify 自己的编辑推荐和算法生成的播放列表无法打开。搜索每次调用每种类型最多返回 10 条结果,并且不再返回热度、粉丝数和流派。

常见错误:401:登录已过期或被撤销;请再次点击 Authorize with Provider。403:该账号不在 User Management 中、所有者的 Premium 已过期,或者这个播放列表不属于你,你也不是协作者。429:开发模式的配额按开发者账号计算;请稍后再试。

连接器不会下载或试听音频,不会更改播放列表封面,也不使用 Spotify 留给 extended quota 的接口。

步骤 2 — 安装 adapter

curl -fsSL https://raw.githubusercontent.com/HelpCode-ai/anythingmcp/main/docker-compose.quickstart.yml -o docker-compose.yml
printf 'JWT_SECRET=%s\nENCRYPTION_KEY=%s\n' "$(openssl rand -hex 32)" "$(openssl rand -hex 32)" > .env
docker compose up -d

步骤 3 — 在 Cursor 中添加连接器

你的服务器 URL: 在 AnythingMCP 中打开 MCP Servers → 此连接器所在的服务器,复制它的 URL(https://cloud.anythingmcp.com/mcp/…)。本指南中出现 YOUR_SERVER_ID 的地方都用它替换。

Cursor 从 ~/.cursor/mcp.json 读取 MCP 服务器。添加以下条目:

{
  "mcpServers": {
    "anythingmcp": {
      "url": "https://cloud.anythingmcp.com/mcp/YOUR_SERVER_ID",
      "headers": { "X-API-Key": "YOUR_MCP_API_KEY" }
    }
  }
}
  1. 在 AnythingMCP 的 MCP Servers → 你的服务器 → API keys 中创建 MCP API 密钥,并用它替换 YOUR_MCP_API_KEY。
  2. 保存文件并重启 Cursor。
  3. 打开 Cursor → Settings → MCP,确认 anythingmcp 已列出并处于已连接状态。
  4. 开始对话,智能体现在可以调用 Spotify 的工具。

可用工具

ToolWhat it does
spotify_get_meRead the signed-in Spotify account: user id, account_id, display name, profile link and Spotify URI
spotify_searchSearch the Spotify catalog for tracks, artists, albums, playlists, shows, episodes or audiobooks
spotify_get_trackRead one track by its Spotify id: name, artists, album, release date, duration, explicit flag, track and disc number, playability, ISRC…
spotify_get_albumRead one album by its Spotify id: name, type, artists, release date, total tracks, copyrights, link, and its first tracks (up to 50; total…
spotify_get_artistRead one artist by Spotify id: name, uri, link and image
spotify_get_artist_albumsList an artist's albums, singles and compilations: id, name, type, release date, track count and link
spotify_get_playlistRead a playlist's details: name, description, owner, public and collaborative flags, snapshot_id, number of items and link
spotify_get_playlist_itemsList the tracks and episodes of a playlist the user owns or collaborates on: when and by whom each was added, type, id, name, uri, artists…
spotify_list_my_playlistsList the playlists the signed-in user owns or follows: id, name, owner, public and collaborative flags, number of items, snapshot_id and…
spotify_get_top_itemsList the signed-in user's most played artists or tracks over about 4 weeks (short_term), 6 months (medium_term, default) or about a year…
spotify_get_recently_playedList the tracks the signed-in user played most recently (up to 50; podcast episodes are not included): when, track, artists, album and the…
spotify_get_playback_stateRead what is playing right now and where: playing or paused, progress, shuffle and repeat state, the device (name, type, volume) and the…
spotify_get_currently_playingRead the track or episode currently playing on the user's account: playing or paused, progress, the item and the context it plays from
spotify_list_devicesList the user's available Spotify Connect devices (phone, computer, speaker): id, name, type, whether active, volume
spotify_get_queueRead the user's playback queue: the item playing now and the items queued after it (name, uri, artists or show)
spotify_list_saved_tracksList the songs saved in the user's library (Liked Songs), newest first: when saved, track, artists, album, duration
spotify_check_libraryCheck whether tracks, albums, episodes, shows, audiobooks, artists, users or playlists are saved or followed by the user
spotify_create_playlistCreate a new, empty playlist in the signed-in user's account
spotify_add_playlist_itemsAdd tracks or episodes to a playlist the user owns or collaborates on (up to 100 per call)
spotify_remove_playlist_itemsRemove tracks or episodes from a playlist the user owns or collaborates on (every occurrence of each URI, up to 100 per call)
spotify_start_playbackStart or resume playback: without arguments it resumes; context_uri plays an album, artist or playlist; uris plays specific tracks
spotify_pause_playbackPause playback on the user's active device (or the given device)
spotify_skip_to_nextSkip to the next item in the user's queue
spotify_skip_to_previousGo back to the previous item in the user's queue
spotify_add_to_queueAdd a track or episode to the end of the user's playback queue
spotify_save_to_librarySave items to the user's library or follow them: tracks, albums, episodes, shows and audiobooks are saved; users and playlists are followed…
spotify_remove_from_libraryRemove items from the user's library or unfollow them (up to 40 URIs): tracks, albums, episodes, shows, audiobooks, users and playlists

示例提示

  • “过去四周我听得最多的是什么?列出我的前 10 首歌和前 5 位艺人。”
  • “用我最近点赞的 20 首歌创建一个名为 Road Trip 的私密播放列表。创建前先给我看看歌单。”
  • “现在正在播放什么?在哪个设备上?”
  • “找到 Miles Davis 的专辑 Kind of Blue,把第一首歌加入我的播放队列。”
  • “我昨天晚上听了哪些歌?做成一张包含艺人和专辑的表格。”

FAQ

Cursor 免费套餐支持自定义 MCP 服务器吗? 支持,Hobby、Pro 和 Business 套餐均可使用 MCP。

下一步

这份指南对你有帮助吗?

你的 Spotify 智能体只差一次点击。

安装连接器,粘贴密钥,向 Cursor 提问。免费试用 7 天,无需信用卡。

相关指南

连接器

如何通过 MCP 将 Spotify 连接到 ChatGPT

让你的 AI 使用你的 Spotify 账号:搜索音乐和播客,读取你的播放列表、已点赞的歌曲、最常听的艺人和最近播放的曲目,查看正在播放的内容,并在你确认后创建播放列表、添加或移除曲目,以及在 Premium 账号上控制播放。通过你自己的 Spotify 开发者应用登录。

连接器

如何通过 MCP 将 Spotify 连接到 Claude

让你的 AI 使用你的 Spotify 账号:搜索音乐和播客,读取你的播放列表、已点赞的歌曲、最常听的艺人和最近播放的曲目,查看正在播放的内容,并在你确认后创建播放列表、添加或移除曲目,以及在 Premium 账号上控制播放。通过你自己的 Spotify 开发者应用登录。

连接器

如何通过 MCP 将 Spotify 连接到 Gemini

让你的 AI 使用你的 Spotify 账号:搜索音乐和播客,读取你的播放列表、已点赞的歌曲、最常听的艺人和最近播放的曲目,查看正在播放的内容,并在你确认后创建播放列表、添加或移除曲目,以及在 Premium 账号上控制播放。通过你自己的 Spotify 开发者应用登录。

连接器

如何通过 MCP 将 Spotify 连接到 Meta Muse

让你的 AI 使用你的 Spotify 账号:搜索音乐和播客,读取你的播放列表、已点赞的歌曲、最常听的艺人和最近播放的曲目,查看正在播放的内容,并在你确认后创建播放列表、添加或移除曲目,以及在 Premium 账号上控制播放。通过你自己的 Spotify 开发者应用登录。

连接器

Spotify 接入 MCP:在任意 AI 代理中使用你的音乐、播放列表和播放控制

让你的 AI 使用你的 Spotify 账号:搜索音乐和播客,读取你的播放列表、已点赞的歌曲、最常听的艺人和最近播放的曲目,查看正在播放的内容,并在你确认后创建播放列表、添加或移除曲目,以及在 Premium 账号上控制播放。通过你自己的 Spotify 开发者应用登录。

连接器

如何通过 MCP 将 Avito 连接到 Cursor

让你的 AI 使用你的 Avito 企业账户:列出广告并修改价格,读取浏览、联系和来电统计,检查自动上传 (autoload) 的上传记录及其错误、Feed 格式和钱包,并读取 Avito Messenger 聊天。发送消息和修改自动上传设置为可选功能,默认关闭。