Multi-User MCP Server With OAuth: 89 Broken Versions Tested, 32s Cold Start Workarounds
ShipItFrog · reddit · 2026-10-24
A developer shares a full postmortem of deploying a multi-user MCP flashcards server (OAuth login via claude.ai / Claude Code, per-user card isolation) on Render's free tier with Neon Postgres and Descope auth.
Key lessons:
- OAuth config traps: manually pasted issuer metadata landed in the wrong JSON field; copy-button values carried trailing newlines that Render preserves—breaking startup beats silently rejecting all logins.
- Isolation design: identity comes only from verified credentials (issuer + sub), never tool args or headers; per-query owner filtering, audience checks, and responses indistinguishable between "not yours" and "doesn't exist."
- Deliberately breaking isolation: re-ran tests against 89 intentionally broken versions (missing owner filters, unchecked signatures, tokens in logs)—all 89 were caught.
- Key endpoint resilience: caching last signing keys up to 30 min with callback retries, though in-memory keys vanish on restart.
- Free-host cold starts: first request after 4 quiet days hangs 32s, but Claude waits only 10s for OAuth discovery—warming the server via the metadata URL fixes it.
Most code was written by AI coding agents under his direction. Unsolved: revoking tokens before expiry without checking with the IdP on every request.
More from coding & agent
- YCloud ships WhatsApp API MCP server letting Claude chat with WhatsApp directly — modelcontextprotocol · 2026-10-24
- NoonAI DIS MCP server auto-detects and redacts faces in images and video — modelcontextprotocol · 2026-10-24
- One perfect prompt proves nothing: how to actually test an AI tool before recommending it — alifcoder · 2026-10-24
- Google Research tests 180 agent setups: multi-agent hurts sequential tasks by 39-70% but boosts parallel ones 80.9% — ombre-ai · 2026-10-24
- OpenAI Skills appear only in ChatGPT Work, not Chat, user reports — mark_k · 2026-10-24
- 6 bugs that break naive LLM budget caps under concurrency—and their fixes — MaverikSh · 2026-10-24