Back to MCP directory
publicPublicdnsLocal runtime

MCP Spotify Server

ArtistLens是一个强大的MCP服务器,提供对Spotify Web API的访问,支持音乐搜索、艺术家信息获取、播放列表管理等功能。

article

README

🚀 艺术家镜(ArtistLens)

ArtistLens 是一个强大的模型上下文协议(MCP)服务器,它提供了对 Spotify Web API 的访问能力。借助 ArtistLens,你能够无缝地与 Spotify 的音乐目录进行交互,比如搜索曲目、专辑和艺术家,还能获取特定艺术家的详细信息,像热门歌曲和相关艺术家等。

smithery badge npm 版本

当前版本: 0.4.12

🚀 快速开始

在终端中输入 artistlens 即可运行服务器。默认情况下,它会在本机的 3001 端口上运行。

✨ 主要特性

  • 提供对 Spotify Web API 的访问,可与 Spotify 音乐目录无缝交互。
  • 支持搜索曲目、专辑和艺术家。
  • 能够获取特定艺术家的详细信息,如热门歌曲和相关艺术家。

📦 安装指南

使用 Smithery 安装

通过 Smithery 自动安装 ArtistLens 用于 Claude:

npx smithery install @superseoworld/artistlens

手动安装

使用 npm 或 yarn 进行全局安装:

npm install -g @thomaswawra/artistlens
# 或者
yarn global add @thomaswawra/artistlens

📚 详细文档

配置

~/.config 目录下创建或编辑 smithery.json 文件,添加以下内容:

{
  "artistlens": {
    "version": "0.4.12"
  }
}

确保 node_modulesyarn 目录位于您的 PATH 环境变量中。

更新

要更新到最新版本:

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

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

🔧 技术细节

项目结构

代码库按以下目录组织:

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

测试

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

npm test

在开发模式下运行监视测试:

npm run test:watch

贡献

要贡献代码:

  1. 叉仓库。
  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 License 进行许可。

help

Runtime guide

cloud

Hosted runtime

Hosted servers run from a provider-managed environment. You usually connect the MCP client to the hosted endpoint or follow the provider's authorization flow, without keeping a local process alive

  1. Open provider connection page
  2. Authorize or copy endpoint
  3. Connect from your MCP client
terminal

Local runtime / other methods

Local servers run on your own machine or infrastructure. You normally copy the server_config into your MCP client, install the required package, and provide env variables from env_schema when needed

  1. Copy server_config
  2. Install required package
  3. Fill env variables and restart client