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

如何通过 MCP 将 Spotify 连接到 Microsoft Copilot

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

HC作者:HelpCode 团队更新于 6 分钟阅读 在 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 + Microsoft Copilot

让你的 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 — 在 Microsoft Copilot 中添加连接器

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

Microsoft Copilot 通过在 Copilot Studio 中构建的智能体使用 MCP 服务器:把 AnythingMCP 作为工具添加到智能体,然后把智能体发布到 Microsoft 365 Copilot 和 Teams。Copilot Studio 从 Microsoft 的云端通过 Streamable HTTP 连接,AnythingMCP 支持这种方式。

  1. 在 Copilot Studio 中打开你的智能体(或新建一个),进入 Tools,选择 Add a tool → New tool → Model Context Protocol。
  2. 填写 Server name(例如 AnythingMCP)、说明连接器用途的 Server description,以及 Server URL https://cloud.anythingmcp.com/mcp/YOUR_SERVER_ID。Copilot Studio 根据描述决定何时调用该服务器。
  3. 身份验证选择 API key,把 Type 设为 Header,请求头名称填 X-API-Key,然后选择 Create。
  4. 在 Add tool 中选择 Create a new connection,粘贴 AnythingMCP 的 MCP API 密钥(MCP Servers → 你的服务器 → API keys),然后选择 Add to agent。
  5. 在智能体的 Test 窗格中试一试:提出需要用到 Spotify 的工具的请求。
  6. 选择 Publish,然后进入 Channels → Microsoft 365 and Microsoft Teams,保持勾选 Make agent available in Microsoft Copilot,再选择 Add channel。See agent in Teams 会为你安装该智能体;在 Microsoft 365 Copilot 中输入 @ 并选择该智能体。

希望每个用户各自登录?请选择 OAuth 2.0 → Dynamic discovery 代替 API 密钥:每个用户会在智能体首次调用时登录 AnythingMCP。

自托管?请用你实例的公网 HTTPS 地址替换 https://cloud.anythingmcp.com。Copilot Studio 从 Microsoft 的云端连接,因此 localhost 无法使用。

可用工具

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

这适用于哪个 Copilot? 适用于工作中的 Microsoft 365 Copilot,通过 Copilot Studio 的智能体实现。面向个人账户的 Microsoft Copilot 应用无法添加自己的 MCP 服务器。

我需要什么? 一个可以使用 Copilot Studio 的工作账户(许可证或试用版),用于构建智能体。在 Microsoft 365 Copilot 或 Teams 中使用它的人需要拥有该智能体的访问权限:把它共享给他们,或请管理员为整个组织发布。如果你的组织对 Power Platform 连接器设置了数据策略,这些策略同样适用于 MCP 服务器。

智能体不调用工具。 检查请求头名称是否正好是 X-API-Key,密钥是否属于与 URL 相同的 MCP 服务器,并把 Server description 写得具体:Copilot Studio 根据它决定何时调用服务器。每次修改后重新发布智能体;在已打开的对话中输入 "start over" 即可使用新版本。

下一步

这份指南对你有帮助吗?

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

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

相关指南

连接器

如何通过 MCP 将 Spotify 连接到 ChatGPT

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

连接器

如何通过 MCP 将 Spotify 连接到 Claude

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

连接器

如何通过 MCP 将 Spotify 连接到 Cursor

让你的 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 开发者应用登录。