You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
feat: lock hosted instance to owner; pivot repo to self-host
Add ALLOWED_DISCOGS_USER_ID var (empty = open, default for dev and
self-hosters) with rejection gates in both OAuth callback paths and as
a belt-and-braces check on every authenticated MCP request, so any
pre-existing grants/sessions get invalidated cleanly. Reframe README
around a full self-hosting walkthrough and rewrite the marketing page
to stop advertising discogs-mcp.com as a shared service, because
Discogs API rate limits are too strict to share across users.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Copy file name to clipboardExpand all lines: README.md
+93-85Lines changed: 93 additions & 85 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -18,59 +18,110 @@ A powerful **Model Context Protocol (MCP) server** that enables AI assistants to
18
18
- ⚡ **Edge Computing**: Global low-latency responses via Cloudflare Workers
19
19
- 🗂️ **Smart Caching**: Intelligent KV-based caching for optimal performance
20
20
21
-
## 🚀 Quick Start
21
+
## ⚠️ This Is Not a Shared Service
22
22
23
-
### Claude Desktop
23
+
**`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.
24
24
25
-
1. Open Claude Desktop → **Settings** → **Integrations**
26
-
2. Click **Add Integration**
27
-
3. Enter the URL:
28
-
```
29
-
https://discogs-mcp.com/mcp
30
-
```
31
-
4. Click **Add** - authenticate with Discogs when prompted
25
+
Why? The Discogs API rate limit (60 requests per minute, per registered app) 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**.
32
26
33
-
### Claude Code
27
+
The good news: deploying your own copy is straightforward, runs on the Cloudflare Workers free tier, and takes about 10 minutes. See [Self-Hosting](#-self-hosting) below.
28
+
29
+
## 🚀 Self-Hosting
30
+
31
+
### Prerequisites
32
+
33
+
- Node.js 18+
34
+
- Cloudflare account (free tier is fine)
35
+
- Discogs account with a [registered developer app](https://www.discogs.com/settings/developers) (you'll need a **Consumer Key** and **Consumer Secret**)
36
+
37
+
### 1. Clone and install
34
38
35
39
```bash
36
-
claude mcp add --transport http discogs https://discogs-mcp.com/mcp
Add to your Windsurf MCP config (`~/.codeium/windsurf/mcp_config.json`):
47
+
```bash
48
+
wrangler kv namespace create MCP_SESSIONS --env production
49
+
wrangler kv namespace create MCP_LOGS --env production
50
+
wrangler kv namespace create OAUTH_KV --env production
51
+
```
42
52
43
-
```json
44
-
{
45
-
"mcpServers": {
46
-
"discogs": {
47
-
"serverUrl": "https://discogs-mcp.com/mcp"
48
-
}
49
-
}
50
-
}
53
+
Copy the returned IDs into `wrangler.toml` under `[env.production]`.
54
+
55
+
### 3. Set your Discogs credentials
56
+
57
+
```bash
58
+
wrangler secret put DISCOGS_CONSUMER_KEY --env production
59
+
wrangler secret put DISCOGS_CONSUMER_SECRET --env production
60
+
wrangler secret put JWT_SECRET --env production # any random string
51
61
```
52
62
53
-
### MCP Inspector (Testing)
63
+
### 4. (Optional but recommended) Lock your instance to your own Discogs user
64
+
65
+
By default, anyone with a Discogs account who discovers your Worker URL can authenticate and consume your rate-limit budget. To restrict it to just you, set `ALLOWED_DISCOGS_USER_ID` in `wrangler.toml` under `[env.production.vars]` to your numeric Discogs user ID:
66
+
67
+
```toml
68
+
[env.production.vars]
69
+
ALLOWED_DISCOGS_USER_ID = "123456"
70
+
```
71
+
72
+
You can find your numeric ID by visiting `https://api.discogs.com/users/<your-username>` and looking at the `id` field. Leave the value empty to run an open instance.
73
+
74
+
### 5. Deploy
75
+
76
+
```bash
77
+
npm run deploy:prod
78
+
```
79
+
80
+
Your Worker URL will be something like `https://discogs-mcp.<your-subdomain>.workers.dev`. The MCP endpoint is `/mcp`.
81
+
82
+
### 6. Connect your MCP client
83
+
84
+
Replace `https://your-worker.workers.dev` below with your own URL.
The default `[vars]` block in `wrangler.toml` leaves `ALLOWED_DISCOGS_USER_ID` empty, so local dev is open to any Discogs account — convenient for testing.
<p>This Discogs MCP instance is private and locked to a single Discogs user. Discogs API rate limits are too strict to share across users, so each person needs to run their own deployment.</p>
44
+
<p>Good news: it's open source and easy to self-host on Cloudflare Workers (free tier works fine).</p>
0 commit comments