Discogs MCP Server
Provides tools for interacting with a user's Discogs music collection, including collection search with genre filters and mood-aware ranking, Discogs-wide catalog search with owned-item indicators, release details, collection statistics, and context-aware recommendations.
Click on "Install Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@Discogs MCP ServerRecommend some mellow records from my collection for Sunday morning."
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
π΅ Discogs MCP Server
A powerful Model Context Protocol (MCP) server that enables AI assistants to interact with your personal Discogs music collection. Built on Cloudflare Workers using the official Cloudflare Agents SDK and @modelcontextprotocol/sdk.
β¨ Features
π Secure OAuth Authentication: Connect your Discogs account safely
π§ Intelligent Mood Mapping: Translate emotions into music ("mellow", "energetic", "Sunday evening vibes")
π Advanced Search Intelligence: Multi-strategy search with OR logic and relevance scoring
π Collection Analytics: Comprehensive statistics and insights about your music
π― Context-Aware Recommendations: Smart suggestions based on mood, genre, and similarity
β‘ Edge Computing: Global low-latency responses via Cloudflare Workers
ποΈ Smart Caching: Intelligent KV-based caching for optimal performance
π Background Collection Sync: A 6-hourly job keeps a snapshot of your collection in KV, so searches answer from the snapshot instead of paging through Discogs on every call
Related MCP server: 1001 Albums Generator MCP
β οΈ This Is Not a Shared Service
discogs-mcp.com is the maintainer's private instance. It's locked to a single Discogs account and will return a 403 for anyone else.
Why? The Discogs API rate limit (60 requests per minute, counted per source IP) is too tight to share across users. One active collection query from a single user can saturate it. Rather than run a broken multi-tenant service, each user deploys their own Worker with their own Discogs API credentials.
The good news: deploying your own copy is straightforward, runs on the Cloudflare Workers free tier, and takes about 10 minutes. See Self-Hosting below.
π Self-Hosting
The fastest path is the Deploy to Cloudflare button above. It clones this repo into your GitHub account, provisions the KV namespaces and Durable Object in your Cloudflare account, prompts you for the three secrets, and sets up Workers Builds so future pushes to your fork redeploy automatically.
1. Register a Discogs developer app
Go to discogs.com/settings/developers β Create an Application. Name it anything; the Callback URL can be a placeholder for now (you'll come back and set it after the Worker is deployed). Save the Consumer Key and Consumer Secret β you'll paste them in next.
2. Click the button
When prompted, paste:
Secret | Value |
| from step 1 |
| from step 1 |
| any random string β |
After the deploy completes, Cloudflare shows your Worker URL β something like https://discogs-mcp.<your-subdomain>.workers.dev. The MCP endpoint is /mcp.
3. Update your Discogs app callback URL
Go back to your Discogs app and set the Callback URL to:
https://discogs-mcp.<your-subdomain>.workers.dev/discogs-callback4. (Optional but recommended) Lock your instance to your own Discogs user
By default, anyone who discovers your Worker URL can authenticate and consume your Discogs rate-limit budget. To restrict it, edit wrangler.toml in your fork and set ALLOWED_DISCOGS_USER_ID under [vars]:
[vars]
# Single user
ALLOWED_DISCOGS_USER_ID = "123456"
# Or a comma-separated list for multiple users
ALLOWED_DISCOGS_USER_ID = "123456,789012,345678"Find your numeric ID by visiting https://api.discogs.com/users/<your-username> and looking at the id field. Push the change β Workers Builds redeploys automatically.
5. Connect your MCP client
Replace https://your-worker.workers.dev below with your own URL.
Claude Desktop β Settings β Integrations β Add Integration β https://your-worker.workers.dev/mcp
Claude Code:
claude mcp add --transport http discogs https://your-worker.workers.dev/mcpWindsurf (~/.codeium/windsurf/mcp_config.json):
{
"mcpServers": {
"discogs": {
"serverUrl": "https://your-worker.workers.dev/mcp"
}
}
}Continue.dev / Zed / Generic:
{
"mcpServers": {
"discogs": {
"command": "npx",
"args": ["-y", "mcp-remote", "https://your-worker.workers.dev/mcp"]
}
}
}MCP Inspector (testing):
npx @modelcontextprotocol/inspector https://your-worker.workers.dev/mcpManual deploy (alternative)
If you'd rather skip the button β for example, you want a fully local clone or you're on a Cloudflare account where the button doesn't work:
git clone https://github.com/rianvdm/discogs-mcp.git
cd discogs-mcp
npm install
# Create the two KV namespaces and copy the returned IDs into wrangler.toml
# (replace the empty `id = ""` values under the top-level [[kv_namespaces]] blocks)
wrangler kv namespace create MCP_SESSIONS
wrangler kv namespace create OAUTH_KV
# Set the three secrets
wrangler secret put DISCOGS_CONSUMER_KEY
wrangler secret put DISCOGS_CONSUMER_SECRET
wrangler secret put JWT_SECRET
# Deploy
npm run deployThen follow steps 3β5 above (callback URL, optional allowlist, connect your MCP client).
Optional: route Discogs calls through your own IP
Discogs throttles by source IP, and a Worker's outbound requests leave from Cloudflare's shared egress IPs, so other Workers talking to Discogs from the same location eat into your 60 requests a minute. You can see this when a first request after hours of idle already reports a low X-Discogs-Ratelimit-Remaining. If it bites, point the Worker at a relay you run: a Cloudflare Tunnel to any always-on machine (a home Mac, a small VPS) with a local reverse proxy that forwards to https://api.discogs.com and sets both Host and X-Forwarded-Host to api.discogs.com (cloudflared alone can't, it overwrites X-Forwarded-Host). Put a Cloudflare Access application with a service-token policy in front of the tunnel hostname, then:
# wrangler.toml: DISCOGS_RELAY_ORIGIN = "https://relay.example.com"
wrangler secret put RELAY_ACCESS_CLIENT_ID
wrangler secret put RELAY_ACCESS_CLIENT_SECRETLeave DISCOGS_RELAY_ORIGIN empty to call Discogs directly (the default). If the relay is unreachable the Worker falls back to direct calls for that request and logs it, so a machine that is switched off degrades to the shared-IP behaviour rather than an outage. Implementation and rationale: src/rate-limiter/relay.ts.
Collection size and the free plan
The free plan's limit that matters here is CPU time: 10 ms per invocation, for tool calls and the background sync alike. The sync stores one page at a time to stay inside that, and the snapshot it builds keeps only the fields search needs (about 450 bytes per release). That comfortably covers collections up to roughly 2,000 releases. Past that, reading the snapshot on every search starts to crowd the budget, and a collection of 4,000+ can see search_collection or refresh_collection fail with a bare execution error and no message β that is the runtime terminating the invocation, not a Discogs error. The fix is Workers Paid ($5/month), which raises the budget to 30 seconds; nothing else about the deployment changes.
Whatever the plan, get_cache_stats reports the snapshot's item count and fetch time and the page count of any sync in flight, so you can see whether the background sync is landing rather than inferring it from cache entry counts.
π Authentication
This server uses MCP OAuth 2.1 with Discogs as the identity provider. When you connect for the first time:
Your MCP client automatically opens a browser window
Authorize the application on Discogs
You're redirected back and authenticated β no copy-pasting required
Your session persists for 7 days
π οΈ Available Tools
π Public Tools (No Authentication Required)
Tool | Description |
| Test server connectivity |
| Get server information and capabilities |
| Check authentication status and get login instructions |
π Authenticated Tools (Requires Login)
Search & discovery
Tool | Description |
| Search your collection with explicit genre filters, mood-aware ranking, and master-level dedup |
| Search the Discogs-wide catalog (releases, masters, artists, labels) β marks results you already own |
| Get detailed information about a specific release (tracklist, formats, labels) |
| View genre breakdown, decade analysis, format distribution, and ratings |
| Get personalized recommendations by genre, decade, mood, or similarity |
Collection management
Tool | Description |
| Add a release to a folder (defaults to Uncategorized) |
| Remove a specific release instance from a folder |
| Move a release instance between folders |
| Rate a release from 0 (no rating) to 5 stars |
Wantlist
Tool | Description |
| List releases on your wantlist (paginated) |
| Add a release to your wantlist |
| Remove a release from your wantlist |
Folders
Tool | Description |
| List all folders with release counts |
| Create a new folder |
| Rename an existing folder (system folders excluded) |
| Delete an empty folder (system folders excluded) |
Custom fields
Tool | Description |
| List all custom fields defined on your collection |
| Set a custom field value on a specific release instance |
Diagnostics
Tool | Description |
| View cache performance (total entries, pending requests, breakdown) |
| Force a full refresh of the collection snapshot now, instead of waiting for the 6-hourly sync |
π MCP Resources
Access Discogs data via standardized MCP resource URIs:
discogs://collection # Complete collection (JSON)
discogs://release/{id} # Specific release details
discogs://search?q={query} # Search results㪠MCP Prompts
Prompt | Description | Arguments |
| Browse and explore your collection | |
| Find specific music in your collection |
|
| Get insights and statistics about your collection |
ποΈ Local Development
# Dev secrets live in .dev.vars (gitignored); the same Discogs app is fine for dev
cp .dev.vars.example .dev.vars # then fill in DISCOGS_CONSUMER_KEY, DISCOGS_CONSUMER_SECRET, JWT_SECRET
# Run the Worker locally
npm run dev
# Test with MCP Inspector
npx @modelcontextprotocol/inspector http://localhost:8787/mcpThe default [vars] block in wrangler.toml leaves ALLOWED_DISCOGS_USER_ID empty, so local dev is open to any Discogs account β convenient for testing.
π§ͺ Testing
npm test # vitest in watch mode (runs in workerd via @cloudflare/vitest-pool-workers)
npx vitest run # one pass, then exit
npm run lint # ESLint; CI runs lint, test, and a dry-run buildDiagnostics
ping and server_info report how Discogs traffic is leaving (direct, or via the relay described above) and whether the relay has fallen back to direct calls. For the rate limiter's live state β remaining budget, queue depth, circuit-breaker status, relay fallbacks β set a DEBUG_TOKEN secret and call GET /debug/budget?token=<DEBUG_TOKEN>; without the secret the endpoint returns 404.
π€ Contributing
Fork the repository
Create your feature branch (
git checkout -b feature/amazing-feature)Commit your changes (
git commit -m 'Add amazing feature')Push to the branch (
git push origin feature/amazing-feature)Open a Pull Request
π License
MIT License - see LICENSE file for details.
π Acknowledgments
Discogs for the music database API
Model Context Protocol for the standard
Cloudflare Workers for the platform
This server cannot be installed
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
Related MCP Connectors
The media memory layer for AI agents and their humans. Your AI client gets 29 tools to search your collection, add items, update ratings, preview music, and find patterns across everything you've read, watched, and listened to.
Connect AI assistants to your GitHub-hosted Obsidian vault to seamlessly access, search, and analyβ¦
A personal RAG database you build from chat, so AI creates work that sounds like you.
Zero-setup MCP gateway securely connecting AI to your tools with authentication and workflows
Related MCP Servers
- AlicenseAqualityDmaintenanceConnects AI assistants to a self-hosted Your Spotify instance and Spotify's Web API for deep listening analytics and playback control. It enables users to query unlimited listening history, generate custom Wrapped summaries, and manage playlists through natural language.18Apache 2.0
- AlicenseNot gradedqualityDmaintenanceConnects the 1001 Albums Generator dataset to AI assistants, enabling natural language exploration of your listening journey, taste analysis, and group comparisons.ISC
- AlicenseNot gradedqualityAmaintenanceA powerful Model Context Protocol (MCP) server that enables AI assistants to interact with your personal Discogs music collection.1516MIT
- AlicenseNot gradedqualityCmaintenanceEnables AI assistants to search, manage, and analyze personal Discogs music collections with features like mood-based recommendations, advanced search, and collection analytics.15MIT
Latest Blog Posts
- Who's Calling? MCP Hosts Are an Identity Blind Spot (And the Spec Knows It)By Om-Shree-0709 on .mcpAgent IdentityOAuth 2.1
- Your AI Chatbot Just Exposed Your CEO's Salary to an InternBy Om-Shree-0709 on .Agent IdentityMCP SecurityOAuth Delegation
- Why MCP Servers Need Execution Sandboxing (And Why Your Current Stack Isn't Enough)By Om-Shree-0709 on .Agentic AiPrompt InjectionWebAssembly
MCP directory API
We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/nepomusic/discogs-mcp-nepomusic'
If you have feedback or need assistance with the MCP directory API, please join our Discord server