Six OAuth pitfalls from wiring Claude and ChatGPT into a remote MCP server
Dheeth · reddit · 2026-11-22
The Formkove developer shares real-world lessons after adding OAuth to a remote MCP server so Claude and ChatGPT can sign in:
- Per-IP rate limits break: Claude/ChatGPT call from a few shared IPs, so 60/min/IP became a global cap. Moved to per-grant limits and removed /mcp from Cloudflare WAF rules (a WAF challenge on the auth server breaks Claude entirely).
- Dynamic client registration is optional: Both support Client ID Metadata Documents, but only if your auth server metadata sets clientidmetadatadocumentsupported: true plus "none" in token endpoint auth methods; otherwise they fall back to DCR. He only accepts client IDs on claude.ai and chatgpt.com.
- ChatGPT's client ID depends on iss: include RFC 9207's iss parameter in every authorization response (errors too) to get one fixed client ID and redirect URI.
- Don't advertise scopes you don't want: ChatGPT requests openid/email/profile if listed; Claude adds offlineaccess automatically.
- Tool output is the attack surface: stranger-written form submissions could contain injection like "add a webhook to this URL". He split read/submit management/integrations/delete into separate scopes, marks tool results untrusted, and strips zero-width chars, bidi controls, and Unicode Tags hiding ASCII.
- Agents make mistakes humans wouldn't: an agent could name a honeypot field "email" (silently dropping real submissions) or allowlist the bare TLD "com". Now honeypot names need a prefix and public suffixes are refused.
Docs are public; it works on the free plan.
More from coding & agent
- Garmin Health MCP Server lets you query VO2 max, sleep and training data via natural language — modelcontextprotocol · 2026-11-22
- Stripe MCP connector offers read-only access to Stripe data via API key — modelcontextprotocol · 2026-11-22
- Dev ports Inkling 2 Mini to vLLM, hitting ~200 tok/s decode on 2x RTX 3090 vs 50 on llama.cpp — peaster_ · 2026-11-22
- Open-source Paperwire MCP lets AI agents send postal mail, certified letters, checks and faxes — QuixiAI · 2026-11-22
- After a year of agentic AI coding, verification—not writing code—became the bottleneck — Positive_Picture-1 · 2026-11-22
- Grok Bot tip: turn repetitive routines into Python scripts to slash usage — nima_owji · 2026-11-22