This release is about the Discogs rate limit: fewer 429s to begin with, and a quick, clear answer when one does happen. Discogs throttles by source IP and a Worker’s calls leave from Cloudflare’s shared IPs, so discogs-mcp can now send its traffic through a relay on a machine you own (the hosted instance already does). When you are throttled, an interactive call tells you within seconds.
What’s new
- Route Discogs calls through your own IP. Point
DISCOGS_RELAY_ORIGINat a Cloudflare Tunnel to any always-on machine (a home Mac, a small VPS) running a local reverse proxy in front ofapi.discogs.com, guard it with a Cloudflare Access service token, and the whole 60-requests-a-minute budget is yours. The README has the setup, including theX-Forwarded-Hostgotcha that bites cloudflared on its own. If the relay machine is off, calls go direct and nothing stops working. pingandserver_infonow say how Discogs traffic is leaving (“Discogs egress: via relay relay.discogs-mcp.com, no fallbacks recorded”) and, if the relay has failed, how many times and how recently.
Fixes
- A single rate-limited request could take the server down for ten minutes. Now the limiter stops assuming a full budget after idle periods, backs off exponentially, and forgets stale 429 streaks across restarts, so the circuit breaker trips only on real, sustained throttling.
- Interactive tool calls report a throttle in seconds; they used to sit through around 80 seconds of retries first. The background collection sync, which has nobody waiting on it, still waits the throttle out, and it now queues behind your requests.
- Every authenticated tool used to spend a Discogs request just to look up your username. That now comes off the session, so a cold cache can’t burn budget or trip the breaker before your actual call.
get_wantlistserves the page size you asked for when the answer comes from cache.
Under the hood
- The 6-hourly collection sync runs at :23 past odd hours, away from the crowd of
0 */6crons on the shared IPs. - Relay fallback rule: an error status with neither an
x-discogs-*header nor a JSON body is treated as the relay layer (530, 502, Access 401, HTML 404) and retried directly. A 429 never is.