ArtistLens 是一个强大的模型上下文协议(MCP)服务器,它提供了对 Spotify Web API 的访问能力。借助 ArtistLens,你能够无缝地与 Spotify 的音乐目录进行交互,比如搜索曲目、专辑和艺术家,还能获取特定艺术家的详细信息,像热门歌曲和相关艺术家等。
当前版本: 0.4.12
在终端中输入 artistlens
即可运行服务器。默认情况下,它会在本机的 3001 端口上运行。
通过 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_modules
或 yarn
目录位于您的 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
要贡献代码:
git checkout -b feature/amazing-feature
)。git commit -m 'Add some amazing feature'
)。git push origin feature/amazing-feature
)。本项目采用 MIT License 进行许可。