一个强大的模型上下文协议(MCP)服务器,提供对Spotify Web API的访问。ArtistLens能够无缝地与Spotify的音乐目录进行交互,包括搜索曲目、专辑和艺术家,以及获取特定艺术家的信息,如热门曲目和相关艺术家。
当前版本: 0.4.12
<a href="https://glama.ai/mcp/servers/mmrvuig6tp"><img width="380" height="200" src="https://gips2.baidu.com/it/u=1458418219,2152113534&fm=3081&app=3081&f=PNG?w=760&h=400" alt="ArtistLens MCP服务器" /></a>
要通过Smithery自动安装ArtistLens到Claude Desktop:
npx -y @smithery/cli install @superseoworld/artistlens --client claude
你可以全局安装该包:
npm install -g @thomaswawra/artistlens
或者直接使用npx运行:
npx -y @thomaswawra/artistlens
添加到你的MCP设置文件(例如,claude_desktop_config.json或cline_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凭证:
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: 从播放列表中移除一个或多个曲目,可选位置和快照IDget_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
要贡献:
git checkout -b feature/amazing-feature)git commit -m '添加一些惊人的功能')git push origin feature/amazing-feature)MIT许可证