MCP Spotify Server

MCP Spotify Server
精选

通过 Spotify Web API 实现与 Spotify 音乐目录的交互,支持搜索、艺术家信息检索、播放列表管理和自动令牌处理。

娱乐与媒体
访问服务器

Tools

get_artist_top_tracks

Get Spotify catalog information about an artist's top tracks

get_artist_related_artists

Get Spotify catalog information about artists similar to a given artist

get_access_token

Get a valid Spotify access token for API requests

search

Search for tracks, albums, artists, or playlists

get_artist

Get Spotify catalog information for an artist

get_multiple_artists

Get Spotify catalog information for multiple artists

get_artist_albums

Get Spotify catalog information about an artist's albums

get_album

Get Spotify catalog information for an album

get_album_tracks

Get Spotify catalog information for an album's tracks

get_multiple_albums

Get Spotify catalog information for multiple albums

get_track

Get Spotify catalog information for a track

get_available_genres

Get a list of available genres for recommendations

get_new_releases

Get a list of new album releases featured in Spotify

get_recommendations

Get track recommendations based on seed tracks, artists, or genres

get_audiobook

Get Spotify catalog information for an audiobook

get_multiple_audiobooks

Get Spotify catalog information for multiple audiobooks

get_audiobook_chapters

Get Spotify catalog information about an audiobook's chapters

get_playlist

Get a playlist owned by a Spotify user

get_playlist_tracks

Get full details of the tracks of a playlist

get_playlist_items

Get full details of the items of a playlist

modify_playlist

Change a playlist's name and public/private state

get_current_user_playlists

Get a list of the playlists owned or followed by the current Spotify user

add_tracks_to_playlist

Add one or more tracks to a playlist

remove_tracks_from_playlist

Remove one or more tracks from a playlist

get_featured_playlists

Get a list of Spotify featured playlists

get_category_playlists

Get a list of Spotify playlists tagged with a particular category

README

ArtistLens

smithery badge npm version

一个强大的模型上下文协议 (MCP) 服务器,提供对 Spotify Web API 的访问。 ArtistLens 能够与 Spotify 的音乐目录进行无缝交互,包括搜索曲目、专辑和艺术家,以及访问艺术家特定信息,如热门曲目和相关艺术家。

当前版本: 0.4.12

<a href="https://glama.ai/mcp/servers/mmrvuig6tp"><img width="380" height="200" src="https://glama.ai/mcp/servers/mmrvuig6tp/badge" alt="ArtistLens MCP server" /></a>

安装

通过 Smithery 安装

要通过 Smithery 为 Claude Desktop 自动安装 ArtistLens:

npx -y @smithery/cli install @superseoworld/artistlens --client claude

手动安装

您可以全局安装该软件包:

npm install -g @thomaswawra/artistlens

或者直接使用 npx 运行它:

npx -y @thomaswawra/artistlens

配置

添加到您的 MCP 配置文件(例如,claude_desktop_config.jsoncline_mcp_settings.json):

{
  "mcpServers": {
    "spotify": {
      "command": "npx",
      "args": ["-y", "@thomaswawra/artistlens"],
      "env": {
        "SPOTIFY_CLIENT_ID": "your_client_id",
        "SPOTIFY_CLIENT_SECRET": "your_client_secret"
      },
      "disabled": false,
      "autoApprove": []
    }
  }
}

您需要提供您的 Spotify API 凭据:

  1. 前往 Spotify Developer Dashboard
  2. 创建一个新的应用程序
  3. 获取您的 Client ID 和 Client Secret
  4. 将它们添加到如上所示的配置中

功能

  • 搜索曲目、专辑、艺术家和播放列表
  • 获取艺术家信息,包括热门曲目和相关艺术家
  • 获取专辑信息和曲目
  • 访问新发行和推荐
  • 获取有声读物信息,包括特定市场的内容和章节
  • 注意:有声读物端点可能需要额外的身份验证或特定市场的访问权限
  • 获取和修改播放列表信息(名称、描述、公开/私有状态)
  • 访问具有分页支持的播放列表曲目和项目
  • 支持 Spotify ID 和 URI
  • 使用客户端凭据流进行自动令牌管理
  • 适用于所有功能的综合测试套件
  • 组织良好的代码,关注点分离

可用工具

  • get_access_token: 获取有效的 Spotify 访问令牌
  • search: 搜索曲目、专辑、艺术家或播放列表
  • get_artist: 获取艺术家信息
  • get_artist_top_tracks: 获取艺术家的热门曲目
  • get_artist_related_artists: 获取与给定艺术家相似的艺术家
  • get_artist_albums: 获取艺术家的专辑
  • get_album: 获取专辑信息
  • get_album_tracks: 获取专辑的曲目
  • get_track: 获取曲目信息
  • get_available_genres: 获取推荐的可用流派列表
  • get_new_releases: 获取新专辑发行
  • get_recommendations: 根据种子曲目、艺术家或流派获取曲目推荐
  • get_audiobook: 获取有声读物信息,带有可选的市场参数
  • get_multiple_audiobooks: 获取多个有声读物的信息(最多 50 个)
  • get_audiobook_chapters: 获取有声读物的章节,支持分页(每个请求 1-50 个章节)
  • get_playlist: 获取 Spotify 用户拥有的播放列表
  • get_playlist_tracks: 获取播放列表曲目的完整详细信息(每个请求 1-100 首曲目)
  • get_playlist_items: 获取播放列表项目的完整详细信息(每个请求 1-100 个项目)
  • modify_playlist: 更改播放列表详细信息(名称、描述、公开/私有状态、协作状态)
  • add_tracks_to_playlist: 将一个或多个曲目添加到播放列表,带有可选位置
  • remove_tracks_from_playlist: 从播放列表中删除一个或多个曲目,带有可选位置和快照 ID
  • get_current_user_playlists: 获取当前 Spotify 用户拥有或关注的播放列表列表(每个请求 1-50 个播放列表)
  • get_featured_playlists: 获取 Spotify 精选播放列表的列表,带有可选的区域设置和分页支持
  • get_category_playlists: 获取标有特定类别的 Spotify 播放列表列表

更新

要更新到最新版本:

# 如果全局安装
npm update -g @thomaswawra/artistlens

# 如果使用 npx,它将自动使用最新版本
npx -y @thomaswawra/artistlens

开发

该项目是开源的,可在 GitHub 上找到:https://github.com/superseoworld/artistlens

项目结构

代码库组织成以下目录:

  • src/handlers/: 包含不同 Spotify API 端点的处理程序类
  • src/types/: 请求和响应对象的 TypeScript 接口
  • src/utils/: API 通信的实用程序函数和类
  • src/__tests__/: 所有功能的 Jest 测试文件

测试

该项目使用 Jest 进行测试。 要运行测试:

npm test

要在开发期间以监视模式运行测试:

npm run test:watch

贡献

要贡献:

  1. Fork 存储库
  2. 创建您的功能分支 (git checkout -b feature/amazing-feature)
  3. 为您的更改添加测试
  4. 提交您的更改 (git commit -m 'Add some amazing feature')
  5. 推送到分支 (git push origin feature/amazing-feature)
  6. 打开一个 Pull Request

许可证

MIT 许可证

smithery badge

推荐服务器

YouTube Transcript MCP Server

YouTube Transcript MCP Server

这个服务器用于获取指定 YouTube 视频 URL 的字幕,从而可以与 Goose CLI 或 Goose Desktop 集成,进行字幕提取和处理。

精选
Python
The Verge News MCP Server

The Verge News MCP Server

提供从The Verge的RSS feed获取和搜索新闻的工具,允许用户获取今日新闻、检索过去一周的随机文章,以及在最近的Verge内容中搜索特定关键词。

精选
TypeScript
mcp-server-youtube-transcript

mcp-server-youtube-transcript

一个模型上下文协议服务器,可以从 YouTube 视频中检索文本记录。该服务器通过一个简单的界面直接访问视频的字幕和副标题。

精选
JavaScript
MCP-AppleMusic

MCP-AppleMusic

通过 MCP 命令,利用 AppleScript 来控制 macOS 上的 Apple Music,允许用户管理播放、搜索曲目和创建播放列表。

本地
Python
YouTube Music MCP Server

YouTube Music MCP Server

一个 MCP 服务器,允许 AI 模型通过 Google Chrome 控制 YouTube Music 的播放,通过歌曲和艺术家名称搜索和播放歌曲。

本地
JavaScript
Spotify MCP Server

Spotify MCP Server

一个将 Claude 与 Spotify 连接的服务器,允许用户控制播放、搜索内容、获取关于歌曲/专辑/艺术家/播放列表的信息,以及管理 Spotify 播放队列。

本地
Python
YouTube Integration

YouTube Integration

支持通过提供视频 URL 从 YouTube 视频中提取文字稿,支持标准、缩短和嵌入 URL 格式。

JavaScript
Spotify MCP

Spotify MCP

一个 FastMCP 工具,它允许用户通过 Cursor Composer 中的自然语言命令来控制 Spotify,从而管理播放、搜索内容以及与播放列表互动。

Python
mcp-youtube-sheets

mcp-youtube-sheets

提供搜索 YouTube 视频并将结果自动保存到 Google 表格的功能。

JavaScript
mcp-server-tmdb

mcp-server-tmdb

与电影数据库 (TMDB) API 集成,以提供电影信息、搜索功能和推荐。

JavaScript