Discogs API访问工具

一个提供完整Discogs REST API访问的.NET工具,适用于音乐收藏管理和市场数据分析。

  • by michielryvers
  • C#
  • 本地部署
  • 1 星标
  • 更新于
在 GitHub 查看 michielryvers/discogs-mcp

使用说明

断开MCP服务器

模型上下文协议(MCP)服务器,提供对Discogs REST API的完全访问。作为一个。NET工具通过NuGet。

工具

工具 说明
discogs_help 带示例的使用指南
discogs_endpoints 按类别或关键字查找API端点
discogs_request 执行任何Discogs API调用(GET、POST、PUT、DELETE)
discogs_paginate 获取多个页面并连接结果

设置

先决条件

安装

无需安装。MCP客户端使用以下命令按需启动工具 dnx.

将服务器添加到MCP客户端配置中:

开源代码 (opencode.json):

{
  "mcp": {
    "discogs": {
      "type": "local",
      "enabled": true,
      "command": ["dnx", "discogs-mcp", "--yes"],
      "environment": {
        "DISCOGS_TOKEN": "your_token_here",
        "DISCOGS_USER_AGENT": "YourApp/0.1 (+https://yoursite.example)"
      }
    }
  }
}

克劳德代码 (通过 claude mcp add):

claude mcp add discogs -- dnx discogs-mcp --yes

然后设置所需的环境变量(DISCOGS_TOKEN).

VS Code (.vscode/mcp.json):

{
  "servers": {
    "discogs": {
      "command": "dnx",
      "args": ["discogs-mcp", "--yes"],
      "env": {
        "DISCOGS_TOKEN": "your_token_here"
      }
    }
  }
}

环境变量

变量 必填 描述
DISCOGS_TOKEN 是 您的Discogs个人访问令牌
DISCOGS_USER_AGENT 否 自定义用户代理字符串(提供默认值)

示例提示

配置后,您可以向AI助手询问以下问题:

采集分析

  • “我的Discogs收藏中有什么?按流派和年代向我展示摘要。”
  • “哪些艺术家最常出现在我的收藏中?”

通缉令和交易

  • “查看我的Discogs购物清单,找到市场上每件商品最便宜的清单。”
  • “看看我的购物清单,告诉我哪些商品现在最划算。”

发现

  • “在Blue Note Records上搜索20世纪60年代的爵士乐发行,并推荐一些经典作品。”
  • “根据标签和风格查找与我的收藏中相似的版本。”

价格研究

  • “黑胶唱片《涅盘-无所谓》的市场价值是多少?比较不同的压制方式。”

API类别

服务器提供对以下Discogs API类别的访问:

  • 数据库 -搜索、发布、大师、艺术家、标签
  • 收集 -用户收藏文件夹和发布
  • 通缉令 -用户需求列表管理
  • 市场 -列表、订单、价格建议
  • 用户 -简介、提交、贡献
  • 列表 -用户创建的列表
  • 库存 -大宗库存管理

出版

要将新版本发布到NuGet,请执行以下操作:

# Pack the tool
dotnet pack -c Release

# Push to NuGet.org
dotnet nuget push ./nupkg/discogs-mcp.0.1.0.nupkg --api-key YOUR_API_KEY --source https://api.nuget.org/v3/index.json

许可证

麻省理工学院