DI

Discogs MCP Server for Music Collection Management

Manage your music collection with an MCP server that connects to the Discogs API for seamless cataloging, syncing, and metadata enrichment.

Quick Install
npx -y @cswkim/discogs-mcp-server

Overview

This MCP (Model Context Protocol) server integrates with the Discogs API to provide a programmatic backend for managing music collections. It exposes HTTP endpoints that let client applications and LLM-based agents discover tools, query and synchronize collections, and fetch enriched metadata from Discogs. The server acts as a bridge between your local collection store and Discogs, exposing consistent, authenticated endpoints suitable for automation and AI workflows.

For developers, the server is useful when you need reliable metadata enrichment (artist/release/label data), catalog synchronization, or an MCP-compatible tool surface that LLMs and other model-driven systems can call. It simplifies authentication with Discogs, rate-limit handling, and the plumbing required to convert Discogs data into formats that collection apps or agents expect.

Features

  • MCP-compatible tool discovery endpoint for model/agent integration
  • Discogs API proxying and metadata enrichment (artists, releases, masters, labels)
  • Collection import/export and sync utilities
  • Authentication handling for Discogs OAuth/Token
  • Configurable rate-limit handling and caching to reduce Discogs calls
  • Optional webhooks or polling hooks for sync notifications
  • Docker-ready and environment-based configuration for deployment

Installation / Configuration

Minimum prerequisites:

  • Node.js (14+) and npm or Docker
  • A Discogs API token (or OAuth consumer key/secret depending on configuration)

Quick start (Node/npm):

git clone https://github.com/cswkim/discogs-mcp-server.git
cd discogs-mcp-server
npm install

Create a .env file in the project root with your environment variables. Example:

# .env
DISCOGS_TOKEN=your_discogs_personal_token
MCP_HOST=0.0.0.0
MCP_PORT=3000
BASE_URL=http://localhost:3000
LOG_LEVEL=info
CACHE_TTL=3600

Start the server:

npm run build   # if TypeScript build is required
npm start
# or for development
npm run dev

Docker usage:

# Example Dockerfile
FROM node:18-alpine
WORKDIR /app
COPY package*.json ./
RUN npm ci --only=production
COPY . .
ENV NODE_ENV=production
CMD ["node", "dist/index.js"]

Run with Docker:

docker build -t discogs-mcp-server .
docker run -p 3000:3000 \
  -e DISCOGS_TOKEN=your_discogs_personal_token \
  -e MCP_PORT=3000 \
  discogs-mcp-server

Environment variables reference:

VariablePurpose
DISCOGS_TOKENDiscogs personal access token or OAuth credentials
MCP_HOSTHost to bind the server
MCP_PORTPort to listen on
BASE_URLPublic base URL (used for constructing callbacks/webhooks)
CACHE_TTLMetadata cache lifetime in seconds
LOG_LEVELLogging verbosity (debug/info/warn/error)

Available Resources

  • GitHub repository: https://github.com/cswkim/discogs-mcp-server
  • Discogs API documentation: https://www.discogs.com/developers
  • MCP / tool discovery: use the server’s tool-discovery endpoint to integrate with model agents (example below)

Example: discover available tools (tool name/path may vary by config)

curl -H "Authorization: Bearer $DISCOGS_TOKEN" \
  http://localhost:3000/mcp/tools

A typical tool-discovery response provides JSON describing tool names, input/output schemas, and invocation endpoints so model agents can call them programmatically.

Use Cases

  • Catalog import: Import your Discogs collection into a local database. The server can fetch release and master data, normalize fields (genres, styles, tracklists), and persist records for local search and display.

    • Example: scheduled job calls /sync/collection to pull new releases and updates.
  • Metadata enrichment: Given a basic record (artist + release title), call the server’s enrichment endpoint to fetch Discogs metadata (label, year, format, tracklist) and merge it into your UI or catalogs.

  • LLM-powered assistant: Expose a tool surface via the MCP tool-discovery endpoint so LLM agents can look up releases, fetch cover art URLs, and generate human-readable summaries or playlists based on catalog contents.

  • Two-way sync & backup: Use the server to sync ownership/notes between a local database and Discogs, or export your collection snapshots as CSV/JSON for backups.

  • Data-driven UIs: Provide your frontend with consistent APIs to power filtering (genre, format, year) and export features (CSV, JSON

Tags:media